arp7 commented on a change in pull request #703: HDDS-1371. Download RocksDB checkpoint from OM Leader to Follower. URL: https://github.com/apache/hadoop/pull/703#discussion_r274153802
########## File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java ########## @@ -361,4 +373,149 @@ private static void addFilesToArchive(String source, File file, } } + /** + * If a OM conf is only set with key suffixed with OM Node ID, return the + * set value. + * @return null if base conf key is set, otherwise the value set for + * key suffixed with Node ID. + */ + public static String getConfSuffixedWithOMNodeId(Configuration conf, + String confKey, String omNodeId) { + String confValue = conf.getTrimmed(confKey); + if (StringUtils.isNotEmpty(confValue)) { + return null; + } + String suffixedConfKey = OmUtils.addKeySuffixes( + confKey, omNodeId); + confValue = conf.getTrimmed(suffixedConfKey); + if (StringUtils.isNotEmpty(confValue)) { + return confValue; + } + return null; + } + + public static String getHttpAddressForOMPeerNode(Configuration conf, Review comment: Can you add a javadoc here that describes the format of the returned address? Looks like it is just address:port. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org