Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2808#discussion_r211073836
--- Diff: storm-client/src/jvm/org/apache/storm/Config.java ---
@@ -1884,4 +1888,11 @@ public void setTopologyStrategy(String strategy) {
this.put(Config.TOPOLOGY_SCHEDULER_STRATEGY, strategy);
}
+ public static String getBlobstoreHDFSPrincipal(Map conf) throws
UnknownHostException {
+ String principal =
(String)conf.get(Config.BLOBSTORE_HDFS_PRINCIPAL);
+ if (principal != null) {
+ principal = principal.replace("HOSTNAME",
Utils.localHostname());
--- End diff --
Hadoop picks `_HOST` as placeholder and it would have less change to be
conflicted. So if we have no better reason to use alternative, using `_HOST`
would be better to me.
Also I would feel more safer if we could try to parse principal and only
replace placeholder when host part in principal is just a placeholder. So
`_HOST` in `yarn/[email protected]` can be substituted, but both `_HOST` in
`yarn/[email protected]` and `_HOST` in `_HOST/[email protected]` should not
be substituted.
@revans2 Could you provide some suggestions?
---