gpt4 book ai didi

org.apache.hadoop.security.authentication.util.ZKSignerSecretProvider.generateZKData()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 05:47:31 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.security.authentication.util.ZKSignerSecretProvider.generateZKData()方法的一些代码示例,展示了ZKSignerSecretProvider.generateZKData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKSignerSecretProvider.generateZKData()方法的具体详情如下:
包路径:org.apache.hadoop.security.authentication.util.ZKSignerSecretProvider
类名称:ZKSignerSecretProvider
方法名:generateZKData

ZKSignerSecretProvider.generateZKData介绍

[英]Serialize the data to attempt to push into ZooKeeper. The format is this:

[DATA_VERSION, newSecretLength, newSecret, currentSecretLength, currentSecret, previousSecretLength, previousSecret, nextRolloverDate]

Only previousSecret can be null, in which case the format looks like this:

[DATA_VERSION, newSecretLength, newSecret, currentSecretLength, currentSecret, 0, nextRolloverDate]
[中]序列化数据以尝试推入ZooKeeper。格式如下:
[数据版本,newSecretLength,newSecret,currentSecretLength,currentSecret,previousSecretLength,previousSecret,nextRolloverDate]
只有previousSecret可以为null,在这种情况下,格式如下所示:
[DATA_VERSION,newSecretLength,newSecret,currentSecretLength,currentSecret,0,nextRolloverDate]

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-auth

/**
 * Pushes proposed data to ZooKeeper.  If a different server pushes its data
 * first, it gives up.
 * @param newSecret The new secret to use
 * @param currentSecret The current secret
 * @param previousSecret  The previous secret
 */
private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret,
    byte[] previousSecret) {
 byte[] bytes = generateZKData(newSecret, currentSecret, previousSecret);
 try {
  client.setData().withVersion(zkVersion).forPath(path, bytes);
 } catch (KeeperException.BadVersionException bve) {
  LOG.debug("Unable to push to znode; another server already did it");
 } catch (Exception ex) {
  LOG.error("An unexpected exception occurred pushing data to ZooKeeper",
      ex);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-auth

/**
 * Pushes proposed data to ZooKeeper.  If a different server pushes its data
 * first, it gives up.
 * @param newSecret The new secret to use
 * @param currentSecret The current secret
 * @param previousSecret  The previous secret
 */
private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret,
    byte[] previousSecret) {
 byte[] bytes = generateZKData(newSecret, currentSecret, previousSecret);
 try {
  client.setData().withVersion(zkVersion).forPath(path, bytes);
 } catch (KeeperException.BadVersionException bve) {
  LOG.debug("Unable to push to znode; another server already did it");
 } catch (Exception ex) {
  LOG.error("An unexpected exception occured pushing data to ZooKeeper",
      ex);
 }
}

代码示例来源:origin: io.hops/hadoop-auth

/**
 * Pushes proposed data to ZooKeeper.  If a different server pushes its data
 * first, it gives up.
 * @param newSecret The new secret to use
 * @param currentSecret The current secret
 * @param previousSecret  The previous secret
 */
private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret,
    byte[] previousSecret) {
 byte[] bytes = generateZKData(newSecret, currentSecret, previousSecret);
 try {
  client.setData().withVersion(zkVersion).forPath(path, bytes);
 } catch (KeeperException.BadVersionException bve) {
  LOG.debug("Unable to push to znode; another server already did it");
 } catch (Exception ex) {
  LOG.error("An unexpected exception occurred pushing data to ZooKeeper",
      ex);
 }
}

代码示例来源:origin: hopshadoop/hops

/**
 * Pushes proposed data to ZooKeeper.  If a different server pushes its data
 * first, it gives up.
 * @param newSecret The new secret to use
 * @param currentSecret The current secret
 * @param previousSecret  The previous secret
 */
private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret,
    byte[] previousSecret) {
 byte[] bytes = generateZKData(newSecret, currentSecret, previousSecret);
 try {
  client.setData().withVersion(zkVersion).forPath(path, bytes);
 } catch (KeeperException.BadVersionException bve) {
  LOG.debug("Unable to push to znode; another server already did it");
 } catch (Exception ex) {
  LOG.error("An unexpected exception occurred pushing data to ZooKeeper",
      ex);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-auth

.forPath(path, generateZKData(generateRandomSecret(),
    generateRandomSecret(), null));
zkVersion = 0;

代码示例来源:origin: com.github.jiayuhan-it/hadoop-auth

.forPath(path, generateZKData(generateRandomSecret(),
    generateRandomSecret(), null));
zkVersion = 0;

代码示例来源:origin: hopshadoop/hops

.forPath(path, generateZKData(generateRandomSecret(),
    generateRandomSecret(), null));
zkVersion = 0;

代码示例来源:origin: io.hops/hadoop-auth

.forPath(path, generateZKData(generateRandomSecret(),
    generateRandomSecret(), null));
zkVersion = 0;

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Pushes proposed data to ZooKeeper.  If a different server pushes its data
 * first, it gives up.
 * @param newSecret The new secret to use
 * @param currentSecret The current secret
 * @param previousSecret  The previous secret
 */
private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret,
    byte[] previousSecret) {
 byte[] bytes = generateZKData(newSecret, currentSecret, previousSecret);
 try {
  client.setData().withVersion(zkVersion).forPath(path, bytes);
 } catch (KeeperException.BadVersionException bve) {
  LOG.debug("Unable to push to znode; another server already did it");
 } catch (Exception ex) {
  LOG.error("An unexpected exception occured pushing data to ZooKeeper",
      ex);
 }
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

.forPath(path, generateZKData(generateRandomSecret(),
    generateRandomSecret(), null));
zkVersion = 0;

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com