All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.sketches.hive.tuple.State Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
/*
 * Copyright 2016, Yahoo! Inc.
 * Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms.
 */

package com.yahoo.sketches.hive.tuple;

import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AbstractAggregationBuffer;

import com.yahoo.sketches.tuple.Sketch;
import com.yahoo.sketches.tuple.Summary;

abstract class State extends AbstractAggregationBuffer {

  private int nominalNumEntries_;

  void init(final int nominalNumEntries) {
    nominalNumEntries_ = nominalNumEntries;
  }

  int getNominalNumEntries() {
    return nominalNumEntries_;
  }

  abstract Sketch getResult();

  abstract void reset();

}