keith-turner commented on code in PR #4129: URL: https://github.com/apache/accumulo/pull/4129#discussion_r1442926694
########## core/src/main/java/org/apache/accumulo/core/fate/accumulo/AccumuloStore.java: ########## @@ -70,12 +71,22 @@ public long create() { } @Override - protected List<String> getTransactions() { - return scanTx(scanner -> { + protected Stream<FateIdStatus> getTransactions() { + try { + Scanner scanner = context.createScanner(tableName, Authorizations.EMPTY); scanner.setRange(new Range()); TxColumnFamily.STATUS_COLUMN.fetch(scanner); - return scanner.stream().map(e -> e.getKey().getRow().toString()).collect(Collectors.toList()); - }); + return scanner.stream().onClose(scanner::close).map(e -> { + return new FateIdStatus(parseTid(e.getKey().getRow().toString())) { + @Override + public TStatus getStatus() { + return TStatus.valueOf(e.getValue().toString()); + } + }; + }); Review Comment: I tried removing the code block when writing and thought it was just too much going on on a single line. Decided to add the code block back so that the lambda declaration and anonymous class declaration were on separate lines. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org