启动远程调试
hive --debug
Listening for transport dt_socket at address: 8000
Hive Session ID = 75714884-fc1a-4701-92bf-1bdbd156c5e3
Logging initialized using configuration in file:/data/apps/hive-3.1.3/conf/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
org.apache.hadoop.hive.cli.CliDriver
在hive 的 hive或者beeline 中输入 **dfs add reset **等等,处理逻辑都在
org.apache.hadoop.hive.ql.processors.CommandProcessorFactory
switch (hiveCommand) {
case SET:
return new SetProcessor();
case RESET:
return new ResetProcessor();
case DFS:
SessionState ss = SessionState.get();
return new DfsProcessor(ss.getConf());
case ADD:
return new AddResourceProcessor();
case LIST:
return new ListResourceProcessor();
case LLAP_CLUSTER:
return new LlapClusterResourceProcessor();
case LLAP_CACHE:
return new LlapCacheResourceProcessor();
case DELETE:
return new DeleteResourceProcessor();
case COMPILE:
return new CompileProcessor();
case RELOAD:
return new ReloadProcessor();
case CRYPTO:
try {
return new CryptoProcessor(SessionState.get().getHdfsEncryptionShim(), conf);
} catch (HiveException e) {
throw new SQLException("Fail to start the command processor due to the exception: ", e);
}
default:
throw new AssertionError("Unknown HiveCommand " + hiveCommand);
}