private CommandProcessor getTestCommand(final String commandName) throws SQLException {
    HiveCommand testCommand = HiveCommand.find(new String[]{commandName}, HiveCommand.ONLY_FOR_TESTING);

    if (testCommand == null) {
      return null;
    }

    return CommandProcessorFactory
        .getForHiveCommandInternal(new String[]{commandName}, SessionState.get().getConf(),
            testCommand.isOnlyForTesting());
  }
Execute Hive CLI statement
@param cmd arbitrary statement to execute
hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java