[
https://issues.apache.org/jira/browse/DRILL-6332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16995602#comment-16995602
]
ASF GitHub Bot commented on DRILL-6332:
---------------------------------------
arina-ielchiieva commented on pull request #1931: DRILL-6332: Allow to provide
two-component Kerberos principals
URL: https://github.com/apache/drill/pull/1931#discussion_r357633489
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/BootStrapContext.java
##########
@@ -135,10 +135,11 @@ private void login(final DrillConfig config) throws
DrillbitStartupException {
final String parts[] = KerberosUtil.splitPrincipalIntoParts(principal);
if (parts.length != 3) {
throw new DrillbitStartupException(
- String.format("Invalid %s, Drill service principal must be of
format: primary/instance@REALM",
- ExecConstants.SERVICE_PRINCIPAL));
+ String.format("Invalid %s, Drill service principal must be of
format 'primary/instance@REALM' or 'primary@REALM'",
+ ExecConstants.SERVICE_PRINCIPAL));
}
- parts[1] = KerberosUtil.canonicalizeInstanceName(parts[1], hostName);
+
+ parts[1] = (parts[1] == "")? "":
KerberosUtil.canonicalizeInstanceName(parts[1], hostName);
Review comment:
```suggestion
parts[1] = (parts[1] == "") ? "" :
KerberosUtil.canonicalizeInstanceName(parts[1], hostName);
```
----------------------------------------------------------------
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:
[email protected]
> DrillbitStartupException: Failure while initializing values in Drillbit
> -----------------------------------------------------------------------
>
> Key: DRILL-6332
> URL: https://issues.apache.org/jira/browse/DRILL-6332
> Project: Apache Drill
> Issue Type: Improvement
> Components: Server
> Affects Versions: 1.10.0
> Reporter: Hari Sekhon
> Priority: Major
> Attachments: 01.patch
>
>
> Improvement request to make this error more specific so we can tell what is
> causing it:
> {code:java}
> ==> /opt/mapr/drill/drill-1.10.0/logs/drillbit.out <==
> Exception in thread "main"
> org.apache.drill.exec.exception.DrillbitStartupException: Failure while
> initializing values in Drillbit.
> at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:287)
> at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:271)
> at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:267)
> Caused by: java.lang.IllegalStateException
> at com.google.common.base.Preconditions.checkState(Preconditions.java:158)
> at
> org.apache.drill.common.KerberosUtil.splitPrincipalIntoParts(KerberosUtil.java:59)
> at
> org.apache.drill.exec.server.BootStrapContext.login(BootStrapContext.java:130)
> at
> org.apache.drill.exec.server.BootStrapContext.<init>(BootStrapContext.java:77)
> at org.apache.drill.exec.server.Drillbit.<init>(Drillbit.java:94)
> at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:285)
> ... 2 more
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)