@Override
  public ObjectInspector initialize(ObjectInspector[] parameters) throws UDFArgumentException {
    if (parameters.length < 2) {
      throw new UDFArgumentTypeException(-1,
          "At least two argument is expected (fake column ref, vertex name)");
    }

    this.vertexName = getVertexName(parameters, 1);
    this.taskNumberExpr = getTaskNumber(parameters, 2);
    this.taskAttemptNumberExpr = getTaskAttemptNumber(parameters, 3);

    return PrimitiveObjectInspectorFactory.javaLongObjectInspector;
  }
This class implements the UDF which can throw an exception in arbitrary vertex (typically mapper)
/ task / task attempt. For throwing exception in reducer side, where most probably
GroupByOperator codepath applies, GenericUDAFExceptionInVertex is used.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFExceptionInVertex.java