milleruntime commented on a change in pull request #2214:
URL: https://github.com/apache/accumulo/pull/2214#discussion_r677525750



##########
File path: 
server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionEnvironment.java
##########
@@ -40,19 +39,10 @@
 public interface GarbageCollectionEnvironment {
 
   /**
-   * Return a list of paths to files and dirs which are candidates for 
deletion from a given table,
-   * {@link RootTable#NAME} or {@link MetadataTable#NAME}
-   *
-   * @param continuePoint
-   *          A row to resume from if a previous invocation was stopped due to 
finding an extremely
-   *          large number of candidates to remove which would have exceeded 
memory limitations
-   * @param candidates
-   *          A collection of candidates files for deletion, may not be the 
complete collection of
-   *          files for deletion at this point in time
-   * @return true if the results are short due to insufficient memory, 
otherwise false
+   * Process all possible deletion candidates for a given table, deleting 
candidates that meet all
+   * necessary conditions.
    */
-  boolean getCandidates(String continuePoint, List<String> candidates)
-      throws TableNotFoundException;
+  void processCandidates() throws TableNotFoundException, IOException;

Review comment:
       My concern is creating more complexity in code that is already overly 
complex. If we are going to change the interface, lets design it in a way that 
reduces complexity. It appears that the GC interfaces were done so users could 
potentially write their own but I don't think that ever happened. This then 
makes me think that if we want to make the GC pluggable, lets do it right 
(either as a part of the SPI or API). But this seems like much too daunting of 
a task and I don't think there is much for users to gain by writing their own. 
That brings me to the idea that we should at least refactor the GC to make it 
more readable and maintainable.
   
   Unfortunately, I don't have a suggestion on how that could be done for just 
these few methods. I would have to spend a lot more time looking at the GC.




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