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

x33g5p2x  于2022-01-23 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(108)

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

KerberosName.toString介绍

[英]Put the name back together from the parts.
[中]从零件中重新组合名称。

代码示例

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

/**
 * Get the translation of the principal name into an operating system
 * user name.
 * @return the user name
 * @throws IOException throws if something is wrong with the rules
 */
public String getShortName() throws IOException {
 String[] params;
 if (hostName == null) {
  // if it is already simple, just return it
  if (realm == null) {
   return serviceName;
  }
  params = new String[]{realm, serviceName};
 } else {
  params = new String[]{realm, serviceName, hostName};
 }
 for(Rule r: rules) {
  String result = r.apply(params);
  if (result != null) {
   return result;
  }
 }
 LOG.info("No auth_to_local rules applied to {}", this);
 return toString();
}

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

/**
 * Get the translation of the principal name into an operating system
 * user name.
 * @return the user name
 * @throws IOException throws if something is wrong with the rules
 */
public String getShortName() throws IOException {
 String[] params;
 if (hostName == null) {
  // if it is already simple, just return it
  if (realm == null) {
   return serviceName;
  }
  params = new String[]{realm, serviceName};
 } else {
  params = new String[]{realm, serviceName, hostName};
 }
 for(Rule r: rules) {
  String result = r.apply(params);
  if (result != null) {
   return result;
  }
 }
 LOG.info("No auth_to_local rules applied to {}", this);
 return toString();
}

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

throw new NoMatchingRule("No rules applied to " + toString());
return toString();

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

/**
 * Get the translation of the principal name into an operating system
 * user name.
 * @return the short name
 * @throws IOException throws if something is wrong with the rules
 */
public String getShortName() throws IOException {
 String[] params;
 if (hostName == null) {
  // if it is already simple, just return it
  if (realm == null) {
   return serviceName;
  }
  params = new String[]{realm, serviceName};
 } else {
  params = new String[]{realm, serviceName, hostName};
 }
 for(Rule r: rules) {
  String result = r.apply(params);
  if (result != null) {
   return result;
  }
 }
 throw new NoMatchingRule("No rules applied to " + toString());
}

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

/**
 * Get the translation of the principal name into an operating system
 * user name.
 * @return the short name
 * @throws IOException throws if something is wrong with the rules
 */
public String getShortName() throws IOException {
 String[] params;
 if (hostName == null) {
  // if it is already simple, just return it
  if (realm == null) {
   return serviceName;
  }
  params = new String[]{realm, serviceName};
 } else {
  params = new String[]{realm, serviceName, hostName};
 }
 for(Rule r: rules) {
  String result = r.apply(params);
  if (result != null) {
   return result;
  }
 }
 throw new NoMatchingRule("No rules applied to " + toString());
}

代码示例来源:origin: apache/hadoop-common

/**
 * Get the translation of the principal name into an operating system
 * user name.
 * @return the short name
 * @throws IOException
 */
public String getShortName() throws IOException {
 String[] params;
 if (hostName == null) {
  // if it is already simple, just return it
  if (realm == null) {
   return serviceName;
  }
  params = new String[]{realm, serviceName};
 } else {
  params = new String[]{realm, serviceName, hostName};
 }
 for(Rule r: rules) {
  String result = r.apply(params);
  if (result != null) {
   return result;
  }
 }
 throw new NoMatchingRule("No rules applied to " + toString());
}

相关文章