Changeset 31211

Show
Ignore:
Timestamp:
12.12.2016 16:01:59 (3 years ago)
Author:
davidb
Message:

Changing back to regular Guava classes. Looking to use maven shading to remap Guava 20.0 into different namespace

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/org/hathitrust/extractedfeatures/WhitelistBloomFilter.java

    r31204 r31211  
    2424 
    2525import com.google.common.base.Preconditions; 
    26 //import com.google.common.hash.BloomFilter; 
    27 import com.google.common.hash.BloomFilterAdvanced; 
     26import com.google.common.hash.BloomFilter; 
     27//import com.google.common.hash.BloomFilterAdvanced; 
    2828//import com.google.common.hash.BloomFilterStrategies.BitArray; 
    2929import com.google.common.hash.Funnel; 
     
    3434 
    3535public class WhitelistBloomFilter { 
    36      
    37      
    38  
    39     protected BloomFilterAdvanced<CharSequence> _bloomFilter; 
     36 
     37    protected BloomFilter<CharSequence> _bloomFilter; 
    4038    protected static final String SERIALIZED_SUFFIX = "-serialized"; 
    4139    protected static final double FALSE_POSITIVE_PERCENTAGE = 0.01; 
     
    8785                //Funnel<CharSequence> string_funnel = Funnels.stringFunnel(StandardCharsets.UTF_8); 
    8886                Funnel<CharSequence> string_funnel = stringFunnel(StandardCharsets.UTF_8); 
    89                 _bloomFilter = BloomFilterAdvanced.create(string_funnel, num_lines,FALSE_POSITIVE_PERCENTAGE); 
     87                _bloomFilter = BloomFilter.create(string_funnel, num_lines,FALSE_POSITIVE_PERCENTAGE); 
    9088            }  
    9189            catch (IOException e) { 
     
    148146    } 
    149147 
    150     protected static BloomFilterAdvanced<CharSequence> serializeIn(File ser_file) 
    151     { 
    152         BloomFilterAdvanced<CharSequence> bloomFilter = null; 
     148    protected static BloomFilter<CharSequence> serializeIn(File ser_file) 
     149    { 
     150        BloomFilter<CharSequence> bloomFilter = null; 
    153151     
    154152        try { 
     
    158156            //Funnel<CharSequence> string_funnel = Funnels.stringFunnel(StandardCharsets.UTF_8); 
    159157            Funnel<CharSequence> string_funnel = stringFunnel(StandardCharsets.UTF_8); 
    160             bloomFilter = BloomFilterAdvanced.readFrom(bfis,string_funnel); 
     158            bloomFilter = BloomFilter.readFrom(bfis,string_funnel); 
    161159 
    162160            bfis.close();