Example usage for org.apache.hadoop.fs XAttr getValue

List of usage examples for org.apache.hadoop.fs XAttr getValue

Introduction

In this page you can find the example usage for org.apache.hadoop.fs XAttr getValue.

Prototype

public byte[] getValue() 

Source Link

Usage

From source file:com.bigstep.datalake.JsonUtil.java

License:Apache License

private static Map<String, Object> toJsonMap(final XAttr xAttr, final XAttrCodec encoding) throws IOException {
    if (xAttr == null) {
        return null;
    }/*  ww  w  . j a  va2s . c  o m*/

    final Map<String, Object> m = new TreeMap<String, Object>();
    m.put("name", XAttrHelper.getPrefixName(xAttr));
    m.put("value", xAttr.getValue() != null ? XAttrCodec.encodeValue(xAttr.getValue(), encoding) : null);
    return m;
}