This is an automated email from the ASF dual-hosted git repository. cshannon pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push: new 972ab250d9 removes 'tx_' prefix from UserFateStore (#4408) 972ab250d9 is described below commit 972ab250d9ee34337d66f03003eb56c603a080e4 Author: Kevin Rathbun <43969518+kevinrr...@users.noreply.github.com> AuthorDate: Fri Mar 22 07:33:26 2024 -0400 removes 'tx_' prefix from UserFateStore (#4408) --- core/src/main/java/org/apache/accumulo/core/fate/MetaFateStore.java | 4 ++-- .../main/java/org/apache/accumulo/core/fate/user/UserFateStore.java | 6 +++--- .../main/java/org/apache/accumulo/test/fate/user/UserFateIT.java | 2 +- .../java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/fate/MetaFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/MetaFateStore.java index 70f93211a4..d8cecd6a47 100644 --- a/core/src/main/java/org/apache/accumulo/core/fate/MetaFateStore.java +++ b/core/src/main/java/org/apache/accumulo/core/fate/MetaFateStore.java @@ -359,8 +359,8 @@ public class MetaFateStore<T> extends AbstractFateStore<T> { protected Stream<FateIdStatus> getTransactions() { try { return zk.getChildren(path).stream().map(strTxid -> { - String hexTid = strTxid.split("_")[1]; - FateId fateId = FateId.from(fateInstanceType, hexTid); + String txUUIDStr = strTxid.split("_")[1]; + FateId fateId = FateId.from(fateInstanceType, txUUIDStr); // Memoizing for two reasons. First the status may never be requested, so in that case avoid // the lookup. Second, if its requested multiple times the result will always be consistent. Supplier<TStatus> statusSupplier = Suppliers.memoize(() -> _getStatus(fateId)); diff --git a/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java index 88de9e8fcf..c0e6623a93 100644 --- a/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java +++ b/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java @@ -157,8 +157,8 @@ public class UserFateStore<T> extends AbstractFateStore<T> { scanner.setRange(new Range()); TxColumnFamily.STATUS_COLUMN.fetch(scanner); return scanner.stream().onClose(scanner::close).map(e -> { - String hexTid = e.getKey().getRow().toString().split("_")[1]; - FateId fateId = FateId.from(fateInstanceType, hexTid); + String txUUIDStr = e.getKey().getRow().toString(); + FateId fateId = FateId.from(fateInstanceType, txUUIDStr); return new FateIdStatusBase(fateId) { @Override public TStatus getStatus() { @@ -248,7 +248,7 @@ public class UserFateStore<T> extends AbstractFateStore<T> { } public static String getRowId(FateId fateId) { - return "tx_" + fateId.getTxUUIDStr(); + return fateId.getTxUUIDStr(); } private FateMutatorImpl<T> newMutator(FateId fateId) { diff --git a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT.java b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT.java index 6ecbc0b5a5..4d6a8da118 100644 --- a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT.java +++ b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT.java @@ -78,6 +78,6 @@ public class UserFateIT extends FateIT { } private static Range getRow(FateId fateId) { - return new Range("tx_" + fateId.getTxUUIDStr()); + return new Range(fateId.getTxUUIDStr()); } } diff --git a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java index 8d286e9d2b..337f9e4bdc 100644 --- a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java +++ b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java @@ -258,7 +258,7 @@ public class UserFateStoreIT extends SharedMiniClusterBase { private void injectStatus(ClientContext client, String table, FateId fateId, TStatus status) throws TableNotFoundException { try (BatchWriter writer = client.createBatchWriter(table)) { - Mutation mutation = new Mutation(new Text("tx_" + fateId.getTxUUIDStr())); + Mutation mutation = new Mutation(new Text(fateId.getTxUUIDStr())); FateSchema.TxColumnFamily.STATUS_COLUMN.put(mutation, new Value(status.name())); writer.addMutation(mutation); } catch (MutationsRejectedException e) {