dlmarion commented on code in PR #3150:
URL: https://github.com/apache/accumulo/pull/3150#discussion_r1064561556
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java:
##########
@@ -444,16 +444,22 @@ class ScanReservation implements AutoCloseable {
private final Collection<StoredTabletFile> files;
private final long myReservationId;
private final Map<KeyExtent,TabletMetadata> tabletsMetadata;
+ private final Map<TKeyExtent,List<TRange>> failures;
- ScanReservation(Map<KeyExtent,TabletMetadata> tabletsMetadata, long
myReservationId) {
+ /* This constructor is called when starting a scan */
+ ScanReservation(Map<KeyExtent,TabletMetadata> tabletsMetadata, long
myReservationId,
+ Map<TKeyExtent,List<TRange>> failures) {
this.tabletsMetadata = tabletsMetadata;
+ this.failures = failures;
this.files = tabletsMetadata.values().stream().flatMap(tm ->
tm.getFiles().stream())
.collect(Collectors.toUnmodifiableSet());
this.myReservationId = myReservationId;
}
+ /* This constructor is called when continuing a scan */
Review Comment:
Do you mean create static methods (e.g. ScanReservation.startScan() and
ScanReservation.continueScan()), that call a private constructor and return the
ScanReservation object? I'm not sure we need that level of indirection, IMO the
comments are enough.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]