DomGarguilo opened a new pull request, #4790:
URL: https://github.com/apache/accumulo/pull/4790

   Fixes #4753
   
   The changes in this PR were closely modeled after the changes in #4207
   
   This PR:
   #### moves some of the logic out of the GarbageCollectWriteAheadLogs 
constructor and into separate methods
   These new methods are `createWalStateManager()` and `createStore()`. Moving 
this logic into separate methods allows us to override these methods for 
testing. It also makes it easier to construct the collection of 
`TabletLocationState` that is used in the `collect()` method.
   #### Creates TabletStateStore.stream()
   This new method returns a `Stream<TabletLocationState>` that is created off 
of the `ClosableIterator<TabletLocationState> iterator()`. The goal of this PR 
is to make sure that these `ClosableIterator<TabletLocationState>` objects are 
closed so the stream adds an `onClose()` for this.
   
   This stream method lets us more easily concatonate and then close multple 
streams of `TabletLocationState` that are returned in 
`GarbageCollectWriteAheadLogs.createStore()`.
   #### Adds a `AtomicBoolean hasCollected` to ensure that 
`GarbageCollectWriteAheadLogs.collect()` is only ever called once.
   
   This is important because the resources will be closed after they are read.
   
   


-- 
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]

Reply via email to