You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/07/26 14:04:57 UTC
[GitHub] [accumulo-testing] DomGarguilo commented on a diff in pull request #212: Miscellaneous improvements to continuous code
DomGarguilo commented on code in PR #212:
URL: https://github.com/apache/accumulo-testing/pull/212#discussion_r930008733
##########
src/main/java/org/apache/accumulo/testing/continuous/ContinuousBatchWalker.java:
##########
@@ -39,34 +40,33 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.collect.Sets;
+
public class ContinuousBatchWalker {
private static final Logger log = LoggerFactory.getLogger(ContinuousBatchWalker.class);
public static void main(String[] args) throws Exception {
try (ContinuousEnv env = new ContinuousEnv(args)) {
- Authorizations auths = env.getRandomAuthorizations();
- AccumuloClient client = env.getAccumuloClient();
- Scanner scanner = ContinuousUtil.createScanner(client, env.getAccumuloTableName(), auths);
- int scanBatchSize = Integer.parseInt(env.getTestProperty(TestProps.CI_BW_BATCH_SIZE));
- scanner.setBatchSize(scanBatchSize);
-
- Random r = new Random();
-
- while (true) {
- BatchScanner bs = client.createBatchScanner(env.getAccumuloTableName(), auths);
- Set<Text> batch = getBatch(scanner, env.getRowMin(), env.getRowMax(), scanBatchSize, r);
- List<Range> ranges = new ArrayList<>(batch.size());
+ Authorizations auths = env.getRandomAuthorizations();
- for (Text row : batch) {
- ranges.add(new Range(row));
+ try (AccumuloClient client = env.getAccumuloClient();
Review Comment:
Looks like it will be reused as long as its not null, but `env` is probably cleaned up before it can be reused anyways
https://github.com/apache/accumulo-testing/blob/135d37dcfe8927054778ef4a5702f731e4fb21fd/src/main/java/org/apache/accumulo/testing/TestEnv.java#L172-L177
--
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-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org