listServiceRecords(
RegistryOperations registryOperations,
@@ -186,8 +186,9 @@ public static String componentPath(String user,
* This is not an atomic operation; A child may be deleted
* during the iteration through the child entries. If this happens,
* the PathNotFoundException is caught and that child
- * entry ommitted.
+ * entry omitted.
*
+ * @param registryOperations operations instance to use
* @param path path
* @return a possibly empty map of child entries listed by
* their short name.
@@ -279,7 +280,7 @@ public static String getCurrentUsernameUnencoded(String env_hadoop_username) {
}
/**
- * Get the current user path formatted for the registry
+ * Get the current user path formatted for the registry.
*
* In an insecure cluster, the environment variable
* HADOOP_USER_NAME is queried first.
@@ -344,6 +345,7 @@ public static String currentUser() {
*
* @param operations operation support for fetches
* @param parentpath path of the parent of all the entries
+ * @param stats list of registry stat values to examine
* @return a possibly empty map of fullpath:record.
* @throws IOException for any IO Operation that wasn't ignored.
*/
@@ -376,7 +378,7 @@ public static String currentUser() {
/**
- * Static instance of service record marshalling
+ * Static instance of service record marshalling.
*/
public static class ServiceRecordMarshal extends JsonSerDeser {
public ServiceRecordMarshal() {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java
index 7f35c3f..f4df778 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java
@@ -69,12 +69,12 @@
LoggerFactory.getLogger(CuratorService.class);
/**
- * the Curator binding
+ * the Curator binding.
*/
private CuratorFramework curator;
/**
- * Path to the registry root
+ * Path to the registry root.
*/
private String registryRoot;
@@ -85,17 +85,17 @@
private final RegistryBindingSource bindingSource;
/**
- * Security service
+ * Security service.
*/
private RegistrySecurity registrySecurity;
/**
- * the connection binding text for messages
+ * the connection binding text for messages.
*/
private String connectionDescription;
/**
- * Security connection diagnostics
+ * Security connection diagnostics.
*/
private String securityConnectionDiagnostics = "";
@@ -133,7 +133,7 @@ public CuratorService(String name) {
* Init the service.
* This is where the security bindings are set up
* @param conf configuration of the service
- * @throws Exception
+ * @throws Exception initialization problems.
*/
@Override
protected void serviceInit(Configuration conf) throws Exception {
@@ -155,7 +155,7 @@ protected void serviceInit(Configuration conf) throws Exception {
/**
* Start the service.
* This is where the curator instance is started.
- * @throws Exception
+ * @throws Exception startup problems
*/
@Override
protected void serviceStart() throws Exception {
@@ -167,7 +167,7 @@ protected void serviceStart() throws Exception {
}
/**
- * Close the ZK connection if it is open
+ * Close the ZK connection if it is open.
*/
@Override
protected void serviceStop() throws Exception {
@@ -176,7 +176,7 @@ protected void serviceStop() throws Exception {
}
/**
- * Internal check that a service is in the live state
+ * Internal check that a service is in the live state.
* @throws ServiceStateException if not
*/
private void checkServiceLive() throws ServiceStateException {
@@ -197,7 +197,7 @@ public boolean isSecure() {
}
/**
- * Get the registry security helper
+ * Get the registry security helper.
* @return the registry security helper
*/
protected RegistrySecurity getRegistrySecurity() {
@@ -205,7 +205,7 @@ protected RegistrySecurity getRegistrySecurity() {
}
/**
- * Build the security diagnostics string
+ * Build the security diagnostics string.
* @return a string for diagnostics
*/
protected String buildSecurityDiagnostics() {
@@ -277,7 +277,7 @@ public String toString() {
}
/**
- * Get the binding diagnostics
+ * Get the binding diagnostics.
* @return a diagnostics string valid after the service is started.
*/
public String bindingDiagnosticDetails() {
@@ -287,7 +287,7 @@ public String bindingDiagnosticDetails() {
}
/**
- * Create a full path from the registry root and the supplied subdir
+ * Create a full path from the registry root and the supplied subdir.
* @param path path of operation
* @return an absolute path
* @throws IllegalArgumentException if the path is invalide
@@ -308,7 +308,7 @@ public RegistryBindingSource getBindingSource() {
/**
* Create the ensemble provider for this registry, by invoking
* {@link RegistryBindingSource#supplyBindingInformation()} on
- * the provider stored in {@link #bindingSource}
+ * the provider stored in {@link #bindingSource}.
* Sets {@link #ensembleProvider} to that value;
* sets {@link #connectionDescription} to the binding info
* for use in toString and logging;
@@ -339,7 +339,7 @@ public BindingInformation supplyBindingInformation() {
/**
* Override point: get the connection string used to connect to
- * the ZK service
+ * the ZK service.
* @return a registry quorum
*/
protected String buildConnectionString() {
@@ -348,7 +348,7 @@ protected String buildConnectionString() {
}
/**
- * Create an IOE when an operation fails
+ * Create an IOE when an operation fails.
* @param path path of operation
* @param operation operation attempted
* @param exception caught the exception caught
@@ -361,7 +361,7 @@ protected IOException operationFailure(String path,
}
/**
- * Create an IOE when an operation fails
+ * Create an IOE when an operation fails.
* @param path path of operation
* @param operation operation attempted
* @param exception caught the exception caught
@@ -421,7 +421,7 @@ protected IOException operationFailure(String path,
* @param acl ACL for path -used when creating a new entry
* @param createParents flag to trigger parent creation
* @return true iff the path was created
- * @throws IOException
+ * @throws IOException problem creating the path.
*/
@VisibleForTesting
public boolean maybeCreate(String path,
@@ -432,11 +432,12 @@ public boolean maybeCreate(String path,
}
/**
- * Stat the file
+ * Stat the file.
* @param path path of operation
* @return a curator stat entry
* @throws IOException on a failure
* @throws PathNotFoundException if the path was not found
+ * @throws IOException any other problem
*/
public Stat zkStat(String path) throws IOException {
checkServiceLive();
@@ -457,10 +458,11 @@ public Stat zkStat(String path) throws IOException {
}
/**
- * Get the ACLs of a path
+ * Get the ACLs of a path.
* @param path path of operation
* @return a possibly empty list of ACLs
- * @throws IOException
+ * @throws PathNotFoundException if the path was not found
+ * @throws IOException any other problem
*/
public List zkGetACLS(String path) throws IOException {
checkServiceLive();
@@ -481,10 +483,11 @@ public Stat zkStat(String path) throws IOException {
}
/**
- * Probe for a path existing
+ * Probe for a path existing.
* @param path path of operation
* @return true if the path was visible from the ZK server
* queried.
+ * @throws PathNotFoundException if the path was not found
* @throws IOException on any exception other than
* {@link PathNotFoundException}
*/
@@ -497,16 +500,14 @@ public boolean zkPathExists(String path) throws IOException {
return true;
} catch (PathNotFoundException e) {
return false;
- } catch (IOException e) {
- throw e;
}
}
/**
- * Verify a path exists
+ * Verify a path exists.
* @param path path of operation
* @throws PathNotFoundException if the path is absent
- * @throws IOException
+ * @throws IOException any other problem
*/
public String zkPathMustExist(String path) throws IOException {
zkStat(path);
@@ -558,7 +559,7 @@ public boolean zkMkPath(String path,
}
/**
- * Recursively make a path
+ * Recursively make a path.
* @param path path to create
* @param acl ACL for path
* @throws IOException any problem
@@ -574,11 +575,11 @@ public void zkMkParentPath(String path,
/**
* Create a path with given data. byte[0] is used for a path
- * without data
+ * without data.
* @param path path of operation
* @param data initial data
- * @param acls
- * @throws IOException
+ * @param acls ACL list
+ * @throws IOException any problem creating the path.
*/
public void zkCreate(String path,
CreateMode mode,
@@ -600,10 +601,10 @@ public void zkCreate(String path,
}
/**
- * Update the data for a path
+ * Update the data for a path.
* @param path path of operation
* @param data new data
- * @throws IOException
+ * @throws IOException any problem updating the path.
*/
public void zkUpdate(String path, byte[] data) throws IOException {
Preconditions.checkArgument(data != null, "null data");
@@ -620,12 +621,13 @@ public void zkUpdate(String path, byte[] data) throws IOException {
}
/**
- * Create or update an entry
+ * Create or update an entry.
* @param path path
* @param data data
* @param acl ACL for path -used when creating a new entry
* @param overwrite enable overwrite
- * @throws IOException
+ * @throws FileAlreadyExistsException if the path existed and overwrite==false
+ * @throws IOException IO problem
* @return true if the entry was created, false if it was simply updated.
*/
public boolean zkSet(String path,
@@ -682,10 +684,10 @@ public void zkDelete(String path,
}
/**
- * List all children of a path
+ * List all children of a path.
* @param path path of operation
* @return a possibly empty list of children
- * @throws IOException
+ * @throws IOException read failure
*/
public List zkList(String path) throws IOException {
checkServiceLive();
@@ -703,7 +705,7 @@ public void zkDelete(String path,
}
/**
- * Read data on a path
+ * Read data on a path.
* @param path path of operation
* @return the data
* @throws IOException read failure
@@ -723,7 +725,7 @@ public void zkDelete(String path,
/**
* Return a path dumper instance which can do a full dump
- * of the registry tree in its toString()
+ * of the registry tree in its toString().
* operation
* @return a class to dump the registry
* @param verbose verbose flag - includes more details (such as ACLs)
@@ -746,7 +748,7 @@ public boolean addWriteAccessor(String id, String pass) throws IOException {
}
/**
- * Clear all write accessors
+ * Clear all write accessors.
*/
public void clearWriteAccessors() {
getRegistrySecurity().resetDigestACLs();
@@ -765,7 +767,7 @@ protected String dumpRegistryRobustly(boolean verbose) {
return pathDumper.toString();
} catch (Exception e) {
// ignore
- LOG.debug("Ignoring exception: {}", e);
+ LOG.debug("Ignoring exception", e);
}
return "";
}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/RegistrySecurity.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/RegistrySecurity.java
index 49673fc..92e3731 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/RegistrySecurity.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/RegistrySecurity.java
@@ -76,7 +76,7 @@
/**
* there's no default user to add with permissions, so it would be
- * impossible to create nodes with unrestricted user access
+ * impossible to create nodes with unrestricted user access.
*/
public static final String E_NO_USER_DETERMINED_FOR_ACLS =
"No user for ACLs determinable from current user or registry option "
@@ -90,31 +90,31 @@
"Registry security is enabled -but Hadoop security is not enabled";
/**
- * Access policy options
+ * Access policy options.
*/
private enum AccessPolicy {
anon, sasl, digest
}
/**
- * Access mechanism
+ * Access mechanism.
*/
private AccessPolicy access;
/**
- * User used for digest auth
+ * User used for digest auth.
*/
private String digestAuthUser;
/**
- * Password used for digest auth
+ * Password used for digest auth.
*/
private String digestAuthPassword;
/**
- * Auth data used for digest auth
+ * Auth data used for digest auth.
*/
private byte[] digestAuthData;
@@ -124,13 +124,13 @@
private boolean secureRegistry;
/**
- * An ACL with read-write access for anyone
+ * An ACL with read-write access for anyone.
*/
public static final ACL ALL_READWRITE_ACCESS =
new ACL(ZooDefs.Perms.ALL, ZooDefs.Ids.ANYONE_ID_UNSAFE);
/**
- * An ACL with read access for anyone
+ * An ACL with read access for anyone.
*/
public static final ACL ALL_READ_ACCESS =
new ACL(ZooDefs.Perms.READ, ZooDefs.Ids.ANYONE_ID_UNSAFE);
@@ -142,39 +142,39 @@
public static final List WorldReadWriteACL;
static {
- List acls = new ArrayList();
+ List acls = new ArrayList<>();
acls.add(ALL_READWRITE_ACCESS);
- WorldReadWriteACL = new CopyOnWriteArrayList(acls);
+ WorldReadWriteACL = new CopyOnWriteArrayList<>(acls);
}
/**
- * the list of system ACLs
+ * the list of system ACLs.
*/
- private final List systemACLs = new ArrayList();
+ private final List systemACLs = new ArrayList<>();
/**
* A list of digest ACLs which can be added to permissions
* —and cleared later.
*/
- private final List digestACLs = new ArrayList();
+ private final List digestACLs = new ArrayList<>();
/**
- * the default kerberos realm
+ * the default kerberos realm.
*/
private String kerberosRealm;
/**
- * Client context
+ * Client context.
*/
private String jaasClientContext;
/**
- * Client identity
+ * Client identity.
*/
private String jaasClientIdentity;
/**
- * Create an instance
+ * Create an instance.
* @param name service name
*/
public RegistrySecurity(String name) {
@@ -182,9 +182,10 @@ public RegistrySecurity(String name) {
}
/**
- * Init the service: this sets up security based on the configuration
+ * Init the service: this sets up security based on the configuration.
* @param conf configuration
- * @throws Exception
+ * @throws ServiceStateException if the authenticatin mechanism is unknown.
+ * @throws Exception any initialization problem.
*/
@Override
protected void serviceInit(Configuration conf) throws Exception {
@@ -213,7 +214,7 @@ protected void serviceInit(Configuration conf) throws Exception {
* Init security.
*
* After this operation, the {@link #systemACLs} list is valid.
- * @throws IOException
+ * @throws IOException problems initializing security.
*/
private void initSecurity() throws IOException {
@@ -291,7 +292,7 @@ private void initSecurity() throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Auth is anonymous");
}
- userACLs = new ArrayList(0);
+ userACLs = new ArrayList<>(0);
break;
}
systemACLs.addAll(userACLs);
@@ -306,7 +307,7 @@ private void initSecurity() throws IOException {
}
/**
- * Add another system ACL
+ * Add another system ACL.
* @param acl add ACL
*/
public void addSystemACL(ACL acl) {
@@ -314,8 +315,9 @@ public void addSystemACL(ACL acl) {
}
/**
- * Add a digest ACL
+ * Add a digest ACL.
* @param acl add ACL
+ * @return true if the registry is secure and the ACL added
*/
public boolean addDigestACL(ACL acl) {
if (secureRegistry) {
@@ -334,7 +336,7 @@ public boolean addDigestACL(ACL acl) {
}
/**
- * Reset the digest ACL list
+ * Reset the digest ACL list.
*/
public void resetDigestACLs() {
if (LOG.isDebugEnabled()) {
@@ -344,7 +346,7 @@ public void resetDigestACLs() {
}
/**
- * Flag to indicate the cluster is secure
+ * Flag to indicate the cluster is secure.
* @return true if the config enabled security
*/
public boolean isSecureRegistry() {
@@ -352,7 +354,7 @@ public boolean isSecureRegistry() {
}
/**
- * Get the system principals
+ * Get the system principals.
* @return the system principals
*/
public List getSystemACLs() {
@@ -361,21 +363,21 @@ public boolean isSecureRegistry() {
}
/**
- * Get all ACLs needed for a client to use when writing to the repo.
+ * Get all ACLs needed for a client to use when creating a new entry.
* That is: system ACLs, its own ACL, any digest ACLs
* @return the client ACLs
*/
public List getClientACLs() {
- List clientACLs = new ArrayList(systemACLs);
+ List clientACLs = new ArrayList<>(systemACLs);
clientACLs.addAll(digestACLs);
return clientACLs;
}
/**
- * Create a SASL ACL for the user
+ * Create a SASL ACL for the user.
* @param perms permissions
* @return an ACL for the current user or null if they aren't a kerberos user
- * @throws IOException
+ * @throws IOException IO problems
*/
public ACL createSaslACLFromCurrentUser(int perms) throws IOException {
UserGroupInformation currentUser = UserGroupInformation.getCurrentUser();
@@ -387,7 +389,7 @@ public ACL createSaslACLFromCurrentUser(int perms) throws IOException {
}
/**
- * Given a UGI, create a SASL ACL from it
+ * Given a UGI, create a SASL ACL from it.
* @param ugi UGI
* @param perms permissions
* @return a new ACL
@@ -398,7 +400,7 @@ public ACL createSaslACL(UserGroupInformation ugi, int perms) {
}
/**
- * Get a conf option, throw an exception if it is null/empty
+ * Get a conf option, throw an exception if it is null/empty.
* @param key key
* @param defval default value
* @return the value
@@ -437,9 +439,10 @@ public String getKerberosRealm() {
}
/**
- * Generate a base-64 encoded digest of the idPasswordPair pair
+ * Generate a base-64 encoded digest of the idPasswordPair pair.
* @param idPasswordPair id:password
* @return a string that can be used for authentication
+ * @throws IOException on invalid idPasswordPair or digest problems
*/
public String digest(String idPasswordPair) throws IOException {
if (StringUtils.isEmpty(idPasswordPair) || !isValid(idPasswordPair)) {
@@ -455,18 +458,18 @@ public String digest(String idPasswordPair) throws IOException {
}
/**
- * Generate a base-64 encoded digest of the idPasswordPair pair
+ * Generate a base-64 encoded digest of the idPasswordPair pair.
* @param id ID
* @param password pass
* @return a string that can be used for authentication
- * @throws IOException
+ * @throws IOException on invalid idPasswordPair or digest problems
*/
public String digest(String id, String password) throws IOException {
return digest(id + ":" + password);
}
/**
- * Given a digest, create an ID from it
+ * Given a digest, create an ID from it.
* @param digest digest
* @return ID
*/
@@ -475,7 +478,7 @@ public Id toDigestId(String digest) {
}
/**
- * Create a Digest ID from an id:pass pair
+ * Create a Digest ID from an id:pass pair.
* @param id ID
* @param password password
* @return an ID
@@ -542,7 +545,7 @@ public Id parse(String idPair, String realm) {
}
/**
- * Parse the IDs, adding a realm if needed, setting the permissions
+ * Parse the IDs, adding a realm if needed, setting the permissions.
* @param principalList id string
* @param realm realm to add
* @param perms permissions
@@ -552,7 +555,7 @@ public Id parse(String idPair, String realm) {
public List buildACLs(String principalList, String realm, int perms)
throws IOException {
List aclPairs = splitAclPairs(principalList, realm);
- List ids = new ArrayList(aclPairs.size());
+ List ids = new ArrayList<>(aclPairs.size());
for (String aclPair : aclPairs) {
ACL newAcl = new ACL();
newAcl.setId(parse(aclPair, realm));
@@ -563,7 +566,7 @@ public Id parse(String idPair, String realm) {
}
/**
- * Parse an ACL list. This includes configuration indirection
+ * Parse an ACL list. This includes configuration indirection.
* {@link ZKUtil#resolveConfIndirection(String)}
* @param zkAclConf configuration string
* @return an ACL list
@@ -583,15 +586,11 @@ public Id parse(String idPair, String realm) {
* @return a JVM-specific kerberos login module classname.
*/
public static String getKerberosAuthModuleForJVM() {
- if (System.getProperty("java.vendor").contains("IBM")) {
- return "com.ibm.security.auth.module.Krb5LoginModule";
- } else {
- return "com.sun.security.auth.module.Krb5LoginModule";
- }
+ return KerberosUtil.getKrb5LoginModuleName();
}
/**
- * JAAS template: {@value}
+ * JAAS template: {@value}.
* Note the semicolon on the last entry
*/
private static final String JAAS_ENTRY =
@@ -609,7 +608,7 @@ public static String getKerberosAuthModuleForJVM() {
;
/**
- * Create a JAAS entry for insertion
+ * Create a JAAS entry for insertion.
* @param context context of the entry
* @param principal kerberos principal
* @param keytab keytab
@@ -653,7 +652,7 @@ public static void bindJVMtoJAASFile(File jaasFile) {
}
/**
- * Set the Zookeeper server property
+ * Set the Zookeeper server property.
* {@link ZookeeperConfigOptions#PROP_ZK_SERVER_SASL_CONTEXT}
* to the SASL context. When the ZK server starts, this is the context
* which it will read in
@@ -664,7 +663,7 @@ public static void bindZKToServerJAASContext(String contextName) {
}
/**
- * Reset any system properties related to JAAS
+ * Reset any system properties related to JAAS.
*/
public static void clearJaasSystemProperties() {
System.clearProperty(Environment.JAAS_CONF_KEY);
@@ -742,7 +741,7 @@ public static void setZKSaslClientProperties(String username,
}
/**
- * Clear all the ZK SASL Client properties
+ * Clear all the ZK SASL Client properties.
* Important:This is JVM-wide
*/
public static void clearZKSaslClientProperties() {
@@ -752,7 +751,7 @@ public static void clearZKSaslClientProperties() {
}
/**
- * Turn ZK SASL on
+ * Turn ZK SASL on.
* Important:This is JVM-wide
*/
protected static void enableZookeeperClientSASL() {
@@ -787,7 +786,7 @@ public void logCurrentHadoopUser() {
UserGroupInformation realUser = currentUser.getRealUser();
LOG.info("Real User = {}" , realUser);
} catch (IOException e) {
- LOG.warn("Failed to get current user {}, {}", e);
+ LOG.warn("Failed to get current user", e);
}
}
@@ -812,7 +811,7 @@ public static String aclsToString(List acls) {
}
/**
- * Convert an ACL to a string, with any obfuscation needed
+ * Convert an ACL to a string, with any obfuscation needed.
* @param acl ACL
* @return ACL string value
*/
@@ -826,7 +825,7 @@ public static String aclToString(ACL acl) {
/**
* Convert an ID to a string, stripping out all but the first few characters
- * of any digest auth hash for security reasons
+ * of any digest auth hash for security reasons.
* @param id ID
* @return a string description of a Zookeeper ID
*/
@@ -846,7 +845,7 @@ public static String idToString(Id id) {
}
/**
- * Build up low-level security diagnostics to aid debugging
+ * Build up low-level security diagnostics to aid debugging.
* @return a string to use in diagnostics
*/
public String buildSecurityDiagnostics() {
@@ -893,8 +892,8 @@ private static String describeProperty(String name, String def) {
}
/**
- * Get the default kerberos realm —returning "" if there
- * is no realm or other problem
+ * Get the default kerberos realm -returning "" if there
+ * is no realm or other problem.
* @return the default realm of the system if it
* could be determined
*/
@@ -917,12 +916,13 @@ public static String getDefaultRealmInJVM() {
/**
* Create an ACL For a user.
* @param ugi User identity
- * @return the ACL For the specified user. Ifthe username doesn't end
+ * @param perms permissions to pass to {@link #createACLfromUsername(String, int)}
+ * @return the ACL For the specified user. If the username doesn't end
* in "@" then the realm is added
*/
public ACL createACLForUser(UserGroupInformation ugi, int perms) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Creating ACL For ", new UgiInfo(ugi));
+ LOG.debug("Creating ACL For {}", new UgiInfo(ugi));
}
if (!secureRegistry) {
return ALL_READWRITE_ACCESS;
@@ -932,7 +932,7 @@ public ACL createACLForUser(UserGroupInformation ugi, int perms) {
}
/**
- * Given a user name (short or long), create a SASL ACL
+ * Given a user name (short or long), create a SASL ACL.
* @param username user name; if it doesn't contain an "@" symbol, the
* service's kerberos realm is added
* @param perms permissions
@@ -949,7 +949,7 @@ public ACL createACLfromUsername(String username, int perms) {
}
/**
- * On demand string-ifier for UGI with extra details
+ * On demand string-ifier for UGI with extra details.
*/
public static class UgiInfo {
@@ -957,7 +957,7 @@ public static UgiInfo fromCurrentUser() {
try {
return new UgiInfo(UserGroupInformation.getCurrentUser());
} catch (IOException e) {
- LOG.info("Failed to get current user {}", e, e);
+ LOG.info("Failed to get current user", e);
return new UgiInfo(null);
}
}
@@ -979,14 +979,15 @@ public String toString() {
builder.append(" hasKerberosCredentials=").append(
ugi.hasKerberosCredentials());
builder.append(" isFromKeytab=").append(ugi.isFromKeytab());
- builder.append(" kerberos is enabled in Hadoop =").append(UserGroupInformation.isSecurityEnabled());
+ builder.append(" kerberos is enabled in Hadoop =")
+ .append(UserGroupInformation.isSecurityEnabled());
return builder.toString();
}
}
/**
- * on-demand stringifier for a list of ACLs
+ * on-demand stringifier for a list of ACLs.
*/
public static class AclListInfo {
public final List acls;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/types/Endpoint.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/types/Endpoint.java
index e4effb4..0469860 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/types/Endpoint.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/types/Endpoint.java
@@ -50,7 +50,7 @@
public final class Endpoint implements Cloneable {
/**
- * API implemented at the end of the binding
+ * API implemented at the end of the binding.
*/
public String api;
@@ -67,7 +67,7 @@
public String protocolType;
/**
- * a list of address tuples —tuples whose format depends on the address type
+ * a list of address tuples -tuples whose format depends on the address type.
*/
public List