You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2024/04/06 22:14:21 UTC
[PR] updates bulk import and compaction logging [accumulo]
keith-turner opened a new pull request, #4440:
URL: https://github.com/apache/accumulo/pull/4440
(no comment)
--
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
Re: [PR] updates bulk import and compaction logging [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #4440:
URL: https://github.com/apache/accumulo/pull/4440#discussion_r1556033757
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java:
##########
@@ -283,23 +293,25 @@ long finish() {
results.values().stream().allMatch(result -> result.getStatus() == Status.ACCEPTED)
&& skipped == 0;
+ results.forEach((extent, condResult) -> {
+ if (condResult.getStatus() == Status.ACCEPTED) {
+ loadingFiles.get(extent).forEach(file -> TabletLogger.bulkImported(extent, file));
+ } else {
+ var metadata = condResult.readMetadata();
+ if (metadata == null) {
+ log.debug("Tablet update failed, tablet is gone {} {} {}", fateId, extent,
+ condResult.getStatus());
+ } else {
+ log.debug("Tablet update failed {} {} {} {} {} {}", fateId, extent,
+ condResult.getStatus(), metadata.getOperationId(), metadata.getLocation(),
+ metadata.getLoaded());
+ }
+ }
+ });
+
Review Comment:
That is a nice improvement, updated in 48b6c83
--
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
Re: [PR] updates bulk import and compaction logging [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #4440:
URL: https://github.com/apache/accumulo/pull/4440
--
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
Re: [PR] updates bulk import and compaction logging [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #4440:
URL: https://github.com/apache/accumulo/pull/4440#discussion_r1555795715
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java:
##########
@@ -283,23 +293,25 @@ long finish() {
results.values().stream().allMatch(result -> result.getStatus() == Status.ACCEPTED)
&& skipped == 0;
+ results.forEach((extent, condResult) -> {
+ if (condResult.getStatus() == Status.ACCEPTED) {
+ loadingFiles.get(extent).forEach(file -> TabletLogger.bulkImported(extent, file));
+ } else {
+ var metadata = condResult.readMetadata();
+ if (metadata == null) {
+ log.debug("Tablet update failed, tablet is gone {} {} {}", fateId, extent,
+ condResult.getStatus());
+ } else {
+ log.debug("Tablet update failed {} {} {} {} {} {}", fateId, extent,
+ condResult.getStatus(), metadata.getOperationId(), metadata.getLocation(),
+ metadata.getLoaded());
+ }
+ }
+ });
+
Review Comment:
I think you could probably get rid of the `allDone` variable and associated stream operation by just setting an AtomicBoolean to `true` in the `else` clause of the conditional below. Then after checking all results, you could return 1000 if skipped != 0 or this new boolean is true.
Something like:
```suggestion
AtomicBoolean seenFailure = new AtomicBoolean(false);
results.forEach((extent, condResult) -> {
if (condResult.getStatus() == Status.ACCEPTED) {
loadingFiles.get(extent).forEach(file -> TabletLogger.bulkImported(extent, file));
} else {
seenFailure.set(true);
var metadata = condResult.readMetadata();
if (metadata == null) {
log.debug("Tablet update failed, tablet is gone {} {} {}", fateId, extent,
condResult.getStatus());
} else {
log.debug("Tablet update failed {} {} {} {} {} {}", fateId, extent,
condResult.getStatus(), metadata.getOperationId(), metadata.getLocation(),
metadata.getLoaded());
}
}
});
if (seenFailure.get() || skipped != 0) {
return 1000;
} else {
return 0;
}
```
--
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