keith-turner commented on a change in pull request #1762:
URL: https://github.com/apache/accumulo/pull/1762#discussion_r516354998



##########
File path: 
core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java
##########
@@ -144,6 +144,13 @@ default void putGcCandidates(TableId tableId, 
Collection<StoredTabletFile> candi
     throw new UnsupportedOperationException();
   }
 
+  /**
+   * Unlike {@link #putGcCandidates(TableId, Collection)} this takes file and 
dir GC candidates.
+   */
+  default void putGcFdCandidates(TableId tableId, Collection<String> 
candidates) {
+    throw new UnsupportedOperationException();
+  }
+

Review comment:
       Yeah Fd meant file and dirs.  I can change it to FileOrDirs.  The 
existing method is more strongly typed, so it probably does not need File in 
the name.

##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java
##########
@@ -126,6 +127,25 @@ public void putGcCandidates(TableId tableId, 
Collection<StoredTabletFile> candid
     }
   }
 
+  @Override
+  public void putGcFdCandidates(TableId tableId, Collection<String> 
candidates) {
+
+    if (RootTable.ID.equals(tableId)) {
+      // Directories are unexpected for the root tablet, so convert to stored 
tablet file
+      mutateRootGcCandidates(
+          rgcc -> rgcc.add(Collections2.transform(candidates, 
StoredTabletFile::new)));

Review comment:
       I changed this in d259836 to use streams.  Made the method take an 
iterator instead of a collection. This allowed streams to be used w/o copying 
to a new collection like the Guava code and its still short.

##########
File path: 
core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java
##########
@@ -144,6 +144,13 @@ default void putGcCandidates(TableId tableId, 
Collection<StoredTabletFile> candi
     throw new UnsupportedOperationException();
   }
 
+  /**
+   * Unlike {@link #putGcCandidates(TableId, Collection)} this takes file and 
dir GC candidates.
+   */
+  default void putGcFdCandidates(TableId tableId, Collection<String> 
candidates) {
+    throw new UnsupportedOperationException();
+  }
+

Review comment:
       
   I changed the name in d259836




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to