Package org.apache.hadoop.hive.serde2.objectinspector

Examples of org.apache.hadoop.hive.serde2.objectinspector.InspectableObject


    // the remaining tree. Look at comments in DummyStoreOperator for additional
    // explanation.
    Operator<? extends OperatorDesc> forwardOp =
        conf.getAliasToSink().get(table).getChildOperators().get(0);
    try {
      InspectableObject row = mergeQueue.getNextRow();
      if (row == null) {
        fetchDone[tag] = true;
        return;
      }
      forwardOp.processOp(row.o, tag);
View Full Code Here


        byte tag = tagForAlias(alias);
        // joinKeys/joinKeysOI are initialized after making merge queue, so setup lazily at runtime
        keyFields = joinKeys[tag];
        keyFieldOIs = joinKeysObjectInspectors[tag];
      }
      InspectableObject nextRow = segments[current].getNextRow();
      while (nextRow != null) {
        sinkOp.reset();
        if (keys[current] == null) {
          keys[current] = new ObjectPair<List<Object>, InspectableObject>();
        }
View Full Code Here

      // get the root operator
      Operator<? extends OperatorDesc> forwardOp = work.getAliasToWork().get(alias);
      // walk through the operator tree
      while (!forwardOp.getDone()) {
        InspectableObject row = fetchOp.getNextRow();
        if (row == null) {
          break;
        }
        forwardOp.processOp(row.o, 0);
      }
View Full Code Here

    }
    return statsDesc;
  }

  private int persistPartitionStats() throws HiveException {
    InspectableObject io = null;
    // Fetch result of the analyze table .. compute statistics for columns ..
    try {
      io = fetchColumnStats();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

    }
    return 0;
  }

  private int persistTableStats() throws HiveException {
    InspectableObject io = null;
    // Fetch result of the analyze table .. compute statistics for columns ..
    try {
      io = fetchColumnStats();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

    }
    return 1;
  }

  private InspectableObject fetchColumnStats() throws IOException, CommandNeedRetryException {
    InspectableObject io = null;

    try {
      int rowsRet = work.getLeastNumRows();
      if (rowsRet <= 0) {
        rowsRet = ColumnStatsWork.getLimit() >= 0 ?
View Full Code Here

        operator.processOp(row, 0);
      }
      operator.flush();
      return true;
    }
    InspectableObject row = getNextRow();
    if (row != null) {
      pushRow(row);
    } else {
      operator.flush();
    }
View Full Code Here

      typeInfos = new ArrayList<TypeInfo>();
      typeInfos.add(col1Type);
      typeInfos.add(colaType);
      dataType = TypeInfoFactory.getStructTypeInfo(names, typeInfos);

      r = new InspectableObject();
      r.o = data;
      r.oi = TypeInfoUtils
          .getStandardWritableObjectInspectorFromTypeInfo(dataType);
    } catch (Throwable e) {
      e.printStackTrace();
View Full Code Here

  private static void measureSpeed(String expr, int times,
      ExprNodeEvaluator eval, InspectableObject input, Object standardJavaOutput)
      throws HiveException {
    System.out.println("Evaluating " + expr + " for " + times + " times");
    new InspectableObject();
    ObjectInspector resultOI = eval.initialize(input.oi);
    Object resultO = null;
    long start = System.currentTimeMillis();
    for (int i = 0; i < times; i++) {
      resultO = eval.evaluate(input.o);
View Full Code Here

   * @param expected
   * @throws HiveException
   */
  public static void assertResults(Operator<SelectDesc> selectOp, CollectOperator collectOp,
      InspectableObject [] sourceData, InspectableObject [] expected) throws HiveException {
    InspectableObject resultRef = new InspectableObject();
    for (int i = 0; i < sourceData.length; i++) {
      selectOp.processOp(sourceData[i].o, 0);
      collectOp.retrieve(resultRef);
      StructObjectInspector expectedOi = (StructObjectInspector) expected[i].oi;
      List<? extends StructField> expectedFields = expectedOi.getAllStructFieldRefs();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.serde2.objectinspector.InspectableObject

Copyright © 2018 www.massapicom. 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.