Permalink
Browse files

Correcting usage: proxyUser to kerberosUser

  • Loading branch information...
1 parent 78a41c4 commit d74b6784f611d8036ea8118c5202859225768336 Chinmay Soman committed Sep 6, 2012
View
22 contrib/hadoop-store-builder/src/java/voldemort/store/readonly/fetcher/HdfsFetcher.java
@@ -74,7 +74,7 @@
private long minBytesPerSecond = 0;
private DynamicThrottleLimit globalThrottleLimit = null;
private String keytabLocation = "";
- private String proxyUser = "voldemrt";
+ private String kerberosUser = "voldemrt";
private VoldemortConfig voldemortConfig = null;
public HdfsFetcher(VoldemortConfig config) {
@@ -96,7 +96,7 @@ public HdfsFetcher(VoldemortConfig config, DynamicThrottleLimit dynThrottleLimit
config.getFetcherBufferSize(),
config.getMinBytesPerSecond(),
config.getReadOnlyKeytabPath(),
- config.getReadOnlyKerberosProxyUser());
+ config.getReadOnlyKerberosUser());
this.voldemortConfig = config;
@@ -121,7 +121,7 @@ public HdfsFetcher(DynamicThrottleLimit dynThrottleLimit,
int bufferSize,
long minBytesPerSecond,
String keytabLocation,
- String proxyUser) {
+ String kerberosUser) {
if(maxBytesPerSecond != null) {
this.maxBytesPerSecond = maxBytesPerSecond;
this.throttler = new EventThrottler(this.maxBytesPerSecond);
@@ -138,7 +138,7 @@ public HdfsFetcher(DynamicThrottleLimit dynThrottleLimit,
this.status = null;
this.minBytesPerSecond = minBytesPerSecond;
this.keytabLocation = keytabLocation;
- this.proxyUser = proxyUser;
+ this.kerberosUser = kerberosUser;
}
public File fetch(String sourceFileUrl, String destinationFile) throws IOException {
@@ -168,9 +168,9 @@ public File fetch(String sourceFileUrl, String destinationFile) throws IOExcepti
*/
synchronized(this) {
if(this.keytabLocation.length() > 0) {
- logger.info("keytab path = " + keytabLocation + " and proxy user = "
- + proxyUser);
- UserGroupInformation.loginUserFromKeytab(proxyUser, keytabLocation);
+ logger.info("keytab path = " + keytabLocation + " and Kerberos user = "
+ + kerberosUser);
+ UserGroupInformation.loginUserFromKeytab(kerberosUser, keytabLocation);
logger.info("I've logged in and am now Doasing as "
+ UserGroupInformation.getCurrentUser().getUserName());
try {
@@ -520,11 +520,11 @@ public static void main(String[] args) throws Exception {
String url = args[0];
String keytabLocation = "";
- String proxyUser = "";
+ String kerberosUser = "";
String hadoopPath = "";
if(args.length >= 4) {
keytabLocation = args[1];
- proxyUser = args[2];
+ kerberosUser = args[2];
hadoopPath = args[3];
}
@@ -549,8 +549,8 @@ public static void main(String[] args) throws Exception {
* Otherwise get the default filesystem object.
*/
if(keytabLocation.length() > 0) {
- logger.debug("keytab path = " + keytabLocation + " and proxy user = " + proxyUser);
- UserGroupInformation.loginUserFromKeytab(proxyUser, keytabLocation);
+ logger.debug("keytab path = " + keytabLocation + " and Kerberos user = " + kerberosUser);
+ UserGroupInformation.loginUserFromKeytab(kerberosUser, keytabLocation);
logger.debug("I've logged in and am now Doasing as "
+ UserGroupInformation.getCurrentUser().getUserName());
try {
View
14 src/java/voldemort/server/VoldemortConfig.java
@@ -99,7 +99,7 @@
private long reportingIntervalBytes;
private int fetcherBufferSize;
private String readOnlyKeytabPath;
- private String readOnlyKerberosProxyUser;
+ private String readOnlyKerberosUser;
private String hadoopConfigPath;
private int coreThreads;
@@ -242,9 +242,9 @@ public VoldemortConfig(Props props) {
this.readOnlyKeytabPath = props.getString("readonly.keytab.path",
this.metadataDirectory
+ "/voldemrt.headless.keytab");
- this.readOnlyKerberosProxyUser = props.getString("readonly.kerberos.proxyuser", "voldemrt");
+ this.readOnlyKerberosUser = props.getString("readonly.kerberos.user", "voldemrt");
this.setHadoopConfigPath(props.getString("readonly.hadoop.config.path",
- this.metadataDirectory + "/hadoop-conf"));
+ this.metadataDirectory + "/hadoop-conf"));
this.mysqlUsername = props.getString("mysql.user", "root");
this.mysqlPassword = props.getString("mysql.password", "");
@@ -1181,12 +1181,12 @@ public void setReadOnlyKeytabPath(String readOnlyKeytabPath) {
this.readOnlyKeytabPath = readOnlyKeytabPath;
}
- public String getReadOnlyKerberosProxyUser() {
- return readOnlyKerberosProxyUser;
+ public String getReadOnlyKerberosUser() {
+ return readOnlyKerberosUser;
}
- public void setReadOnlyKerberosProxyUser(String readOnlyKerberosProxyUser) {
- this.readOnlyKerberosProxyUser = readOnlyKerberosProxyUser;
+ public void setReadOnlyKerberosUser(String readOnlyKerberosUser) {
+ this.readOnlyKerberosUser = readOnlyKerberosUser;
}
public String getHadoopConfigPath() {

0 comments on commit d74b678

Please sign in to comment.