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