Class OzoneManagerStarter

java.lang.Object
org.apache.hadoop.hdds.cli.GenericCli
org.apache.hadoop.ozone.om.OzoneManagerStarter
All Implemented Interfaces:
Callable<Void>, org.apache.hadoop.hdds.cli.GenericParentCommand

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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bootstrapOM(boolean force)
    This function implements a sub-command to allow the OM to be bootstrapped from the command line.
     
    void
    This function implements a sub-command to allow the OM to be initialized from the command line.
    static void
    main(String[] args)
     
    void
    This 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • call

      public Void call() throws Exception
      Specified by:
      call in interface Callable<Void>
      Throws:
      Exception
    • initOm

      public void initOm() throws Exception
      This function implements a sub-command to allow the OM to be initialized from the command line.
      Throws:
      Exception
    • startOmUpgrade

      public void startOmUpgrade() throws Exception
      This function implements a sub-command to allow the OM to be Removed from prepare mode after an upgrade or downgrade.
      Throws:
      Exception
    • bootstrapOM

      public void bootstrapOM(boolean force) throws Exception
      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