stoty commented on code in PR #6258:
URL: https://github.com/apache/hbase/pull/6258#discussion_r1764434044


##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java:
##########
@@ -554,18 +554,43 @@ private byte[][] generateRandomStartKeys(int numKeys) {
     // first region start key is always empty
     ret[0] = HConstants.EMPTY_BYTE_ARRAY;
     for (int i = 1; i < numKeys; i++) {
-      ret[i] =
-        PerformanceEvaluation.generateData(random, 
PerformanceEvaluation.DEFAULT_VALUE_LENGTH);
+      ret[i] = generateData(random, DEFAULT_VALUE_LENGTH);
     }
     return ret;
   }
 
+  /*

Review Comment:
   This is trivial enough that duplicating it is no big deal, but maybe we 
could move this to LoadTestUtil (if we move that to hbase-commons)



##########
hbase-it/pom.xml:
##########
@@ -106,6 +106,17 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>

Review Comment:
   Unless the its run the diagnostics tools explicitly, it would be better to 
avoid this dependency.



##########
hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/security/HBaseKerberosUtils.java:
##########
@@ -172,23 +170,6 @@ public static void 
setSSLConfiguration(HBaseCommonTestingUtil utility, Class<?>
     KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(), 
sslConfDir, conf, false);
   }
 
-  public static UserGroupInformation loginAndReturnUGI(Configuration conf, 
String username)

Review Comment:
   It's not clear to me why HBaseKerberosUtils in in the hbase-asyncfs module 
in the first place.
   
   IMO we should consider moving the whole class to hbase-commons. (not 
necessarily in this ticket)



##########
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/master/balancer/LoadBalancerPerformanceEvaluation.java:
##########
@@ -177,7 +175,7 @@ protected int doWork() throws Exception {
 
   public static void main(String[] args) throws IOException {
     LoadBalancerPerformanceEvaluation tool = new 
LoadBalancerPerformanceEvaluation();
-    tool.setConf(UTIL.getConfiguration());
+    tool.setConf(HBaseConfiguration.create());

Review Comment:
   Effectively the same, but since this not a test, this makes more sense



##########
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/util/LoadTestUtil.java:
##########
@@ -0,0 +1,196 @@
+/*
+ * 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.io.IOException;
+import java.util.Arrays;
+import java.util.Locale;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.MasterNotRunningException;
+import org.apache.hadoop.hbase.TableExistsException;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.Durability;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
+import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@InterfaceAudience.Private
+public class LoadTestUtil {

Review Comment:
   Some of these methods are used outside of the new module.
   
   I don't think anything should depend on hbase-diagnostics, I think this 
class should be in hbase-commons.
   
   



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to