You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2019/11/29 08:48:05 UTC

[GitHub] [submarine] adamantal commented on a change in pull request #63: SUBMARINE-261. Add exception class in module common utils.

adamantal commented on a change in pull request #63: SUBMARINE-261. Add exception class in module common utils.
URL: https://github.com/apache/submarine/pull/63#discussion_r352028119
 
 

 ##########
 File path: submarine-client/src/main/java/org/apache/submarine/client/cli/CliUtils.java
 ##########
 @@ -89,24 +89,24 @@ public static void doLoginIfSecure(String keytab, String principal) throws
 
     if (StringUtils.isEmpty(keytab) || StringUtils.isEmpty(principal)) {
       if (StringUtils.isNotEmpty(keytab)) {
-        SubmarineRuntimeException e = new SubmarineRuntimeException("The " +
-            "parameter of " + CliConstants.PRINCIPAL + " is missing.");
+        SubmarineCliRuntimeException e = new SubmarineCliRuntimeException(
+            "The parameter of " + CliConstants.PRINCIPAL + " is missing.");
         LOG.error(e.getMessage(), e);
         throw e;
       }
 
       if (StringUtils.isNotEmpty(principal)) {
-        SubmarineRuntimeException e = new SubmarineRuntimeException("The " +
-            "parameter of " + CliConstants.KEYTAB + " is missing.");
+        SubmarineCliRuntimeException e = new SubmarineCliRuntimeException(
+            "The parameter of " + CliConstants.KEYTAB + " is missing.");
         LOG.error(e.getMessage(), e);
         throw e;
       }
 
       UserGroupInformation user = UserGroupInformation.getCurrentUser();
       if (user == null || user.getAuthenticationMethod() ==
           UserGroupInformation.AuthenticationMethod.SIMPLE) {
-        SubmarineRuntimeException e = new SubmarineRuntimeException("Failed " +
-            "to authenticate in secure environment. Please run kinit " +
+        SubmarineCliRuntimeException e = new SubmarineCliRuntimeException(
+            "Failed to authenticate in secure environment. Please run kinit " +
             "command in advance or use " + "--" + CliConstants.KEYTAB + "/--" + CliConstants.PRINCIPAL +
 
 Review comment:
   ```suggestion
               "command in advance or use " + "--" + CliConstants.KEYTAB + " or --" + CliConstants.PRINCIPAL +
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org