org.apache.hadoop.mapred.Task.getEncryptedSpillKey()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(71)

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

Task.getEncryptedSpillKey介绍

[英]Get Encrypted spill key
[中]获取加密泄漏密钥

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

/**
 * Utility method to check if the Encrypted Spill Key needs to be set into the
 * user credentials of the user running the Map / Reduce Task
 * @param task The Map / Reduce task to set the Encrypted Spill information in
 * @throws Exception
 */
public static void setEncryptedSpillKeyIfRequired(Task task) throws
    Exception {
 if ((task != null) && (task.getEncryptedSpillKey() != null) && (task
     .getEncryptedSpillKey().length > 1)) {
  Credentials creds =
      UserGroupInformation.getCurrentUser().getCredentials();
  TokenCache.setEncryptedSpillKey(task.getEncryptedSpillKey(), creds);
  UserGroupInformation.getCurrentUser().addCredentials(creds);
 }
}

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

/**
 * Utility method to check if the Encrypted Spill Key needs to be set into the
 * user credentials of the user running the Map / Reduce Task
 * @param task The Map / Reduce task to set the Encrypted Spill information in
 * @throws Exception
 */
public static void setEncryptedSpillKeyIfRequired(Task task) throws
    Exception {
 if ((task != null) && (task.getEncryptedSpillKey() != null) && (task
     .getEncryptedSpillKey().length > 1)) {
  Credentials creds =
      UserGroupInformation.getCurrentUser().getCredentials();
  TokenCache.setEncryptedSpillKey(task.getEncryptedSpillKey(), creds);
  UserGroupInformation.getCurrentUser().addCredentials(creds);
 }
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-app

/**
 * Utility method to check if the Encrypted Spill Key needs to be set into the
 * user credentials of the user running the Map / Reduce Task
 * @param task The Map / Reduce task to set the Encrypted Spill information in
 * @throws Exception
 */
public static void setEncryptedSpillKeyIfRequired(Task task) throws
    Exception {
 if ((task != null) && (task.getEncryptedSpillKey() != null) && (task
     .getEncryptedSpillKey().length > 1)) {
  Credentials creds =
      UserGroupInformation.getCurrentUser().getCredentials();
  TokenCache.setEncryptedSpillKey(task.getEncryptedSpillKey(), creds);
  UserGroupInformation.getCurrentUser().addCredentials(creds);
 }
}

相关文章

微信公众号

最新文章

更多