Example usage for org.apache.hadoop.hdfs.security.token.block BlockKey write

List of usage examples for org.apache.hadoop.hdfs.security.token.block BlockKey write

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.security.token.block BlockKey write.

Prototype

@Override
public void write(DataOutput out) throws IOException 

Source Link

Usage

From source file:io.hops.metadata.HdfsVariables.java

License:Apache License

private static ByteArrayVariable serializeBlockKey(BlockKey key, Variable.Finder keyType) throws IOException {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(os);
    key.write(dos);
    dos.flush();/*w ww .  ja  v a  2s  . c  o  m*/
    return new ByteArrayVariable(keyType, os.toByteArray());
}