本文整理了Java中org.apache.pig.backend.executionengine.ExecException.getMessage()
方法的一些代码示例,展示了ExecException.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecException.getMessage()
方法的具体详情如下:
包路径:org.apache.pig.backend.executionengine.ExecException
类名称:ExecException
方法名:getMessage
暂无
代码示例来源:origin: org.apache.pig/pig
@Override
public String exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
String str = (String) input.get(0);
if (str == null) return null;
if (str.length() == 0) return str;
return Character.toLowerCase(str.charAt(0))+str.substring(1);
} catch (ExecException e) {
warn("Error reading input: " + e.getMessage(), PigWarning.UDF_WARNING_1);
return null;
}
}
代码示例来源:origin: org.apache.pig/pig
@Override
public String exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
String str = (String) input.get(0);
if (str == null) return null;
if (str.length() == 0) return str;
return Character.toUpperCase(str.charAt(0))+str.substring(1);
} catch (ExecException e) {
warn("Error reading input: " + e.getMessage(), PigWarning.UDF_WARNING_1);
return null;
}
}
代码示例来源:origin: org.apache.pig/pig
@Override
public int compare(Tuple t1, Tuple t2) {
mSortFunc.attachInput(t1, t2);
Integer i = null;
Result res = null;
try {
res = mSortFunc.getNextInteger();
} catch (ExecException e) {
log.error("Input not ready. Error on reading from input. "
+ e.getMessage());
}
if (res != null) {
return (Integer) res.result;
} else {
return 0;
}
}
代码示例来源:origin: org.netpreserve.commons/commons-web
private ArrayList<Tuple> applyView(Tuple inner) {
// [0] is the JSON. Remaining elements are Strings describing paths
// into the JSON to "flatten" into a single tuple:
if(inner == null || inner.size() == 0) {
return null;
}
try {
JSONObject json = new JSONObject(inner.get(2).toString());
List<List<String>> matches = view.apply(json);
if(matches.size() == 0) {
return null;
}
ArrayList<Tuple> results = new ArrayList<Tuple>();
for(List<String> t : matches) {
mCacheProtoTuple.addAll(t);
Tuple tup = mCacheTupleFactory.newTuple(mCacheProtoTuple);
mCacheProtoTuple.clear();
results.add(tup);
}
return results;
} catch (JSONException e) {
LOG.warning("Failed to parse JSON:"+e.getMessage());
} catch (ExecException e) {
LOG.warning("ExecException:"+e.getMessage());
}
return null;
}
代码示例来源:origin: org.apache.pig/pig
@Override
public String exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
String str = (String) input.get(0);
if (str == null) return null;
if (str.length() == 0) return str;
return str.replaceFirst(" +$", "");
} catch (ExecException e) {
warn("Error reading input: " + e.getMessage(), PigWarning.UDF_WARNING_1);
return null;
}
}
代码示例来源:origin: org.apache.pig/pig
@Override
public String exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
String str = (String) input.get(0);
if (str == null) return null;
if (str.length() == 0) return str;
return str.trim();
} catch (ExecException e) {
warn("Error reading input: " + e.getMessage(), PigWarning.UDF_WARNING_1);
return null;
}
}
代码示例来源:origin: org.apache.pig/pig
@Override
public String exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
String str = (String) input.get(0);
if (str == null) return null;
if (str.length() == 0) return str;
return str.replaceFirst("^ +", "");
} catch (ExecException e) {
warn("Error reading input: " + e.getMessage(), PigWarning.UDF_WARNING_1);
return null;
}
}
代码示例来源:origin: iipc/webarchive-commons
private ArrayList<Tuple> applyView(Tuple inner) {
// [0] is the JSON. Remaining elements are Strings describing paths
// into the JSON to "flatten" into a single tuple:
if(inner == null || inner.size() == 0) {
return null;
}
try {
JSONObject json = new JSONObject(inner.get(2).toString());
List<List<String>> matches = view.apply(json);
if(matches.size() == 0) {
return null;
}
ArrayList<Tuple> results = new ArrayList<Tuple>();
for(List<String> t : matches) {
mCacheProtoTuple.addAll(t);
Tuple tup = mCacheTupleFactory.newTuple(mCacheProtoTuple);
mCacheProtoTuple.clear();
results.add(tup);
}
return results;
} catch (JSONException e) {
LOG.warning("Failed to parse JSON:"+e.getMessage());
} catch (ExecException e) {
LOG.warning("ExecException:"+e.getMessage());
}
return null;
}
代码示例来源:origin: org.netpreserve.commons/webarchive-commons
private ArrayList<Tuple> applyView(Tuple inner) {
// [0] is the JSON. Remaining elements are Strings describing paths
// into the JSON to "flatten" into a single tuple:
if(inner == null || inner.size() == 0) {
return null;
}
try {
JSONObject json = new JSONObject(inner.get(2).toString());
List<List<String>> matches = view.apply(json);
if(matches.size() == 0) {
return null;
}
ArrayList<Tuple> results = new ArrayList<Tuple>();
for(List<String> t : matches) {
mCacheProtoTuple.addAll(t);
Tuple tup = mCacheTupleFactory.newTuple(mCacheProtoTuple);
mCacheProtoTuple.clear();
results.add(tup);
}
return results;
} catch (JSONException e) {
LOG.warning("Failed to parse JSON:"+e.getMessage());
} catch (ExecException e) {
LOG.warning("ExecException:"+e.getMessage());
}
return null;
}
代码示例来源:origin: lucidworks/solr-scale-tk
incrementCounter(Counters.NUM_TUPLE_TO_JSON_CONVERSION_ERRORS, 1L);
log.error(String.format("Failed to convert Tuple %s to JSON Object due to: %s",
tupleAsStr(input), ee.getMessage()), ee);
return null;
代码示例来源:origin: org.apache.pig/pig
log.error("Invalid result while executing the expression plan : " + plan.toString() + "\n" + e.getMessage());
代码示例来源:origin: org.apache.pig/pig
/**
* Configures the Local Rearrange operators to get keys out of tuple.
* @throws ExecException
*/
private void createJoinPlans(MultiMap<PhysicalOperator, PhysicalPlan> inpPlans, List<List<Byte>> keyTypes) throws PlanException{
int i=-1;
for (PhysicalOperator inpPhyOp : inpPlans.keySet()) {
++i;
POLocalRearrange lr = new POLocalRearrange(genKey());
try {
lr.setIndex(i);
} catch (ExecException e) {
throw new PlanException(e.getMessage(),e.getErrorCode(),e.getErrorSource(),e);
}
lr.setResultType(DataType.TUPLE);
lr.setKeyType(keyTypes.get(i).size() > 1 ? DataType.TUPLE : keyTypes.get(i).get(0));
lr.setPlans(inpPlans.get(inpPhyOp));
LRs[i]= lr;
}
}
代码示例来源:origin: org.apache.pig/pig
log.warn(e.getMessage());
代码示例来源:origin: org.apache.pig/pig
log
.error("Error visiting Load during Augmentation phase of Example Generator! "
+ e.getMessage());
throw new FrontendException(
"Error visiting Load during Augmentation phase of Example Generator! "
+ e.getMessage());
throw new FrontendException(
"Error visiting Load during Augmentation phase of Example Generator! "
+ e.getMessage());
代码示例来源:origin: org.apache.pig/pig
readBaseData(loads);
} catch (ExecException e) {
log.error("Error reading data. " + e.getMessage());
throw e;
} catch (FrontendException e) {
代码示例来源:origin: org.apache.pig/pig
+ e.getMessage());
代码示例来源:origin: org.apache.pig/pig
private void createJoinPlans(MultiMap<PhysicalOperator, PhysicalPlan> inpPlans) throws PlanException {
int i = -1;
for (PhysicalOperator inpPhyOp : inpPlans.keySet()) {
++i;
POLocalRearrange lr = new POLocalRearrange(genKey());
try {
lr.setIndex(i);
} catch (ExecException e) {
throw new PlanException(e.getMessage(), e.getErrorCode(), e.getErrorSource(), e);
}
lr.setResultType(DataType.TUPLE);
lr.setKeyType(DataType.TUPLE);//keyTypes.get(i).size() > 1 ? DataType.TUPLE : keyTypes.get(i).get(0));
lr.setPlans(inpPlans.get(inpPhyOp));
LRs[i] = lr;
}
}
内容来源于网络,如有侵权,请联系作者删除!