Example usage for org.apache.hadoop.util.bloom Filter readFields

List of usage examples for org.apache.hadoop.util.bloom Filter readFields

Introduction

In this page you can find the example usage for org.apache.hadoop.util.bloom Filter readFields.

Prototype

@Override
    public void readFields(DataInput in) throws IOException 

Source Link

Usage

From source file:brickhouse.udf.bloom.BloomFactory.java

License:Apache License

public static Filter ReadBloomFromString(String str) throws IOException {
    if (str != null) {
        Filter filter = NewVesselBloom();
        byte[] decoded = Base64.decodeBase64(str.getBytes());
        DataInputStream dataInput = new DataInputStream(new ByteArrayInputStream(decoded));

        filter.readFields(dataInput);
        return filter;
    } else {//w  w  w. ja va  2 s  .co  m
        return NewBloomInstance();
    }
}