public interface RoleCommandsResource
Modifier and Type | Method and Description |
---|---|
ApiBulkCommandList |
formatCommand(ApiRoleNameList roleNames)
Format HDFS NameNodes.
|
ApiBulkCommandList |
hdfsBootstrapStandByCommand(ApiRoleNameList roleNames)
Bootstrap HDFS stand-by NameNodes.
|
ApiBulkCommandList |
hdfsInitializeAutoFailoverCommand(ApiRoleNameList roleNames)
Initialize HDFS HA failover controller metadata.
|
ApiBulkCommandList |
hdfsInitializeSharedDirCommand(ApiRoleNameList roleNames)
Initialize HDFS NameNodes' shared edit directory.
|
ApiBulkCommandList |
refreshCommand(ApiRoleNameList roleNames)
Refresh a role's data.
|
ApiBulkCommandList |
restartCommand(ApiRoleNameList roleNames)
Restart a set of role instances
|
ApiBulkCommandList |
startCommand(ApiRoleNameList roleNames)
Start a set of role instances.
|
ApiBulkCommandList |
stopCommand(ApiRoleNameList roleNames)
Stop a set of role instances.
|
ApiBulkCommandList |
syncHueDbCommand(ApiRoleNameList roleNames)
Create / update the Hue database schema.
|
ApiBulkCommandList |
zooKeeperCleanupCommand(ApiRoleNameList roleNames)
Cleanup a list of ZooKeeper server roles.
|
ApiBulkCommandList |
zooKeeperInitCommand(ApiRoleNameList roleNames)
Initialize a list of ZooKeeper server roles.
|
@Path(value="/hdfsBootstrapStandBy") ApiBulkCommandList hdfsBootstrapStandByCommand(ApiRoleNameList roleNames)
Submit a request to synchronize HDFS NameNodes with their assigned HA partners. The command requires that the target NameNodes are part of existing HA pairs, which can be accomplished by setting the nameservice configuration parameter in the NameNode's configuration.
The HA partner must already be formatted and running for this command to run.
roleNames
- The names of the stand-by NameNodes to bootstrap.@Path(value="/hdfsFormat") ApiBulkCommandList formatCommand(ApiRoleNameList roleNames)
Submit a format request to a list of NameNodes on a service. Note that trying to format a previously formatted NameNode will fail.
Note about high availability: when two NameNodes are working in an HA pair, only one of them should be formatted.
Bulk command operations are not atomic, and may contain partial failures. The returned list will contain references to all successful commands, and a list of error messages identifying the roles on which the command failed.
roleNames
- The names of the NameNodes to format.@Path(value="/hdfsInitializeAutoFailover") ApiBulkCommandList hdfsInitializeAutoFailoverCommand(ApiRoleNameList roleNames)
The controllers being initialized must already exist and be properly configured. The command will make sure the needed data is initialized for the controller to work.
Only one controller per nameservice needs to be initialized.
roleNames
- The names of the controllers to initialize.@Path(value="/hdfsInitializeSharedDir") ApiBulkCommandList hdfsInitializeSharedDirCommand(ApiRoleNameList roleNames)
Shared edit directories are used when two HDFS NameNodes are operating as a high-availability pair. This command initializes the shared directory to include the necessary metadata.
The provided role names should reflect one of the NameNodes in the respective HA pair; the role must be stopped and its data directory must already have been formatted. The shared edits directory must be empty for this command to succeed.
roleNames
- The names of the NameNodes.@Path(value="/hueSyncDb") ApiBulkCommandList syncHueDbCommand(ApiRoleNameList roleNames)
This command is to be run whenever a new database has been specified or, as necessary, after an upgrade.
This request should be sent to Hue servers only.
roleNames
- The names of the Hue server roles.@Path(value="/refresh") ApiBulkCommandList refreshCommand(ApiRoleNameList roleNames)
For MapReduce services, this command should be executed on JobTracker roles. It refreshes the role's queue and node information.
For HDFS services, this command should be executed on NameNode roles. It refreshes the NameNode's node list.
For Yarn services, this command should be executed on ResourceManager roles. It refreshes the role's queue and node information.
roleNames
- The names of the roles.@Path(value="/zooKeeperCleanup") ApiBulkCommandList zooKeeperCleanupCommand(ApiRoleNameList roleNames)
This command removes snapshots and transaction log files kept by ZooKeeper for backup purposes. Refer to the ZooKeeper documentation for more details.
roleNames
- The names of the roles.@Path(value="/zooKeeperInit") ApiBulkCommandList zooKeeperInitCommand(ApiRoleNameList roleNames)
This applies to ZooKeeper services from CDH4. Before ZooKeeper server roles can be used, they need to be initialized.
roleNames
- The names of the roles.@Path(value="/start") ApiBulkCommandList startCommand(ApiRoleNameList roleNames)
Bulk command operations are not atomic, and may contain partial failures. The returned list will contain references to all successful commands, and a list of error messages identifying the roles on which the command failed.
roleNames
- The names of the roles to start.@Path(value="/stop") ApiBulkCommandList stopCommand(ApiRoleNameList roleNames)
Bulk command operations are not atomic, and may contain partial failures. The returned list will contain references to all successful commands, and a list of error messages identifying the roles on which the command failed.
roleNames
- The role type.@Path(value="/restart") ApiBulkCommandList restartCommand(ApiRoleNameList roleNames)
Bulk command operations are not atomic, and may contain partial failures. The returned list will contain references to all successful commands, and a list of error messages identifying the roles on which the command failed.
roleNames
- The name of the roles to restart.Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.