当前位置: 首页>>代码示例>>Java>>正文


Java Result类代码示例

本文整理汇总了Java中org.apache.hadoop.cli.util.CommandExecutor.Result的典型用法代码示例。如果您正苦于以下问题:Java Result类的具体用法?Java Result怎么用?Java Result使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Result类属于org.apache.hadoop.cli.util.CommandExecutor包,在下文中一共展示了Result类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: compareTestOutput

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
/**
 * Compare the actual output with the expected output
 * @param compdata
 * @return
 */
private boolean compareTestOutput(ComparatorData compdata, Result cmdResult) {
  // Compare the output based on the comparator
  String comparatorType = compdata.getComparatorType();
  Class<?> comparatorClass = null;
  
  // If testMode is "test", then run the command and compare the output
  // If testMode is "nocompare", then run the command and dump the output.
  // Do not compare
  
  boolean compareOutput = false;
  
  if (testMode.equals(TESTMODE_TEST)) {
    try {
  	// Initialize the comparator class and run its compare method
      comparatorClass = Class.forName("org.apache.hadoop.cli.util." + 
        comparatorType);
      ComparatorBase comp = (ComparatorBase) comparatorClass.newInstance();
      compareOutput = comp.compare(cmdResult.getCommandOutput(), 
        expandCommand(compdata.getExpectedOutput()));
    } catch (Exception e) {
      LOG.info("Error in instantiating the comparator" + e);
    }
  }
  
  return compareOutput;
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:32,代码来源:CLITestHelper.java

示例2: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
@Override
protected Result execute(CLICommand cmd) throws Exception {
  if (cmd.getType() instanceof CLICommandMRAdmin)
    return new TestMRCLI.MRCmdExecutor(jobtracker).executeCommand(cmd.getCmd());
  else if (cmd.getType() instanceof CLICommandArchive)
    return new TestMRCLI.ArchiveCmdExecutor(namenode, mrConf).executeCommand(cmd.getCmd());
  else
    return super.execute(cmd);
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:10,代码来源:TestMRCLI.java

示例3: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
/**
 * this method has to be overridden by an ancestor
 */
protected CommandExecutor.Result execute(CLICommand cmd) throws Exception {
  throw new Exception("Unknown type of test command:"+ cmd.getType());
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:7,代码来源:CLITestHelper.java

示例4: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
@Override
protected Result execute(CLICommand cmd) throws Exception {
  return cmd.getExecutor(namenode).executeCommand(cmd.getCmd());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:TestXAttrCLI.java

示例5: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
@Override
protected Result execute(CLICommand cmd) throws Exception {
  return cmd.getExecutor("").executeCommand(cmd.getCmd());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:TestCacheAdminCLI.java

示例6: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
@Override
protected Result execute(CLICommand cmd) throws Exception {
  return cmd.getExecutor(namenode, conf).executeCommand(cmd.getCmd());
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:5,代码来源:TestErasureCodingCLI.java

示例7: execute

import org.apache.hadoop.cli.util.CommandExecutor.Result; //导入依赖的package包/类
@Override
protected Result execute(CLICommand cmd) throws Exception {
  return cmd.getExecutor("", conf).executeCommand(cmd.getCmd());
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:5,代码来源:TestCacheAdminCLI.java


注:本文中的org.apache.hadoop.cli.util.CommandExecutor.Result类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。