@Override public void accumulate(Tuple b) throws IOException { try { Double curVal = doTupleWork(b, opProvider, DataType.BYTEARRAY); if (curVal == null) { return; } if (intermediateVal == null) { intermediateVal = getSeed(opProvider.getOp()); } intermediateVal = doWork(intermediateVal, curVal, opProvider.getOp()); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; throw new ExecException("Error executing function on Doubles", errCode, PigException.BUG, e); } }
@Override public Double exec(Tuple input) throws IOException { try { return doTupleWork(input, opProvider, DataType.BYTEARRAY); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; throw new ExecException("Error executing function on Doubles", errCode, PigException.BUG, e); } }
@Override public Double exec(Tuple input) throws IOException { try { return doTupleWork(input, this, DataType.DOUBLE); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; throw new ExecException("Error executing function on Doubles", errCode, PigException.BUG, e); } } }
@Override public Tuple exec(Tuple input) throws IOException { try { return tfact.newTuple(doTupleWork(input, this, DataType.DOUBLE)); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; throw new ExecException("Error executing function on Doubles", errCode, PigException.BUG, e); } } }