hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java
public static KeySpaceManager createKSM(String[] argv,
      OzoneConfiguration conf) throws IOException {
    if (!isHddsEnabled(conf)) {
      System.err.println("KSM cannot be started in secure mode or when " +
          OZONE_ENABLED + " is set to false");
      System.exit(1);
    }
    StartupOption startOpt = parseArguments(argv);
    if (startOpt == null) {
      printUsage(System.err);
      terminate(1);
      return null;
    }
    switch (startOpt) {
    case CREATEOBJECTSTORE:
      terminate(ksmInit(conf) ? 0 : 1);
      return null;
    case HELP:
      printUsage(System.err);
      terminate(0);
      return null;
    default:
      return new KeySpaceManager(conf);
    }
  }
/**
   * Constructs KSM instance based on command line arguments.
   * @param argv Command line arguments
   * @param conf OzoneConfiguration
   * @return KSM instance
   * @throws IOException in case KSM instance creation fails.
   */
Constructs KSM instance based on command line arguments.
@param argv Command line arguments
@param conf OzoneConfiguration
@return KSM instance
@throws IOException in case KSM instance creation fails.
Constructs KSM instance based on command line arguments . @param argv Command line arguments @param conf OzoneConfiguration @return KSM instance @throws IOException in case KSM instance creation fails .
public static KeySpaceManager createKSM(String[] argv,
      OzoneConfiguration conf) throws IOException {
    if (!isHddsEnabled(conf)) {
      System.err.println("KSM cannot be started in secure mode or when " +
          OZONE_ENABLED + " is set to false");
      System.exit(1);
    }
    StartupOption startOpt = parseArguments(argv);
    if (startOpt == null) {
      printUsage(System.err);
      terminate(1);
      return null;
    }
    switch (startOpt) {
    case CREATEOBJECTSTORE:
      terminate(ksmInit(conf) ? 0 : 1);
      return null;
    case HELP:
      printUsage(System.err);
      terminate(0);
      return null;
    default:
      return new KeySpaceManager(conf);
    }
  }
public static KeySpaceManager createKSM ( String [ ] argv , OzoneConfiguration conf ) throws IOException { if ( ! isHddsEnabled ( conf ) ) { System . err . println ( "KSM cannot be started in secure mode or when " + OZONE_ENABLED + " is set to false" ) ; System . exit ( 1 ) ; } StartupOption startOpt = parseArguments ( argv ) ; if ( startOpt == null ) { printUsage ( System . err ) ; terminate ( 1 ) ; return null ; } switch ( startOpt ) { case CREATEOBJECTSTORE : terminate ( ksmInit ( conf ) ? 0 : 1 ) ; return null ; case HELP : printUsage ( System . err ) ; terminate ( 0 ) ; return null ; default : return new KeySpaceManager ( conf ) ; } }
Constructs KSM instance based on command line arguments.
Constructs KSM instance based on command line arguments .