milleruntime commented on code in PR #2767: URL: https://github.com/apache/accumulo/pull/2767#discussion_r903501263
########## server/base/src/main/java/org/apache/accumulo/server/gc/AllVolumesDirectory.java: ########## @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.accumulo.server.gc; + +import static org.apache.accumulo.server.gc.GcVolumeUtil.ALL_VOLUMES_PREFIX; + +import java.util.Objects; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.data.TableId; +import org.apache.accumulo.core.gc.ReferenceDirectory; +import org.apache.accumulo.core.metadata.schema.MetadataSchema; +import org.apache.hadoop.fs.Path; + +/** + * A specially encoded GC Reference to a directory with the {@link GcVolumeUtil#ALL_VOLUMES_PREFIX} + */ +public class AllVolumesDirectory extends ReferenceDirectory { Review Comment: > Seems that GCRun.getReferences() will never return this type. That is correct. I had created ReferenceFile to represent Files and ReferenceDirectory to represent Directories for the GC Algorithm getReferences() method. Then I wanted a type for the new special ALL_VOLUMES_PREFIX Type and figured since it is a directory to make it extend ReferenceDirectory. The TabletGroupWatcher uses the ReferenceFile type to gather up the deletes during a merge here: https://github.com/milleruntime/accumulo/blob/4818a62962c1186d313072eeb14aa0345f10f50b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java#L639 It might make more sense to make AllVolumesDirectory extend ReferenceFile, the same way ReferenceDirectory does. -- 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]
