ctubbsii commented on a change in pull request #1656:
URL: https://github.com/apache/accumulo/pull/1656#discussion_r472196668
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
##########
@@ -175,11 +175,17 @@ public void run() {
Map<Path,Integer> failureCount = new TreeMap<>();
- for (Entry<Path,List<KeyExtent>> entry : assignmentFailures.entrySet())
- failureCount.put(entry.getKey(), 1);
+ int retries =
context.getConfiguration().getCount(Property.TSERV_BULK_RETRY);
+ if (retries == 0) {
+ log.warn("Retries set to 0. All failed map file assignments will not
be retried.");
+ completeFailures.putAll(assignmentFailures);
+ } else {
+ for (Entry<Path,List<KeyExtent>> entry : assignmentFailures.entrySet())
+ failureCount.put(entry.getKey(), 1);
+ }
long sleepTime = 2 * 1000;
- while (!assignmentFailures.isEmpty()) {
+ while (!assignmentFailures.isEmpty() && retries > 0) {
Review comment:
Rather than have this additional check for retries here, I think it
makes more sense to put this entire block inside the else statement above. Yes,
it makes the diff bigger, but it's easy to ignore indentation changes when
reviewing a diff.
----------------------------------------------------------------
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]