MCPcopy Create free account
hub / github.com/apache/storm / getHdfsKeytab

Method getHdfsKeytab

storm-client/src/jvm/org/apache/storm/Config.java:2464–2484  ·  view source on GitHub ↗

Get the hdfs keytab. @param conf the storm Configuration @return the keytab

(Map<String, Object> conf)

Source from the content-addressed store, hash-verified

2462 * @return the keytab
2463 */
2464 public static String getHdfsKeytab(Map<String, Object> conf) {
2465 String ret;
2466
2467 String blobstoreKeyTab = (String) conf.get(Config.BLOBSTORE_HDFS_KEYTAB);
2468 String hdfsKeyTab = (String) conf.get(Config.STORM_HDFS_LOGIN_KEYTAB);
2469 if (blobstoreKeyTab == null && hdfsKeyTab == null) {
2470 return null;
2471 } else if (blobstoreKeyTab == null) {
2472 ret = hdfsKeyTab;
2473 } else if (hdfsKeyTab == null) {
2474 LOG.warn("{} is used as the hdfs keytab. Please use {} instead",
2475 Config.BLOBSTORE_HDFS_KEYTAB, Config.STORM_HDFS_LOGIN_KEYTAB);
2476 ret = blobstoreKeyTab;
2477 } else {
2478 //both not null;
2479 LOG.warn("Both {} and {} are set. Use {} only.",
2480 Config.BLOBSTORE_HDFS_KEYTAB, Config.STORM_HDFS_LOGIN_KEYTAB, Config.STORM_HDFS_LOGIN_KEYTAB);
2481 ret = hdfsKeyTab;
2482 }
2483 return ret;
2484 }
2485
2486}

Callers 1

loginHadoopMethod · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected