public String evaluate(String bloomStr) throws IOException { Filter bloom = BloomFactory.GetBloomFilter(bloomStr); /// Perform a logical not bloom.not(); return BloomFactory.WriteBloomToString(bloom); } }
@Nullable public Text evaluate(@Nullable Text bloomStr) throws HiveException { if (bloomStr == null) { return null; } 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); } } }