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

   This PR is meant to delete the `ReferenceDirectory` class which was used by 
3 files: `GarbageCollectionAlgorithm`, `GCRun`, and  `GarbageCollectionTest`. 
Upon deleting the class, its usages were replaced with `forDirectory()`, a 
static named constructor in `ReferenceFile` which maintains the functionality 
from previous `ReferenceDirectory` objects.
   
   The following files have been modified:
   - `core/src/main/java/org/apache/accumulo/core/gc/ReferenceDirectory.java`: 
Deleted.
   - `core/src/main/java/org/apache/accumulo/core/gc/ReferenceFile.java`:  
Create `forDirectory()` method, a static named constructor to replace the 
functionality of previous `ReferenceDirectory` objects. Functionality included:
     - Creates a `ReferenceFile` object
     - Sets `isDirectory = True`
     - Checks `validateDirCol` for the directory name in argument
     - Omitted functionality: Overridden `getMetadataEntry()` method from 
`ReferenceDirectory` previously checked that `tabletDir == metadataEntry`. This 
is an unnecessary check because the only way to modify those variables would be 
through the constructor. Omitted from this PR.
   - `server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java`,
     
`server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java`,
 and
     `server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java`
     have each had their previous references to `ReferenceDirectory` replaced 
with new `forDirectory` constructor and related components.
   
   Resolves: #4724 "Replace ReferenceDirectory class with static constructor"


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