List of usage examples for org.apache.hadoop.hdfs.security.token.block BlockKey readFields
@Override public void readFields(DataInput in) throws IOException
From source file:io.hops.metadata.HdfsVariables.java
License:Apache License
private static BlockKey deserializeBlockKey(ByteArrayVariable var) throws IOException { ByteArrayInputStream is = new ByteArrayInputStream((byte[]) var.getValue()); DataInputStream dis = new DataInputStream(is); BlockKey key = new BlockKey(); key.readFields(dis); switch (var.getType()) { case BTCurrKey: key.setKeyType(BlockKey.KeyType.CurrKey); break;// w w w. ja v a 2 s .c o m case BTNextKey: key.setKeyType(BlockKey.KeyType.NextKey); break; case BTSimpleKey: key.setKeyType(BlockKey.KeyType.SimpleKey); } return key; }