NihalJain commented on code in PR #6249:
URL: https://github.com/apache/hbase/pull/6249#discussion_r1762863142


##########
hbase-common/src/test/java/org/apache/hadoop/hbase/util/RandomDistributionCopy.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * 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.util;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Random;
+
+/**
+ * A class that generates random numbers that follow some distribution.
+ * <p>
+ * Copied from <a 
href="https://issues.apache.org/jira/browse/HADOOP-3315";>hadoop-3315 tfile</a>.
+ * Remove after tfile is committed and use the tfile version of this class 
instead.
+ * </p>
+ */
+public class RandomDistributionCopy {

Review Comment:
   Hey @stoty Thanks for having a look at the PR. 
   
   > Do we need two copies of this class ? Can't we just move this from 
hbase-compression to hbase-common with the same name ?
   
   These files are not supposed to be bundled and are here only for draft 
change. please see previous comment where I have captured a summary of changes: 
https://github.com/apache/hbase/pull/6249#issuecomment-2353798881
   
   See
   > Created a copy just to bring out the all the usages of the class to help 
decide (based on references) where we move this in final patch:
   RandomDistribution
   KeyProviderForTesting
   LoadTestKVGenerator
   
   Also see
   
   > Deal with copied classes which have cyclic dependencies and remove all 
copies and its references
   Should we copy these to main of hbase-server or hbase-common?
   
   I have created copy to show case how these files are being used across the 
project. Just want to discuss if it is fine to move these files to proper 
module, outside hbase-diagnostics to resolve cyclic dependncies of usage or is 
it fine to copy them retaining the test copies where ever they are, if possible 
and avoid copying. 
   



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