org.apache.hadoop.tools.DistCp.getDefaultConf()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.apache.hadoop.tools.DistCp.getDefaultConf()方法的一些代码示例,展示了DistCp.getDefaultConf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DistCp.getDefaultConf()方法的具体详情如下:
包路径:org.apache.hadoop.tools.DistCp
类名称:DistCp
方法名:getDefaultConf

DistCp.getDefaultConf介绍

[英]Loads properties from distcp-default.xml into configuration object
[中]从distcp默认值加载属性。将xml转换为配置对象

代码示例

代码示例来源:origin: ch.cern.hadoop/hadoop-distcp

/**
 * Main function of the DistCp program. Parses the input arguments (via OptionsParser),
 * and invokes the DistCp::run() method, via the ToolRunner.
 * @param argv Command-line arguments sent to DistCp.
 */
public static void main(String argv[]) {
 int exitCode;
 try {
  DistCp distCp = new DistCp();
  Cleanup CLEANUP = new Cleanup(distCp);
  ShutdownHookManager.get().addShutdownHook(CLEANUP,
   SHUTDOWN_HOOK_PRIORITY);
  exitCode = ToolRunner.run(getDefaultConf(), distCp, argv);
 }
 catch (Exception e) {
  LOG.error("Couldn't complete DistCp operation: ", e);
  exitCode = DistCpConstants.UNKNOWN_ERROR;
 }
 System.exit(exitCode);
}

代码示例来源:origin: org.apache.hadoop/hadoop-distcp

/**
 * Main function of the DistCp program. Parses the input arguments (via OptionsParser),
 * and invokes the DistCp::run() method, via the ToolRunner.
 * @param argv Command-line arguments sent to DistCp.
 */
public static void main(String argv[]) {
 int exitCode;
 try {
  DistCp distCp = new DistCp();
  Cleanup CLEANUP = new Cleanup(distCp);
  ShutdownHookManager.get().addShutdownHook(CLEANUP,
   SHUTDOWN_HOOK_PRIORITY);
  exitCode = ToolRunner.run(getDefaultConf(), distCp, argv);
 }
 catch (Exception e) {
  LOG.error("Couldn't complete DistCp operation: ", e);
  exitCode = DistCpConstants.UNKNOWN_ERROR;
 }
 System.exit(exitCode);
}

相关文章