Package org.apache.hadoop.hbase.migration.nineteen.onelab.filter

Examples of org.apache.hadoop.hbase.migration.nineteen.onelab.filter.BloomFilter


      Path filterFile = new Path(dirName, BLOOMFILTER_FILE_NAME);
      if(!fs.exists(filterFile)) {
        LOG.warn("FileNotFound: " + filterFile + "; proceeding without");
        return null;
      }
      BloomFilter filter = new BloomFilter();
      FSDataInputStream in = fs.open(filterFile);
      try {
        filter.readFields(in);
      } finally {
        in.close();
      }
      return filter;
    }
View Full Code Here


         * approximately m/n ln(2).
         *
         * If we fix the number of hash functions and know the number of
         * entries, then the optimal vector size m = (k * n) / ln(2)
         */
        BloomFilter f = null;
        try {
          f  = new BloomFilter(
            (int) Math.ceil(
                (DEFAULT_NUMBER_OF_HASH_FUNCTIONS * (1.0 * nrows)) /
                Math.log(2.0)),
            (int) DEFAULT_NUMBER_OF_HASH_FUNCTIONS,
            Hash.getHashType(conf)
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.migration.nineteen.onelab.filter.BloomFilter

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.