Tabnine Logo
ExportedBlockKeys.getTokenLifetime
Code IndexAdd Tabnine to your IDE (free)

How to use
getTokenLifetime
method
in
org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys

Best Java code snippets using org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys.getTokenLifetime (Showing top 11 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

long blockTokenLifetime = keys.getTokenLifetime();
LOG.info("Block token params received from NN: " +
  "for block pool {} keyUpdateInterval={} min(s), " +
origin: org.apache.hadoop/hadoop-hdfs

if (isBlockTokenEnabled) {
 long updateInterval = keys.getKeyUpdateInterval();
 long tokenLifetime = keys.getTokenLifetime();
 LOG.info("Block token params received from NN: update interval="
   + StringUtils.formatTime(updateInterval)
origin: org.apache.hadoop/hadoop-hdfs

public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
 ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
   .newBuilder();
 builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
   .setKeyUpdateInterval(keys.getKeyUpdateInterval())
   .setTokenLifeTime(keys.getTokenLifetime())
   .setCurrentKey(convert(keys.getCurrentKey()));
 for (BlockKey k : keys.getAllKeys()) {
  builder.addAllKeys(convert(k));
 }
 return builder.build();
}
origin: ch.cern.hadoop/hadoop-hdfs

long blockTokenLifetime = keys.getTokenLifetime();
LOG.info("Block token params received from NN: for block pool " +
  blockPoolId + " keyUpdateInterval="
origin: ch.cern.hadoop/hadoop-hdfs

public KeyManager(String blockpoolID, NamenodeProtocol namenode,
  boolean encryptDataTransfer, Configuration conf) throws IOException {
 this.namenode = namenode;
 this.encryptDataTransfer = encryptDataTransfer;
 this.timer = new Timer();
 final ExportedBlockKeys keys = namenode.getBlockKeys();
 this.isBlockTokenEnabled = keys.isBlockTokenEnabled();
 if (isBlockTokenEnabled) {
  long updateInterval = keys.getKeyUpdateInterval();
  long tokenLifetime = keys.getTokenLifetime();
  LOG.info("Block token params received from NN: update interval="
    + StringUtils.formatTime(updateInterval)
    + ", token lifetime=" + StringUtils.formatTime(tokenLifetime));
  String encryptionAlgorithm = conf.get(
    DFSConfigKeys.DFS_DATA_ENCRYPTION_ALGORITHM_KEY);
  this.blockTokenSecretManager = new BlockTokenSecretManager(
    updateInterval, tokenLifetime, blockpoolID, encryptionAlgorithm);
  this.blockTokenSecretManager.addKeys(keys);
  // sync block keys with NN more frequently than NN updates its block keys
  this.blockKeyUpdater = new BlockKeyUpdater(updateInterval / 4);
  this.shouldRun = true;
 } else {
  this.blockTokenSecretManager = null;
  this.blockKeyUpdater = null;
 }
}

origin: io.prestosql.hadoop/hadoop-apache

long blockTokenLifetime = keys.getTokenLifetime();
LOG.info("Block token params received from NN: for block pool " +
  blockPoolId + " keyUpdateInterval="
origin: io.prestosql.hadoop/hadoop-apache

public KeyManager(String blockpoolID, NamenodeProtocol namenode,
  boolean encryptDataTransfer, Configuration conf) throws IOException {
 this.namenode = namenode;
 this.encryptDataTransfer = encryptDataTransfer;
 this.timer = new Timer();
 final ExportedBlockKeys keys = namenode.getBlockKeys();
 this.isBlockTokenEnabled = keys.isBlockTokenEnabled();
 if (isBlockTokenEnabled) {
  long updateInterval = keys.getKeyUpdateInterval();
  long tokenLifetime = keys.getTokenLifetime();
  LOG.info("Block token params received from NN: update interval="
    + StringUtils.formatTime(updateInterval)
    + ", token lifetime=" + StringUtils.formatTime(tokenLifetime));
  String encryptionAlgorithm = conf.get(
    DFSConfigKeys.DFS_DATA_ENCRYPTION_ALGORITHM_KEY);
  this.blockTokenSecretManager = new BlockTokenSecretManager(
    updateInterval, tokenLifetime, blockpoolID, encryptionAlgorithm);
  this.blockTokenSecretManager.addKeys(keys);
  // sync block keys with NN more frequently than NN updates its block keys
  this.blockKeyUpdater = new BlockKeyUpdater(updateInterval / 4);
  this.shouldRun = true;
 } else {
  this.blockTokenSecretManager = null;
  this.blockKeyUpdater = null;
 }
}

origin: io.fabric8/fabric-hadoop

if (isBlockTokenEnabled) {
 long blockKeyUpdateInterval = keys.getKeyUpdateInterval();
 long blockTokenLifetime = keys.getTokenLifetime();
 LOG.info("Block token params received from NN: keyUpdateInterval="
   + blockKeyUpdateInterval / (60 * 1000) + " min(s), tokenLifetime="
origin: io.prestosql.hadoop/hadoop-apache

public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
 ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
   .newBuilder();
 builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
   .setKeyUpdateInterval(keys.getKeyUpdateInterval())
   .setTokenLifeTime(keys.getTokenLifetime())
   .setCurrentKey(convert(keys.getCurrentKey()));
 for (BlockKey k : keys.getAllKeys()) {
  builder.addAllKeys(convert(k));
 }
 return builder.build();
}
origin: ch.cern.hadoop/hadoop-hdfs

void compare(ExportedBlockKeys expKeys, ExportedBlockKeys expKeys1) {
 BlockKey[] allKeys = expKeys.getAllKeys();
 BlockKey[] allKeys1 = expKeys1.getAllKeys();
 assertEquals(allKeys.length, allKeys1.length);
 for (int i = 0; i < allKeys.length; i++) {
  compare(allKeys[i], allKeys1[i]);
 }
 compare(expKeys.getCurrentKey(), expKeys1.getCurrentKey());
 assertEquals(expKeys.getKeyUpdateInterval(),
   expKeys1.getKeyUpdateInterval());
 assertEquals(expKeys.getTokenLifetime(), expKeys1.getTokenLifetime());
}
origin: ch.cern.hadoop/hadoop-hdfs

public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
 ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
   .newBuilder();
 builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
   .setKeyUpdateInterval(keys.getKeyUpdateInterval())
   .setTokenLifeTime(keys.getTokenLifetime())
   .setCurrentKey(convert(keys.getCurrentKey()));
 for (BlockKey k : keys.getAllKeys()) {
  builder.addAllKeys(convert(k));
 }
 return builder.build();
}
org.apache.hadoop.hdfs.security.token.blockExportedBlockKeysgetTokenLifetime

Popular methods of ExportedBlockKeys

  • getKeyUpdateInterval
  • <init>
  • getAllKeys
  • getCurrentKey
  • isBlockTokenEnabled

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • String (java.lang)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now