热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.pig.backend.executionengine.ExecException.()方法的使用及代码示例

本文整理了Java中org.apache.pig.backend.executionengine.ExecException.<init>()方法的一些代码

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

ExecException.介绍

[英]Create a new ExecException with null as the error message.
[中]创建一个新的ExecException,错误消息为null。

代码示例

代码示例来源:origin: apache/hive

@Override
public Tuple getNext() throws IOException {
try {
HCatRecord hr = (HCatRecord) (reader.nextKeyValue() ? reader.getCurrentValue() : null);
Tuple t = PigHCatUtil.transformToTuple(hr, outputSchema);
// TODO : we were discussing an iter interface, and also a LazyTuple
// change this when plans for that solidifies.
return t;
} catch (ExecException e) {
int errCode = 6018;
String errMsg = "Error while reading input";
throw new ExecException(errMsg, errCode,
PigException.REMOTE_ENVIRONMENT, e);
} catch (Exception eOther) {
int errCode = 6018;
String errMsg = "Error converting read value to tuple";
throw new ExecException(errMsg, errCode,
PigException.REMOTE_ENVIRONMENT, eOther);
}
}

代码示例来源:origin: apache/phoenix

@Override
public Tuple getNext() throws IOException {
try {
if(!reader.nextKeyValue()) {
return null;
}
final PhoenixRecordWritable record = reader.getCurrentValue();
if(record == null) {
return null;
}
final Tuple tuple = TypeUtil.transformToTuple(record, schema.getFields());
return tuple;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
int errCode = 6018;
final String errMsg = "Error while reading input";
throw new ExecException(errMsg, errCode,PigException.REMOTE_ENVIRONMENT, e);
}
}

代码示例来源:origin: org.apache.pig/pig

/**
* TextLoader does not support conversion to Bag
* @throws IOException if the value cannot be cast.
*/
public DataBag bytesToBag(byte[] b, ResourceFieldSchema schema) throws IOException {
int errCode = 2109;
String msg = "TextLoader does not support conversion to Bag.";
throw new ExecException(msg, errCode, PigException.BUG);
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(Double d) throws IOException {
int errCode = 2109;
String msg = "TextLoader does not support conversion from Double.";
throw new ExecException(msg, errCode, PigException.BUG);
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(Float f) throws IOException {
int errCode = 2109;
String msg = "TextLoader does not support conversion from Float.";
throw new ExecException(msg, errCode, PigException.BUG);
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(Long l) throws IOException {
int errCode = 2109;
String msg = "TextLoader does not support conversion from Long.";
throw new ExecException(msg, errCode, PigException.BUG);
}

代码示例来源:origin: org.apache.pig/pig

/**
* NOT IMPLEMENTED
*/
@Override
public Tuple bytesToTuple(byte[] b, ResourceFieldSchema fieldSchema) throws IOException {
throw new ExecException("Can't generate a Tuple from byte[]");
}

代码示例来源:origin: org.apache.pig/pig

private Tuple getAggResultTuple(Object result) throws ExecException {
try {
return (Tuple) result;
} catch (ClassCastException ex) {
throw new ExecException("Intermediate Algebraic "
+ "functions must implement EvalFunc");
}
}

代码示例来源:origin: org.apache.pig/pig

/**
* Not implemented!
*/
@Override
public BigDecimal bytesToBigDecimal(byte[] b) throws IOException {
throw new ExecException("Can't generate a BigInteger from byte[]");
}

代码示例来源:origin: org.apache.pig/pig

private void freeMemory() throws ExecException {
if (rawInputMap != null && !rawInputMap.isEmpty()) {
throw new ExecException("Illegal state. Trying to free up partial aggregation maps when they are not empty");
}
// Free up the maps for garbage collection
rawInputMap = null;
processedInputMap = null;
}

代码示例来源:origin: org.apache.pig/pig

public static byte findTypeFromClassName(String className) throws ExecException {
if (classToTypeMap.containsKey(className)) {
return classToTypeMap.get(className);
} else {
throw new ExecException("Unable to map " + className + " to known types." + Arrays.toString(classToTypeMap.keySet().toArray()));
}
}

代码示例来源:origin: org.apache.pig/pig

@Override
public Long exec(Tuple input) throws IOException {
try {
return sum(input);
} catch (Exception ee) {
int errCode = 2106;
String msg = "Error while computing count in " + this.getClass().getSimpleName();
throw new ExecException(msg, errCode, PigException.BUG, ee);
}
}
}

代码示例来源:origin: org.apache.pig/pig

@Override
public BigDecimal exec(Tuple input) throws IOException {
try {
return doTupleWork(input, this);
} catch (ExecException ee) {
throw ee;
} catch (Exception e) {
int errCode = 2106;
throw new ExecException("Error executing function on BigDecimal", errCode, PigException.BUG, e);
}
}
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(DateTime dt) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
DataReaderWriter.writeDatum(dos, dt);
} catch (Exception ee) {
int errCode = 2105;
String msg = "Error while converting datetime to bytes.";
throw new ExecException(msg, errCode, PigException.BUG, ee);
}
return baos.toByteArray();
}

代码示例来源:origin: org.apache.pig/pig

protected Number mod(Number a, Number b, byte dataType) throws ExecException {
switch(dataType) {
case DataType.INTEGER:
return Integer.valueOf((Integer) a % (Integer) b);
case DataType.LONG:
return Long.valueOf((Long) a % (Long) b);
case DataType.BIGINTEGER:
return ((BigInteger)a).mod((BigInteger)b);
default:
throw new ExecException("called on unsupported Number class " + DataType.findTypeName(dataType));
}
}

代码示例来源:origin: org.apache.pig/pig

@Override
public Float exec(Tuple input) throws IOException {
try {
return doTupleWork(input, this);
} catch (ExecException ee) {
throw ee;
} catch (Exception e) {
int errCode = 2106;
throw new ExecException("Error executing function on Floats", errCode, PigException.BUG, e);
}
}
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(Double d) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
DataReaderWriter.writeDatum(dos, d);
} catch (Exception ee) {
int errCode = 2105;
String msg = "Error while converting double to bytes.";
throw new ExecException(msg, errCode, PigException.BUG, ee);
}
return baos.toByteArray();
}

代码示例来源:origin: org.apache.pig/pig

public byte[] toBytes(Float f) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
DataReaderWriter.writeDatum(dos, f);
} catch (Exception ee) {
int errCode = 2105;
String msg = "Error while converting float to bytes.";
throw new ExecException(msg, errCode, PigException.BUG, ee);
}
return baos.toByteArray();
}

代码示例来源:origin: org.apache.pig/pig

@Override
public Tuple exec(Tuple input) throws IOException {
try {
return tfact.newTuple(doTupleWork(input, this));
} catch (ExecException ee) {
throw ee;
} catch (Exception e) {
int errCode = 2106;
throw new ExecException("Error executing function on Doubles", errCode, PigException.BUG, e);
}
}
}

代码示例来源:origin: org.apache.pig/pig

@Override
public Tuple exec(Tuple input) throws IOException {
try {
return tfact.newTuple(doTupleWork(input, this));
} catch (ExecException ee) {
throw ee;
} catch (Exception e) {
int errCode = 2106;
throw new ExecException("Error executing function on BigDecimal", errCode, PigException.BUG, e);
}
}
}

推荐阅读
  • 本文详细介绍了Java中org.neo4j.helpers.collection.Iterators.single()方法的功能、使用场景及代码示例,帮助开发者更好地理解和应用该方法。 ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • 本文详细解析了Python中的os和sys模块,介绍了它们的功能、常用方法及其在实际编程中的应用。 ... [详细]
  • RecyclerView初步学习(一)
    RecyclerView初步学习(一)ReCyclerView提供了一种插件式的编程模式,除了提供ViewHolder缓存模式,还可以自定义动画,分割符,布局样式,相比于传统的ListVi ... [详细]
  • 本文详细介绍了 GWT 中 PopupPanel 类的 onKeyDownPreview 方法,提供了多个代码示例及应用场景,帮助开发者更好地理解和使用该方法。 ... [详细]
  • 技术分享:从动态网站提取站点密钥的解决方案
    本文探讨了如何从动态网站中提取站点密钥,特别是针对验证码(reCAPTCHA)的处理方法。通过结合Selenium和requests库,提供了详细的代码示例和优化建议。 ... [详细]
  • 本文探讨了Hive中内部表和外部表的区别及其在HDFS上的路径映射,详细解释了两者的创建、加载及删除操作,并提供了查看表详细信息的方法。通过对比这两种表类型,帮助读者理解如何更好地管理和保护数据。 ... [详细]
  • 本文详细介绍了Java中org.eclipse.ui.forms.widgets.ExpandableComposite类的addExpansionListener()方法,并提供了多个实际代码示例,帮助开发者更好地理解和使用该方法。这些示例来源于多个知名开源项目,具有很高的参考价值。 ... [详细]
  • 本文详细介绍了Java编程语言中的核心概念和常见面试问题,包括集合类、数据结构、线程处理、Java虚拟机(JVM)、HTTP协议以及Git操作等方面的内容。通过深入分析每个主题,帮助读者更好地理解Java的关键特性和最佳实践。 ... [详细]
  • MQTT技术周报:硬件连接与协议解析
    本周开发笔记重点介绍了在新项目中使用MQTT协议进行硬件连接的技术细节,涵盖其特性、原理及实现步骤。 ... [详细]
  • 扫描线三巨头 hdu1928hdu 1255  hdu 1542 [POJ 1151]
    学习链接:http:blog.csdn.netlwt36articledetails48908031学习扫描线主要学习的是一种扫描的思想,后期可以求解很 ... [详细]
  • 本文详细介绍了 Apache Jena 库中的 Txn.executeWrite 方法,通过多个实际代码示例展示了其在不同场景下的应用,帮助开发者更好地理解和使用该方法。 ... [详细]
  • 本文详细介绍如何使用Python进行配置文件的读写操作,涵盖常见的配置文件格式(如INI、JSON、TOML和YAML),并提供具体的代码示例。 ... [详细]
  • 本文介绍了如何使用JQuery实现省市二级联动和表单验证。首先,通过change事件监听用户选择的省份,并动态加载对应的城市列表。其次,详细讲解了使用Validation插件进行表单验证的方法,包括内置规则、自定义规则及实时验证功能。 ... [详细]
  • 本文详细介绍了Java中org.w3c.dom.Text类的splitText()方法,通过多个代码示例展示了其实际应用。该方法用于将文本节点在指定位置拆分为两个节点,并保持在文档树中。 ... [详细]
author-avatar
芸阁__907
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有