com.cloudera.api.v1
Interface RoleCommandsResource

All Known Subinterfaces:
RoleCommandsResourceV10, RoleCommandsResourceV3, RoleCommandsResourceV4, RoleCommandsResourceV6, RoleCommandsResourceV8

public interface RoleCommandsResource


Method Summary
 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.
 

Method Detail

hdfsBootstrapStandByCommand

@Path(value="/hdfsBootstrapStandBy")
ApiBulkCommandList hdfsBootstrapStandByCommand(ApiRoleNameList roleNames)
Bootstrap HDFS stand-by NameNodes.

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.

Parameters:
roleNames - The names of the stand-by NameNodes to bootstrap.
Returns:
A list of submitted commands.

formatCommand

@Path(value="/hdfsFormat")
ApiBulkCommandList formatCommand(ApiRoleNameList roleNames)
Format HDFS NameNodes.

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.

Parameters:
roleNames - The names of the NameNodes to format.
Returns:
A list of submitted commands.

hdfsInitializeAutoFailoverCommand

@Path(value="/hdfsInitializeAutoFailover")
ApiBulkCommandList hdfsInitializeAutoFailoverCommand(ApiRoleNameList roleNames)
Initialize HDFS HA failover controller metadata.

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.

Parameters:
roleNames - The names of the controllers to initialize.
Returns:
A list of submitted commands.

hdfsInitializeSharedDirCommand

@Path(value="/hdfsInitializeSharedDir")
ApiBulkCommandList hdfsInitializeSharedDirCommand(ApiRoleNameList roleNames)
Initialize HDFS NameNodes' shared edit directory.

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.

Parameters:
roleNames - The names of the NameNodes.
Returns:
A list of submitted commands.

syncHueDbCommand

@Path(value="/hueSyncDb")
ApiBulkCommandList syncHueDbCommand(ApiRoleNameList roleNames)
Create / update the Hue database schema.

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.

Parameters:
roleNames - The names of the Hue server roles.
Returns:
A list of submitted commands.

refreshCommand

@Path(value="/refresh")
ApiBulkCommandList refreshCommand(ApiRoleNameList roleNames)
Refresh a role's data.

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.

Parameters:
roleNames - The names of the roles.
Returns:
A list of submitted commands.

zooKeeperCleanupCommand

@Path(value="/zooKeeperCleanup")
ApiBulkCommandList zooKeeperCleanupCommand(ApiRoleNameList roleNames)
Cleanup a list of ZooKeeper server roles.

This command removes snapshots and transaction log files kept by ZooKeeper for backup purposes. Refer to the ZooKeeper documentation for more details.

Parameters:
roleNames - The names of the roles.
Returns:
A list of submitted commands.

zooKeeperInitCommand

@Path(value="/zooKeeperInit")
ApiBulkCommandList zooKeeperInitCommand(ApiRoleNameList roleNames)
Initialize a list of ZooKeeper server roles.

This applies to ZooKeeper services from CDH4. Before ZooKeeper server roles can be used, they need to be initialized.

Parameters:
roleNames - The names of the roles.
Returns:
A list of submitted commands.

startCommand

@Path(value="/start")
ApiBulkCommandList startCommand(ApiRoleNameList roleNames)
Start a set of role instances.

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.

Parameters:
roleNames - The names of the roles to start.
Returns:
A reference to the submitted command.

stopCommand

@Path(value="/stop")
ApiBulkCommandList stopCommand(ApiRoleNameList roleNames)
Stop a set of role instances.

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.

Parameters:
roleNames - The role type.
Returns:
A reference to the submitted command.

restartCommand

@Path(value="/restart")
ApiBulkCommandList restartCommand(ApiRoleNameList roleNames)
Restart a set of role instances

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.

Parameters:
roleNames - The name of the roles to restart.
Returns:
A reference to the submitted command.


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.