Membership Operations
Use ttGridAdmin
commands in this section to export or import the membership client configuration file. A typical scenario is if you want to make changes to the file.
Note:
The membership configuration file is first specified when you create the grid, according to the gridCreate
-membershipConfig
option. See Create a Grid (gridCreate).
Export the Membership Configuration File (membershipConfigExport)
The membershipConfigExport
command exports the contents of the membership client configuration file from the specified version of the grid model into a specified file.
ttGridAdmin membershipConfigExport [-current | -latest | -version n] [filepath]
Options
The membershipConfigExport
command has the options:
Option | Description |
---|---|
|
Export the configuration file from the current model—the model most recently applied to the grid. |
|
Export the configuration file from the latest model—the model being modified and not yet applied to the grid. This is the default. |
|
Export the configuration file from the specified version number of the model. |
|
The path and name of the file to write the contents of the membership client configuration file to. If no file is specified, the configuration is written to |
Examples
% ttGridAdmin membershipConfigExport -latest /sw/tten/grid/zkcfg/membership2.conf % cd /sw/tten/grid/zkcfg % more membership2.conf Servers zk1.example.com!2181,zk2.example.com!2181,zk3.example.com!2181
The example in the next section will import this file.
Import the Membership Configuration File (membershipConfigImport)
The membershipConfigImport
command replaces the membership client configuration file in the latest model of the grid with the specified file.
ttGridAdmin membershipConfigImport filepath
Also see information for the gridCreate
-membershipConfig
option in Create a Grid (gridCreate).
Options
The membershipConfigImport
command has the option:
Option | Description |
---|---|
|
The path and name of the file that contains the new membership configuration. |
Examples
This example imports the file created in the example from the preceding section, shown again here:
% cd /sw/tten/grid/zkcfg % more membership2.conf Servers zk1.example.com!2181,zk2.example.com!2181,zk3.example.com!2181
Run the command:
% ttGridAdmin membershipConfigImport /sw/tten/grid/zkcfg/membership2.conf Membership configuration file /sw/tten/grid/zkcfg/membership2.conf imported
Notes
-
Any membership client configuration changes according to the new file are not applied until you run the
modelApply
command. -
Once you run
modelApply
, the specified file is copied to each instance of the grid and its settings will take effect on each instance the next time the instance is restarted.