Apache9 commented on code in PR #6947:
URL: https://github.com/apache/hbase/pull/6947#discussion_r2176637703


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotRegionSizeCalculator.java:
##########
@@ -0,0 +1,81 @@
+/*
+ * 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
+ *
+ *     http://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.hadoop.hbase.snapshot;
+
+import java.io.IOException;
+import java.util.Map;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.snapshot.SnapshotInfo.SnapshotStats;
+import org.apache.hadoop.hbase.util.CommonFSUtils;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos;
+
+/**
+ * Utility class to calculate the size of each region in a snapshot.
+ */
[email protected]
+public class SnapshotRegionSizeCalculator {

Review Comment:
   For me, I would like to make this class a utility class, i.e, only have 
static method for calculating the regions sizes, and then return a data 
structure class as the result, for example, maybe we can call it RegionSizes, 
and inside the RegionSizes class, we have a map to store the size for each 
region.



##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java:
##########
@@ -94,12 +93,6 @@ public 
TableSnapshotRegionSplit(TableSnapshotInputFormatImpl.InputSplit delegate
       this.delegate = delegate;
     }
 
-    public TableSnapshotRegionSplit(TableDescriptor htd, RegionInfo regionInfo,

Review Comment:
   The class is marked as IA.Public, so you can not delete a public method from 
it directly. You need to make it deprecated for a whole major release cycle 
before deleteing.



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