keith-turner commented on code in PR #4228:
URL: https://github.com/apache/accumulo/pull/4228#discussion_r1478992285


##########
server/manager/src/test/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImportTest.java:
##########
@@ -129,8 +129,7 @@ public void close() {
         .map(Text::toString).orElse(null);
 
     try (LoadMappingIterator lmi = createLoadMappingIter(loadRanges)) {
-      var extent =
-          PrepBulkImport.validateLoadMapping("1", lmi, tabletIterFactory, 
maxTablets, 10001);
+      var extent = PrepBulkImport.validateLoadMapping("1", lmi, 
tabletIterFactory, maxTablets);

Review Comment:
   Was `10001` just an unused method parameter?  I thought I saw another place 
in the code where it was remove in the review.



##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/Utils.java:
##########
@@ -132,39 +131,38 @@ public static long reserveNamespace(Manager env, 
NamespaceId namespaceId, long i
               TableOperationExceptionType.NAMESPACE_NOTFOUND, "Namespace does 
not exist");
         }
       }
-      log.info("namespace {} {} locked for {} operation: {}", namespaceId, 
FateTxId.formatTid(id),
+      log.info("namespace {} {} locked for {} operation: {}", namespaceId, 
fateId,
           (writeLock ? "write" : "read"), op);
       return 0;
     } else {
       return 100;
     }
   }
 
-  public static long reserveHdfsDirectory(Manager env, String directory, long 
tid)
+  public static long reserveHdfsDirectory(Manager env, String directory, 
FateId fateId)
       throws KeeperException, InterruptedException {
     String resvPath = env.getContext().getZooKeeperRoot() + 
Constants.ZHDFS_RESERVATIONS + "/"
         + Base64.getEncoder().encodeToString(directory.getBytes(UTF_8));
 
     ZooReaderWriter zk = env.getContext().getZooReaderWriter();
 
-    if (ZooReservation.attempt(zk, resvPath, FastFormat.toHexString(tid), "")) 
{
+    if (ZooReservation.attempt(zk, resvPath, fateId.getHexTid(), "")) {

Review Comment:
   ```suggestion
      // ELASTICITY_TODO DEFERRED - ISSUE 4044 .. should the full FateId be 
passed below?
       if (ZooReservation.attempt(zk, resvPath, fateId.getHexTid(), "")) {
   ```



##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/Utils.java:
##########
@@ -132,39 +131,38 @@ public static long reserveNamespace(Manager env, 
NamespaceId namespaceId, long i
               TableOperationExceptionType.NAMESPACE_NOTFOUND, "Namespace does 
not exist");
         }
       }
-      log.info("namespace {} {} locked for {} operation: {}", namespaceId, 
FateTxId.formatTid(id),
+      log.info("namespace {} {} locked for {} operation: {}", namespaceId, 
fateId,
           (writeLock ? "write" : "read"), op);
       return 0;
     } else {
       return 100;
     }
   }
 
-  public static long reserveHdfsDirectory(Manager env, String directory, long 
tid)
+  public static long reserveHdfsDirectory(Manager env, String directory, 
FateId fateId)
       throws KeeperException, InterruptedException {
     String resvPath = env.getContext().getZooKeeperRoot() + 
Constants.ZHDFS_RESERVATIONS + "/"
         + Base64.getEncoder().encodeToString(directory.getBytes(UTF_8));
 
     ZooReaderWriter zk = env.getContext().getZooReaderWriter();
 
-    if (ZooReservation.attempt(zk, resvPath, FastFormat.toHexString(tid), "")) 
{
+    if (ZooReservation.attempt(zk, resvPath, fateId.getHexTid(), "")) {
       return 0;
     } else {
       return 50;
     }
   }
 
-  public static void unreserveHdfsDirectory(Manager env, String directory, 
long tid)
+  public static void unreserveHdfsDirectory(Manager env, String directory, 
FateId fateId)
       throws KeeperException, InterruptedException {
     String resvPath = env.getContext().getZooKeeperRoot() + 
Constants.ZHDFS_RESERVATIONS + "/"
         + Base64.getEncoder().encodeToString(directory.getBytes(UTF_8));
-    ZooReservation.release(env.getContext().getZooReaderWriter(), resvPath,
-        FastFormat.toHexString(tid));
+    ZooReservation.release(env.getContext().getZooReaderWriter(), resvPath, 
fateId.getHexTid());
   }
 
-  private static Lock getLock(ServerContext context, AbstractId<?> id, long 
tid,
+  private static Lock getLock(ServerContext context, AbstractId<?> id, FateId 
fateId,
       boolean writeLock) {
-    byte[] lockData = FastFormat.toZeroPaddedHex(tid);
+    byte[] lockData = fateId.getHexTid().getBytes(UTF_8);

Review Comment:
   ```suggestion
       // ELASTICITY_TODO DEFERRED - ISSUE 4044 ... should lock data use full 
FateId?
       byte[] lockData = fateId.getHexTid().getBytes(UTF_8);
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to