• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java BackendException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void killJob(String jobID, Configuration conf) throws BackendException {
    try {
        if (conf != null) {
            JobConf jobConf = new JobConf(conf);
            JobClient jc = new JobClient(jobConf);
            JobID id = JobID.forName(jobID);
            RunningJob job = jc.getJob(id);
            if (job == null)
                System.out.println("Job with id " + jobID + " is not active");
            else
            {
                job.killJob();
                log.info("Kill " + id + " submitted.");
            }
        }
    } catch (IOException e) {
        throw new BackendException(e);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:21,代码来源:MapReduceLauncher.java


示例2: inferWritable

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
protected Object inferWritable(Object o) throws BackendException {
  System.out.println("Got object '" + o + "' type " + o.getClass());
  switch (DataType.findType(o)) {
    case BYTEARRAY: {
      return new BytesWritable(((DataByteArray) o).get());
    }
    case CHARARRAY: {
      return new Text(o.toString());
    }
    case INTEGER: {
      return new IntWritable((Integer) o);
    }
    case LONG: {
      return new LongWritable((Long) o);
    }
    case FLOAT: {
      return new FloatWritable((Float) o);
    }
    case DOUBLE: {
      return new DoubleWritable((Double) o);
    }
    case BOOLEAN: {
      return new BooleanWritable((Boolean) o);
    }
    case BYTE: {
      return new ByteWritable((Byte) o);
    }
  }
  throw new BackendException("Unable to translate " + o.getClass() +
      " to a Writable datatype");
}
 
开发者ID:Hanmourang,项目名称:hiped2,代码行数:32,代码来源:SequenceFileStoreFunc.java


示例3: cancel

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void cancel(InterpreterContext context) {
  LOGGER.info("Cancel paragraph:" + context.getParagraphId());
  PigScriptListener listener = listenerMap.get(context.getParagraphId());
  if (listener != null) {
    Set<String> jobIds = listener.getJobIds();
    if (jobIds.isEmpty()) {
      LOGGER.info("No job is started, so can not cancel paragraph:" + context.getParagraphId());
    }
    for (String jobId : jobIds) {
      LOGGER.info("Kill jobId:" + jobId);
      HExecutionEngine engine =
              (HExecutionEngine) getPigServer().getPigContext().getExecutionEngine();
      try {
        Field launcherField = HExecutionEngine.class.getDeclaredField("launcher");
        launcherField.setAccessible(true);
        Launcher launcher = (Launcher) launcherField.get(engine);
        // It doesn't work for Tez Engine due to PIG-5035
        launcher.killJob(jobId, new Configuration());
      } catch (NoSuchFieldException | BackendException | IllegalAccessException e) {
        LOGGER.error("Fail to cancel paragraph:" + context.getParagraphId(), e);
      }
    }
  } else {
    LOGGER.warn("No PigScriptListener found, can not cancel paragraph:"
            + context.getParagraphId());
  }
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:29,代码来源:BasePigInterpreter.java


示例4: setKeyType

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
protected void setKeyType(Class<?> keyClass) throws BackendException {
  this.keyType |= inferPigDataType(keyClass);
  if (keyType == DataType.ERROR) { 
    LOG.warn("Unable to translate key "+key.getClass()+" to a Pig datatype");
    throw new BackendException("Unable to translate "+key.getClass()+" to a Pig datatype");
  } 
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:8,代码来源:SequenceFileLoader.java


示例5: setValueType

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
protected void setValueType(Class<?> valueClass) throws BackendException {
  this.valType |= inferPigDataType(valueClass);
  if (keyType == DataType.ERROR) { 
    LOG.warn("Unable to translate key "+key.getClass()+" to a Pig datatype");
    throw new BackendException("Unable to translate "+key.getClass()+" to a Pig datatype");
  } 
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:8,代码来源:SequenceFileLoader.java


示例6: kill

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void kill() throws BackendException {
    if (runningJob != null) {
        try {
            runningJob.killJob();
        } catch (Exception e) {
            throw new BackendException(e);
        }
    }
    destroy();
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:12,代码来源:TezLauncher.java


示例7: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void killJob(String jobID, Configuration conf) throws BackendException {
    if (runningJob != null && runningJob.getApplicationId().toString() == jobID) {
        try {
            runningJob.killJob();
        } catch (Exception e) {
            throw new BackendException(e);
        }
    } else {
        log.info("Cannot find job: " + jobID);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:13,代码来源:TezLauncher.java


示例8: setKeyType

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
protected void setKeyType(Class<?> keyClass) throws BackendException {
  this.keyType |= inferPigDataType(keyClass);
  if (keyType == DataType.ERROR) {
    LOG.warn("Unable to translate key "+key.getClass()+" to a Pig datatype");
    throw new BackendException("Unable to translate "+key.getClass()+" to a Pig datatype");
  }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:8,代码来源:SequenceFileLoader.java


示例9: setValueType

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
protected void setValueType(Class<?> valueClass) throws BackendException {
  this.valType |= inferPigDataType(valueClass);
  if (keyType == DataType.ERROR) {
    LOG.warn("Unable to translate key "+key.getClass()+" to a Pig datatype");
    throw new BackendException("Unable to translate "+key.getClass()+" to a Pig datatype");
  }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:8,代码来源:SequenceFileLoader.java


示例10: kill

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void kill() throws BackendException {
	// Not really necessary for a streaming job...
}
 
开发者ID:JamesLampton,项目名称:piggybank-squeal,代码行数:5,代码来源:StormLauncher.java


示例11: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void killJob(String jobID, Configuration conf)
		throws BackendException {
	// Not really necessary for a streaming job...
}
 
开发者ID:JamesLampton,项目名称:piggybank-squeal,代码行数:6,代码来源:StormLauncher.java


示例12: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
public abstract void killJob(String jobID, Configuration conf)
throws BackendException;
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:3,代码来源:Launcher.java


示例13: kill

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void kill() throws BackendException {
    // TODO Auto-generated method stub

}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:6,代码来源:SparkLauncher.java


示例14: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void killJob(String jobID, Configuration conf)
        throws BackendException {
    // TODO Auto-generated method stub

}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:7,代码来源:SparkLauncher.java


示例15: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
@Override
public void killJob(String jobID) throws BackendException {
    if (launcher != null) {
        launcher.killJob(jobID, getJobConf());
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:7,代码来源:HExecutionEngine.java


示例16: killJob

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
/**
 * This method is called when a user requests to kill a job associated with
 * the given job id. If it is not possible for a user to kill a job, throw a
 * exception. It is imperative for the job id's being displayed to be unique
 * such that the correct jobs are being killed when the user supplies the
 * id.
 *
 * @throws BackendException
 */
public void killJob(String jobID) throws BackendException;
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:11,代码来源:ExecutionEngine.java


示例17: kill

import org.apache.pig.backend.BackendException; //导入依赖的package包/类
public abstract void kill() throws BackendException; 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:2,代码来源:Launcher.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AgendaEventListener类代码示例发布时间:2022-05-22
下一篇:
Java Kind类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap