-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
605 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#Build Number for ANT. Do not edit! | ||
#Mon Nov 10 10:43:12 KST 2014 | ||
build.number=334 | ||
#Thu Nov 20 17:11:32 KST 2014 | ||
build.number=359 |
30 changes: 30 additions & 0 deletions
30
RHive/inst/javasrc/src/com/nexr/rhive/hadoop/AuthUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nexr.rhive.hadoop; | ||
|
||
import org.apache.commons.lang.StringUtils; | ||
import org.apache.hadoop.conf.Configuration; | ||
import org.apache.hadoop.security.UserGroupInformation; | ||
|
||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
/** | ||
* Created by bruceshin on 11/19/14. | ||
*/ | ||
public class AuthUtils { | ||
|
||
public static void loginUserFromKeytab(Properties properties, String service) throws IOException{ | ||
|
||
String principal = properties.getProperty(service + ".principal"); | ||
String keytab = properties.getProperty(service + ".keytab"); | ||
|
||
if(StringUtils.isEmpty(principal) || StringUtils.isEmpty(keytab)){ | ||
return; | ||
} | ||
|
||
UserGroupInformation.loginUserFromKeytab(principal, keytab); | ||
} | ||
|
||
public static void setConfigurationUserGroup(Configuration conf){ | ||
UserGroupInformation.setConfiguration(conf); | ||
} | ||
} |
Oops, something went wrong.
191e16e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the code for kerberos has been merged here. It will be nice if there is a summarization about how to actually connect to HS2 when there is kerberos authentication.
191e16e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the following: