ctubbsii commented on a change in pull request #1892:
URL: https://github.com/apache/accumulo/pull/1892#discussion_r567111353



##########
File path: 
test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
##########
@@ -65,15 +67,21 @@ protected void configure(MiniAccumuloConfigImpl cfg, 
Configuration hadoopCoreSit
   public void test() throws Exception {
     getCluster().getClusterControl().start(ServerType.MONITOR);
     try (AccumuloClient c = 
Accumulo.newClient().from(getClientProperties()).build()) {
+
+      // creating table name
       final String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, 
Property.TABLE_MAJC_RATIO.getKey(), "1");
-      // splits to slow down bulk import
+      // creating splits
       SortedSet<Text> splits = new TreeSet<>();
       for (int i = 1; i < 0xf; i++) {
         splits.add(new Text(Integer.toHexString(i)));
       }

Review comment:
       A lot of these loops could be converted to a nice one-(ish)-liner:
   ```java
   TreeSet<Text> splits = IntStream.range(1, 
16).mapToObj(Integer::toHexString).map(Text::new).collect(someTreeSetCollector);
   ```
   The main annoying thing is that there isn't a `Collectors.toSortedSet()`, 
like there is a `Collectors.toSet()`, so you have to write your own collector.
   
   It's probably not worth it.

##########
File path: 
test/src/main/java/org/apache/accumulo/test/functional/ConcurrentDeleteTableIT.java
##########
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 /*

Review comment:
       Duplicated license header made it in to the PR:
   
   ```suggestion
   /*
   ```

##########
File path: 
test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
##########
@@ -65,15 +67,21 @@ protected void configure(MiniAccumuloConfigImpl cfg, 
Configuration hadoopCoreSit
   public void test() throws Exception {
     getCluster().getClusterControl().start(ServerType.MONITOR);
     try (AccumuloClient c = 
Accumulo.newClient().from(getClientProperties()).build()) {
+
+      // creating table name
       final String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, 
Property.TABLE_MAJC_RATIO.getKey(), "1");
-      // splits to slow down bulk import
+      // creating splits
       SortedSet<Text> splits = new TreeSet<>();
       for (int i = 1; i < 0xf; i++) {
         splits.add(new Text(Integer.toHexString(i)));
       }
-      c.tableOperations().addSplits(tableName, splits);
+      // creating properties
+      HashMap<String,String> props = new HashMap<>();
+      props.put(Property.TABLE_MAJC_RATIO.getKey(), "1");
+      // creating table with configuration
+      NewTableConfiguration ntc =
+          new NewTableConfiguration().setProperties(props).withSplits(splits);

Review comment:
       ```suggestion
         var ntc = new 
NewTableConfiguration().setProperties(props).withSplits(splits);
   ```




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