You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2016/01/08 18:40:46 UTC
[3/5] incubator-slider git commit: SLIDER_1035 rename
EXIT_UNAUTHORIZE to EXIT_UNAUTHORIZED
SLIDER_1035 rename EXIT_UNAUTHORIZE to EXIT_UNAUTHORIZED
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/97746a66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/97746a66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/97746a66
Branch: refs/heads/develop
Commit: 97746a664ff84cb857b7c465dda2f516c501087b
Parents: 3c5cea4
Author: Steve Loughran <st...@apache.org>
Authored: Fri Jan 8 14:49:44 2016 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Jan 8 14:49:44 2016 +0000
----------------------------------------------------------------------
.../java/org/apache/slider/common/tools/SliderUtils.java | 2 +-
.../java/org/apache/slider/core/main/LauncherExitCodes.java | 4 +---
.../server/appmaster/security/SecurityConfiguration.java | 8 ++++----
3 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/97746a66/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
index 8d74692..b114d8a 100644
--- a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
+++ b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
@@ -1266,7 +1266,7 @@ public final class SliderUtils {
log.debug("Authenticating as {}", authUser);
log.debug("Login user is {}", UserGroupInformation.getLoginUser());
if (!UserGroupInformation.isSecurityEnabled()) {
- throw new SliderException(LauncherExitCodes.EXIT_UNAUTHORIZE,
+ throw new SliderException(LauncherExitCodes.EXIT_UNAUTHORIZED,
"Although secure mode is enabled," +
"the application has already set up its user as an insecure entity %s",
authUser);
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/97746a66/slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java b/slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java
index 3ffacd0..83e89f0 100644
--- a/slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java
+++ b/slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java
@@ -34,8 +34,6 @@ package org.apache.slider.core.main;
* 50-59: server-side problems. These may be triggered by the request.
* 64- : application specific error codes
* </pre>
- *
- *
*/
public interface LauncherExitCodes {
@@ -113,7 +111,7 @@ public interface LauncherExitCodes {
* <p>
* <code>401 Unauthorized</code>
*/
- int EXIT_UNAUTHORIZE = 41;
+ int EXIT_UNAUTHORIZED = 41;
/**
* Forbidden action: {@value}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/97746a66/slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java
index a01fb18..9a89c39 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.slider.server.appmaster.security;
import com.google.common.base.Preconditions;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation;
-import static org.apache.slider.core.main.LauncherExitCodes.EXIT_UNAUTHORIZE;
+import static org.apache.slider.core.main.LauncherExitCodes.EXIT_UNAUTHORIZED;
import org.apache.slider.common.SliderKeys;
import org.apache.slider.common.SliderXmlConfKeys;
import org.apache.slider.common.tools.SliderUtils;
@@ -64,7 +64,7 @@ public class SecurityConfiguration {
try {
loginUser = getLoginUser();
} catch (IOException e) {
- throw new SliderException(EXIT_UNAUTHORIZE, e,
+ throw new SliderException(EXIT_UNAUTHORIZED, e,
"No principal configured for the application and "
+ "exception raised during retrieval of login user. "
+ "Unable to proceed with application "
@@ -74,7 +74,7 @@ public class SecurityConfiguration {
SliderXmlConfKeys.KEY_KEYTAB_PRINCIPAL);
}
if (loginUser == null) {
- throw new SliderException(EXIT_UNAUTHORIZE,
+ throw new SliderException(EXIT_UNAUTHORIZED,
"No principal configured for the application "
+ "and no login user found. "
+ "Unable to proceed with application "
@@ -93,7 +93,7 @@ public class SecurityConfiguration {
.getComponent(SliderKeys.COMPONENT_AM)
.get(SliderXmlConfKeys.KEY_AM_LOGIN_KEYTAB_NAME);
if (SliderUtils.isSet(keytabFullPath) && SliderUtils.isSet(keytabName)) {
- throw new SliderException(EXIT_UNAUTHORIZE,
+ throw new SliderException(EXIT_UNAUTHORIZED,
"Both a keytab on the cluster host (%s) and a"
+ " keytab to be retrieved from HDFS (%s) are"
+ " specified. Please configure only one keytab"