Example usage for org.apache.hadoop.hdfs.security.token.block ExportedBlockKeys ExportedBlockKeys

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

Introduction

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

Prototype

public ExportedBlockKeys(boolean isBlockTokenEnabled, long keyUpdateInterval, long tokenLifetime,
            BlockKey currentKey, BlockKey[] allKeys) 

Source Link

Usage

From source file:io.hops.metadata.security.token.block.NameNodeBlockTokenSecretManager.java

License:Apache License

@Override
public ExportedBlockKeys exportKeys() throws IOException {
    if (!isMaster) {
        return null;
    }//ww w .j  a  v  a 2 s  .  c  o  m
    if (LOG.isDebugEnabled()) {
        LOG.debug("Exporting access keys");
    }
    BlockKey[] allKeys = getAllKeysAndSync();
    return new ExportedBlockKeys(true, keyUpdateInterval, tokenLifetime, currentKey, allKeys);

}