ctubbsii commented on a change in pull request #1803:
URL: https://github.com/apache/accumulo/pull/1803#discussion_r568160420



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/master/recovery/RecoveryPath.java
##########
@@ -50,7 +47,8 @@ public static Path getRecoveryPath(Path walPath, String 
portHost) {
 
       // drop wal
       walPath = walPath.getParent();
-      walPath = new Path(walPath, FileType.RECOVERY.getDirectory() + "-" + 
convertToSha1(portHost));
+      walPath =
+          new Path(walPath, FileType.RECOVERY.getDirectory() + "-" + 
DigestUtils.sha1Hex(portHost));

Review comment:
       I believe there's a variant of the sha256 method in DigestUtils that 
returns a hex-encoded string, that can simply be truncated directly, rather 
than using BigInteger, which shouldn't be necessary.
   
   However, I'm not sure that this hashing of a location strategy is going to 
work at all, based on the conversation above in 
https://github.com/apache/accumulo/pull/1803#discussion_r568151689




----------------------------------------------------------------
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:
[email protected]


Reply via email to