Package org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer


    // fixed length. Keep track of the variable length
    // fields in these aggregation classes.
    for (int i = 0; i < aggregationEvaluators.length; i++) {

      fixedRowSize += javaObjectOverHead;
      AggregationBuffer agg = aggregationEvaluators[i].getNewAggregationBuffer();
      if (GenericUDAFEvaluator.isEstimable(agg)) {
        continue;
      }
      Field[] fArr = ObjectInspectorUtils.getDeclaredNonStaticFields(agg.getClass());
      for (Field f : fArr) {
        fixedRowSize += getSize(i, f.getType(), f);
      }
    }
  }
View Full Code Here


        }
      }

      AggregationBuffer[] aggs = hashAggregations.get(newKeys);
      for (int i = 0; i < aggs.length; i++) {
        AggregationBuffer agg = aggs[i];
        if (GenericUDAFEvaluator.isEstimable(agg)) {
          totalVariableSize += ((GenericUDAFEvaluator.AbstractAggregationBuffer)agg).estimate();
          continue;
        }
        if (aggrPositions[i] != null) {
View Full Code Here

        aggs = hashAggregations.get(newKeys);

      for (varLenFields v : aggrPositions) {
        int     aggrPos          = v.getAggrPos();
        List<Field> fieldsVarLen = v.getFields();
        AggregationBuffer    agg = aggs[aggrPos];

        try
        {
          for (Field f : fieldsVarLen)
            totalVariableSize += ((String)f.get(agg)).length();
View Full Code Here

      }

      for (varLenFields v : aggrPositions) {
        int aggrPos = v.getAggrPos();
        List<Field> fieldsVarLen = v.getFields();
        AggregationBuffer agg = aggs[aggrPos];

        try {
          for (Field f : fieldsVarLen) {
            Object o = f.get(agg);
            if (o instanceof String){
View Full Code Here

        aggs = hashAggregations.get(newKeys);

      for (varLenFields v : aggrPositions) {
        int     aggrPos          = v.getAggrPos();
        List<Field> fieldsVarLen = v.getFields();
        AggregationBuffer    agg = aggs[aggrPos];

        try
        {
          for (Field f : fieldsVarLen)
            totalVariableSize += ((String)f.get(agg)).length();
View Full Code Here

      }

      for (varLenFields v : aggrPositions) {
        int aggrPos = v.getAggrPos();
        List<Field> fieldsVarLen = v.getFields();
        AggregationBuffer agg = aggs[aggrPos];

        try {
          for (Field f : fieldsVarLen) {
            totalVariableSize += ((String) f.get(agg)).length();
          }
View Full Code Here

        pItr.reset();
        if ( !processWindow )
        {
          GenericUDAFEvaluator fEval = wFn.getEvaluator();
          Object[] args = new Object[wFn.getArgs().size()];
          AggregationBuffer aggBuffer = fEval.getNewAggregationBuffer();
          while(pItr.hasNext())
          {
            Object row = pItr.next();
            int i =0;
            for(ArgDef arg : wFn.getArgs())
View Full Code Here

   
    GenericUDAFEvaluator fEval = wFnDef.getEvaluator();
    Object[] args = new Object[wFnDef.getArgs().size()];
    for(int i=0; i < iPart.size(); i++)
    {
      AggregationBuffer aggBuffer = fEval.getNewAggregationBuffer();
      Range rng = getRange(wFnDef, i, iPart);
      PartitionIterator<Object> rItr = rng.iterator();
      RuntimeUtils.connectLeadLagFunctionsToPartition(qDef, rItr);
      while(rItr.hasNext())
      {
View Full Code Here

    // fixed length. Keep track of the variable length
    // fields in these aggregation classes.
    for (int i = 0; i < aggregationEvaluators.length; i++) {

      fixedRowSize += javaObjectOverHead;
      AggregationBuffer agg = aggregationEvaluators[i].getNewAggregationBuffer();
      if (GenericUDAFEvaluator.isEstimable(agg)) {
        continue;
      }
      Field[] fArr = ObjectInspectorUtils.getDeclaredNonStaticFields(agg.getClass());
      for (Field f : fArr) {
        fixedRowSize += getSize(i, f.getType(), f);
      }
    }
  }
View Full Code Here

        }
      }

      AggregationBuffer[] aggs = hashAggregations.get(newKeys);
      for (int i = 0; i < aggs.length; i++) {
        AggregationBuffer agg = aggs[i];
        if (GenericUDAFEvaluator.isEstimable(agg)) {
          totalVariableSize += ((GenericUDAFEvaluator.AbstractAggregationBuffer)agg).estimate();
          continue;
        }
        if (aggrPositions[i] != null) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer

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.