blob: bb8b76438f6f81ecb9b61a79cf47319f8cd6616c [file] [log] [blame]
---
title: execute function
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
Execute functions on members or regions.
## <a id="concept_F2ED1987126E4338AEB14A7C8F561A2A__section_FB435A8AC76E4E1A8E72DBEA64BA2E57" class="no-quick-link"></a>execute function
Execute the function with the specified ID. By default, the function executes on all members.
**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command.
**Syntax:**
``` pre
execute function --id=value [--groups=value(,value)*]
[--members=value(,value)*] [--region=value]
[--arguments=value(,value)*] [--result-collector=value] [--filter=value]
```
<a id="concept_F2ED1987126E4338AEB14A7C8F561A2A__table_i4q_dch_2w"></a>
| | |
|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| <span class="keyword parmname">\\-\\-id</span> | *Required.* ID of the function to execute. |
| <span class="keyword parmname">\\-\\-groups</span> | One or more groups of members on which this function should be executed. |
| <span class="keyword parmname">\\-\\-members</span> | Name/ID of the member(s) on which the function will be executed. |
| <span class="keyword parmname">\\-\\-region</span> | Region on which the data dependent function will be executed. |
| <span class="keyword parmname">\\-\\-arguments</span> | Arguments to the function in comma separated string format. |
| <span class="keyword parmname">\\-\\-result-collector</span> | Fully qualified class name of the `ResultCollector` to instantiate for gathering results. |
| <span class="keyword parmname">\\-\\-filter</span> | Key list which causes the function to only be executed on members which have entries with these keys. |
<span class="tablecap">Table 1. Execute Function Parameters</span>
**Example Commands:**
``` pre
execute function --id=InterestCalculations --region=/InterestRegion
execute function --id=InterestCalculations --members=server1
execute function --id=InterestCalculations --groups=Group1
```