Examples of ByteBloomFilter


Examples of com.taobao.top.analysis.util.bloom.ByteBloomFilter

  }
 
  DistinctCountEntryValue createDCEntryValue(ReportEntry entry)
  {
    DistinctCountEntryValue distinctEntryValue = new DistinctCountEntryValue();
    ByteBloomFilter bloomFilter;
   
    //240k
    int maxKeys = 100000;
    float errorRate = 0.0001F;
   
    if (entry.getAdditions().get(AnalysisConstants.ANALYSIS_BLOOM_MAXKEYS) != null)
      maxKeys = (Integer)entry.getAdditions().get(AnalysisConstants.ANALYSIS_BLOOM_MAXKEYS);
   
    if (entry.getAdditions().get(AnalysisConstants.ANALYSIS_BLOOM_ERRORRATE) != null)
      errorRate = (Float)entry.getAdditions().get(AnalysisConstants.ANALYSIS_BLOOM_ERRORRATE);
     
    bloomFilter = new ByteBloomFilter(maxKeys,errorRate,1);
   
    distinctEntryValue.setBloomFilter(bloomFilter);
   
    return distinctEntryValue;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

        ByteBuffer b = getMetaBlock(BLOOM_FILTER_META_KEY, false);
        if (b != null) {
          if (bloomFilterType == BloomType.NONE) {
            throw new IOException("valid bloom filter type not found in FileInfo");
          }
          this.bloomFilter = new ByteBloomFilter(b);
          LOG.info("Loaded " + (bloomFilterType==BloomType.ROW? "row":"col")
                 + " bloom filter metadata for " + name);
        }
      } catch (IOException e) {
        LOG.error("Error reading bloom filter meta -- proceeding without", e);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

      if (bloomType != BloomType.NONE && conf != null) {
        float err = conf.getFloat("io.hfile.bloom.error.rate", (float)0.01);
        int maxFold = conf.getInt("io.hfile.bloom.max.fold", 7);

        this.bloomFilter = new ByteBloomFilter(maxKeys, err,
            Hash.getHashType(conf), maxFold);
        this.bloomFilter.allocBloom();
        this.bloomType = bloomType;
      } else {
        this.bloomFilter = null;
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

        int maxFold = conf.getInt(IO_STOREFILE_BLOOM_MAX_FOLD, 7);
        int tooBig = conf.getInt(IO_STOREFILE_BLOOM_MAX_KEYS, 128*1000*1000);
       
        if (maxKeys < tooBig) {
          try {
            bloom = new ByteBloomFilter(maxKeys, err,
                Hash.getHashType(conf), maxFold);
            bloom.allocBloom();
            bt = bloomType;
          } catch (IllegalArgumentException iae) {
            LOG.warn(String.format(
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

          if (bloomFilterType == BloomType.NONE) {
            throw new IOException("valid bloom filter type not found in FileInfo");
          }


          this.bloomFilter = new ByteBloomFilter(b);
          LOG.info("Loaded " + (bloomFilterType== BloomType.ROW? "row":"col")
                 + " bloom filter metadata for " + reader.getName());
        }
      } catch (IOException e) {
        LOG.error("Error reading bloom filter meta -- proceeding without", e);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

        int maxFold = conf.getInt(IO_STOREFILE_BLOOM_MAX_FOLD, 7);
        int tooBig = conf.getInt(IO_STOREFILE_BLOOM_MAX_KEYS, 128*1000*1000);
       
        if (maxKeys < tooBig) {
          try {
            bloom = new ByteBloomFilter(maxKeys, err,
                Hash.getHashType(conf), maxFold);
            bloom.allocBloom();
            bt = bloomType;
          } catch (IllegalArgumentException iae) {
            LOG.warn(String.format(
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

          if (bloomFilterType == BloomType.NONE) {
            throw new IOException("valid bloom filter type not found in FileInfo");
          }


          this.bloomFilter = new ByteBloomFilter(b);
          LOG.info("Loaded " + (bloomFilterType== BloomType.ROW? "row":"col")
                 + " bloom filter metadata for " + reader.getName());
        }
      } catch (IOException e) {
        LOG.error("Error reading bloom filter meta -- proceeding without", e);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

        if (bloomType == BloomType.ROWCOL) {
          err /= 2;
        }
        int maxFold = conf.getInt(IO_STOREFILE_BLOOM_MAX_FOLD, 7);

        this.bloomFilter = new ByteBloomFilter(maxKeys, err,
            Hash.getHashType(conf), maxFold);
        this.bloomFilter.allocBloom();
        this.bloomType = bloomType;
      } else {
        this.bloomFilter = null;
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

          if (bloomFilterType == BloomType.NONE) {
            throw new IOException("valid bloom filter type not found in FileInfo");
          }


          this.bloomFilter = new ByteBloomFilter(b);
          LOG.info("Loaded " + (bloomFilterType== BloomType.ROW? "row":"col")
                 + " bloom filter metadata for " + reader.getName());
        }
      } catch (IOException e) {
        LOG.error("Error reading bloom filter meta -- proceeding without", e);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ByteBloomFilter

          }

          //Printing bloom information
          ByteBuffer b = reader.getMetaBlock("BLOOM_FILTER_META", false);
          if (b!= null) {
            BloomFilter bloomFilter = new ByteBloomFilter(b);
            System.out.println("BloomSize: " + bloomFilter.getByteSize());
            System.out.println("No of Keys in bloom: " +
                bloomFilter.getKeyCount());
            System.out.println("Max Keys for bloom: " +
                bloomFilter.getMaxKeys());
          } else {
            System.out.println("Could not get bloom data from meta block");
          }
        }
        if (printBlocks) {
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.