Examples of KISSInspector


Examples of com.livingsocial.hive.utils.KISSInspector

    @Override
    public ObjectInspector initialize(ObjectInspector[] args) throws UDFArgumentException {
        if(args.length != 2 || !KISSInspector.isPrimitive(args[0]) || !KISSInspector.isList(args[1]))
            throw new UDFArgumentException(FUNC + "() takes two arguments: a primitive and an array");
        element_inspector = new KISSInspector(args[0]);
        array_inspector = (ListObjectInspector) args[1];
        return PrimitiveObjectInspectorFactory.javaStringObjectInspector;
    }
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

  for(int i=0; i<arguments.length; i++) {
      if(!KISSInspector.isPrimitive(arguments[i]))
    throw new UDFArgumentTypeException(i, "min_date takes only date or datetime string arguments");

      inspectors[i] = new KISSInspector(arguments[i]);
      if(!inspectors[i].isNull() && !inspectors[i].isString())
    throw new UDFArgumentTypeException(i, "min_date takes only date or datetime string arguments");
  }

  return arguments[0];
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

  for(int i=0; i<arguments.length; i++) {
      if(!KISSInspector.isPrimitive(arguments[i]))
    throw new UDFArgumentTypeException(i, "max_date takes only date or datetime string arguments");

      inspectors[i] = new KISSInspector(arguments[i]);
      if(!inspectors[i].isNull() && !inspectors[i].isString())
    throw new UDFArgumentTypeException(i, "max_date takes only date or datetime string arguments");
  }

  return arguments[0];
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

    @Override
    public ObjectInspector initialize(ObjectInspector[] args) throws UDFArgumentException {
  if(args.length != 2 || !KISSInspector.isPrimitive(args[0]) || !KISSInspector.isList(args[1]))
      throw new UDFArgumentException("in_array() takes two arguments: a primitive and an array");
  element_inspector = new KISSInspector(args[0]);
  array_inspector = (ListObjectInspector) args[1];
  return PrimitiveObjectInspectorFactory.writableBooleanObjectInspector;
    }
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

    @Override
    public ObjectInspector initialize(ObjectInspector[] args) throws UDFArgumentException {
  if(args.length != 1 || !KISSInspector.isList(args[0]))
      throw new UDFArgumentException("index_of_max_elem() takes one argument: an array");
  array_inspector = (ListObjectInspector) args[0];
  elem_inspector = new KISSInspector(array_inspector.getListElementObjectInspector());
  return PrimitiveObjectInspectorFactory.writableIntObjectInspector;
    }
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

  private KISSInspector bitfield_inspector;
  private ListObjectInspector bitnames_inspector;
  private UDFBin b;
  private ArrayList result;
  public BinCaseSelector(ObjectInspector bfi, ObjectInspector bni) {
      bitfield_inspector = new KISSInspector(bfi);
      bitnames_inspector = (ListObjectInspector) bni;
      result = new ArrayList();
      b = new UDFBin();
  }
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

  private KISSInspector group_inspector, value_inspector, max_inspector;
  private Object current_group = null;
  private int current_count;

  public FirstNSelector(ObjectInspector gpoi, ObjectInspector vpoi, ObjectInspector maxoi) {
      group_inspector = new KISSInspector(gpoi);
      value_inspector = new KISSInspector(vpoi);
      max_inspector = new KISSInspector(maxoi);
  }
View Full Code Here

Examples of com.livingsocial.hive.utils.KISSInspector

  private KISSInspector group_inspector, value_inspector;
  private Object current_group = null;
  private float last_value;

  public Intervaler(ObjectInspector gpoi, ObjectInspector vpoi) {
      group_inspector = new KISSInspector(gpoi);
      value_inspector = new KISSInspector(vpoi);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.