Package com.clearspring.analytics.stream.cardinality

Examples of com.clearspring.analytics.stream.cardinality.HyperLogLogPlus.cardinality()


    Object result = udafEvaluator.terminate(agg);
    Assert.assertNotNull(result);
   
    byte[] b = ((JavaBinaryObjectInspector) finalOutputOi).getPrimitiveJavaObject(result);
    HyperLogLogPlus hll = HyperLogLogPlus.Builder.build( b );
    Long cardEst = hll.cardinality();
   
    LOG.info("cardEst = " + cardEst);
   
    int actualUniques = h.keySet().size();
    LOG.info("actualUniques = " + actualUniques);
View Full Code Here


      if(bref == null)
        return null;
      HyperLogLogPlus hll = HyperLogLogPlus.Builder.build( bref );
     
     
      return hll.cardinality();
    } catch(Exception e) {
      LOG.error("Error", e);
      throw new HiveException(e);
    }
   
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.