List of usage examples for org.apache.hadoop.util.bloom Filter not
public abstract void not();
From source file:brickhouse.udf.bloom.BloomNotUDF.java
License:Apache License
public String evaluate(String bloomStr) throws IOException { Filter bloom = BloomFactory.GetBloomFilter(bloomStr); /// Perform a logical not bloom.not(); return BloomFactory.WriteBloomToString(bloom); }
From source file:hivemall.sketch.bloom.BloomNotUDF.java
License:Apache License
@Nullable public Text evaluate(@Nullable Text bloomStr) throws HiveException { if (bloomStr == null) { return null; }// ww w . j a v a 2 s .c om final Filter bloom; try { bloom = BloomFilterUtils.deserialize(bloomStr, new DynamicBloomFilter()); } catch (IOException e) { throw new HiveException(e); } bloom.not(); try { return BloomFilterUtils.serialize(bloom, new Text()); } catch (IOException e) { throw new HiveException(e); } }