Permalink
Browse files

Creating constants for the default kerberos principal and keytab path

  • Loading branch information...
1 parent ef5420f commit fbe6718687783a76c6be426d09d07bd3df299a20 Chinmay Soman committed Dec 7, 2012
@@ -66,7 +66,7 @@
private static final Logger logger = Logger.getLogger(HdfsFetcher.class);
private static String keytabPath = "";
- private static String kerberosPrincipal = "voldemrt";
+ private static String kerberosPrincipal = VoldemortConfig.DEFAULT_KERBEROS_PRINCIPAL;
private final Long maxBytesPerSecond, reportingIntervalBytes;
private final int bufferSize;
@@ -76,8 +76,6 @@
private long minBytesPerSecond = 0;
private DynamicThrottleLimit globalThrottleLimit = null;
private static final int NUM_RETRIES = 3;
- private String keytabLocation = "";
- private String kerberosUser = "voldemrt";
private VoldemortConfig voldemortConfig = null;
public static final String FS_DEFAULT_NAME = "fs.default.name";
@@ -57,6 +57,10 @@
public static final long REPORTING_INTERVAL_BYTES = 25 * 1024 * 1024;
public static final int DEFAULT_BUFFER_SIZE = 64 * 1024;
+ // Kerberos support for read-only fetches (constants)
+ public static String DEFAULT_KERBEROS_PRINCIPAL = "voldemrt";
+ public static String DEFAULT_KEYTAB_PATH = "/voldemrt.headless.keytab";
+
private int nodeId;
private String voldemortHome;
@@ -274,8 +278,9 @@ public VoldemortConfig(Props props) {
DEFAULT_BUFFER_SIZE);
this.readOnlyKeytabPath = props.getString("readonly.keytab.path",
this.metadataDirectory
- + "/voldemrt.headless.keytab");
- this.readOnlyKerberosUser = props.getString("readonly.kerberos.user", "voldemrt");
+ + VoldemortConfig.DEFAULT_KEYTAB_PATH);
+ this.readOnlyKerberosUser = props.getString("readonly.kerberos.user",
+ VoldemortConfig.DEFAULT_KERBEROS_PRINCIPAL);
this.setHadoopConfigPath(props.getString("readonly.hadoop.config.path",
this.metadataDirectory + "/hadoop-conf"));

0 comments on commit fbe6718

Please sign in to comment.