Class GetEstimateAndErrorBoundsUDF


  • public class GetEstimateAndErrorBoundsUDF
    extends org.apache.hadoop.hive.ql.exec.UDF
    • Constructor Detail

      • GetEstimateAndErrorBoundsUDF

        public GetEstimateAndErrorBoundsUDF()
    • Method Detail

      • evaluate

        public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch)
        Get an estimate from a given CpcSketch using the default seed and kappa
        Parameters:
        serializedSketch - CpcSketch in a serialized binary form
        Returns:
        estimate of unique count
      • evaluate

        public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch,
                                     int kappa)
        Get an estimate and bounds from a given CpcSketch with default seed
        Parameters:
        serializedSketch - CpcSketch in a serialized binary form
        kappa - given number of standard deviations from the mean: 1, 2 or 3
        Returns:
        estimate, lower and upper bound
      • evaluate

        public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch,
                                     int kappa,
                                     long seed)
        Get an estimate and bounds from a given CpcSketch with explicit seed
        Parameters:
        serializedSketch - CpcSketch in a serialized binary form
        kappa - given number of standard deviations from the mean: 1, 2 or 3
        seed - update seed
        Returns:
        estimate, lower and upper bound