@Override public String exec(Tuple input) throws IOException { try { return max(input); } catch (ExecException ee) { throw ee; } }
@Override public String exec(Tuple input) throws IOException { try { return max(input); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; String msg = "Error while computing max in " + this.getClass().getSimpleName(); throw new ExecException(msg, errCode, PigException.BUG, e); } } }
@Override public void accumulate(Tuple b) throws IOException { try { String curMax = max(b); if (curMax == null) { return; } // check if it lexicographically follows curMax if (intermediateMax == null || intermediateMax.compareTo(curMax) < 0) { intermediateMax = curMax; } } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; String msg = "Error while computing max in " + this.getClass().getSimpleName(); throw new ExecException(msg, errCode, PigException.BUG, e); } }
@Override public Tuple exec(Tuple input) throws IOException { try { return tfact.newTuple(max(input)); } catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; String msg = "Error while computing max in " + this.getClass().getSimpleName(); throw new ExecException(msg, errCode, PigException.BUG, e); } } }