Java Code Examples for org.apache.pig.backend.executionengine.ExecException#getMessage()
The following examples show how to use
org.apache.pig.backend.executionengine.ExecException#getMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: POMergeJoin.java From spork with Apache License 2.0 | 6 votes |
/** * 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; } }
Example 2
Source File: SkewedJoinConverter.java From spork with Apache License 2.0 | 6 votes |
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; } }
Example 3
Source File: TestEvalPipelineLocal.java From spork with Apache License 2.0 | 6 votes |
@Override public DataBag exec(Tuple input) throws IOException { try { DataBag output = BagFactory.getInstance().newDefaultBag(); String str = input.get(0).toString(); String title = str; if (title != null) { List<String> nGrams = makeNGrams(title); for (Iterator<String> it = nGrams.iterator(); it.hasNext(); ) { Tuple t = TupleFactory.getInstance().newTuple(1); t.set(0, it.next()); output.add(t); } } return output; } catch (ExecException ee) { IOException ioe = new IOException(ee.getMessage()); ioe.initCause(ee); throw ioe; } }
Example 4
Source File: TestMapReduce.java From spork with Apache License 2.0 | 6 votes |
@Override public DataBag exec(Tuple input) throws IOException { try { DataBag output = BagFactory.getInstance().newDefaultBag(); Iterator<Tuple> it = (DataType.toBag(input.get(0))).iterator(); while(it.hasNext()) { Tuple t = it.next(); Tuple newT = TupleFactory.getInstance().newTuple(2); newT.set(0, field0); newT.set(1, t.get(0).toString()); output.add(newT); } return output; } catch (ExecException ee) { IOException ioe = new IOException(ee.getMessage()); ioe.initCause(ee); throw ioe; } }
Example 5
Source File: TestEvalPipeline.java From spork with Apache License 2.0 | 6 votes |
@Override public DataBag exec(Tuple input) throws IOException { try { DataBag output = BagFactory.getInstance().newDefaultBag(); String str = input.get(0).toString(); String title = str; if (title != null) { List<String> nGrams = makeNGrams(title); for (Iterator<String> it = nGrams.iterator(); it.hasNext(); ) { Tuple t = TupleFactory.getInstance().newTuple(1); t.set(0, it.next()); output.add(t); } } return output; } catch (ExecException ee) { IOException ioe = new IOException(ee.getMessage()); ioe.initCause(ee); throw ioe; } }
Example 6
Source File: TestMapReduce.java From spork with Apache License 2.0 | 5 votes |
@Override public Tuple exec(Tuple input) throws IOException{ try { Tuple output = TupleFactory.getInstance().newTuple(1); output.set(0, new String("g")); return output; } catch (ExecException ee) { IOException ioe = new IOException(ee.getMessage()); ioe.initCause(ee); throw ioe; } }
Example 7
Source File: TestLocal.java From spork with Apache License 2.0 | 5 votes |
@Override public Tuple exec(Tuple input) throws IOException{ try { Tuple output = TupleFactory.getInstance().newTuple(1); output.set(0, new String("g")); return output; } catch (ExecException ee) { IOException ioe = new IOException(ee.getMessage()); ioe.initCause(ee); throw ioe; } }