Package org.apache.hadoop.ozone.om
Class OzoneManagerStarter
java.lang.Object
org.apache.hadoop.hdds.cli.GenericCli
org.apache.hadoop.ozone.om.OzoneManagerStarter
public class OzoneManagerStarter
extends org.apache.hadoop.hdds.cli.GenericCli
implements Callable<Void>
This class provides a command line interface to start the OM
using Picocli.
-
Field Summary
Fields inherited from class org.apache.hadoop.hdds.cli.GenericCli
EXECUTION_ERROR_EXIT_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbootstrapOM(boolean force) This function implements a sub-command to allow the OM to be bootstrapped from the command line.call()voidinitOm()This function implements a sub-command to allow the OM to be initialized from the command line.static voidvoidThis function implements a sub-command to allow the OM to be Removed from prepare mode after an upgrade or downgrade.Methods inherited from class org.apache.hadoop.hdds.cli.GenericCli
err, execute, getCmd, getOzoneConf, getUser, isVerbose, out, printError, run, setConfigurationOverrides, setConfigurationPath
-
Constructor Details
-
OzoneManagerStarter
-
-
Method Details
-
main
- Throws:
Exception
-
call
-
initOm
This function implements a sub-command to allow the OM to be initialized from the command line.- Throws:
Exception
-
startOmUpgrade
This function implements a sub-command to allow the OM to be Removed from prepare mode after an upgrade or downgrade.- Throws:
Exception
-
bootstrapOM
This function implements a sub-command to allow the OM to be bootstrapped from the command line. During initialization, OM will get the metadata information from all the other OMs to check whether their on disk configs have been updated with this new OM information. If not, the bootstrap step will fail. This check is skipped with the --force option. Note that if an OM does not have updated configs, it can crash when a force bootstrap is initiated. The force option is provided for the scenario where one of the old OMs is down or not responding and the bootstrap needs to continue. Bootstrapping OM will request the leader OM to add itself to the ring. Once the leader OM responds back affirmatively, bootstrap step is complete and the OM is functional.- Throws:
Exception
-