@Override
  public CommandProcessorResponse run(String command) throws CommandProcessorException {
    String[] args = command.split("\\s+");

    if (args.length < 1) {
      throw new CommandProcessorException("Erasure Processor Helper Failed: Command arguments are empty.");
    }

    if (erasureCodingShim == null) {
      throw new CommandProcessorException("Erasure Processor Helper Failed: Hadoop erasure shim is not initialized.");
    }

    String action = args[0].toLowerCase();
    String[] params = Arrays.copyOfRange(args, 1, args.length);

    try {
      switch (action) {
      // note we switch on the lowercase command name
      case "disablepolicy":
        disablePolicy(params);
        break;
      case "echo":
        echo(params);
        break;
      case "enablepolicy":
        enablePolicy(params);
        break;
      case "getpolicy":
        getPolicy(params);
        break;
      case "listpolicies":
        listPolicies();
        break;
      case "setpolicy":
        setPolicy(params);
        break;
      case "removepolicy":
        removePolicy(params);
        break;
      case "unsetpolicy":
        unsetPolicy(params);
        break;
      default:
        throw new CommandProcessorException(
            "Erasure Processor Helper Failed: Unknown erasure command action: " + action);
      }
    } catch (Exception e) {
      throw new CommandProcessorException("Erasure Processor Helper Failed: " + e.getMessage());
    }

    return new CommandProcessorResponse();
  }
Get an instance of HdfsErasureCodingShim from a config.
ql/src/java/org/apache/hadoop/hive/ql/processors/ErasureProcessor.java