HorizonNet commented on a change in pull request #1222: HBASE-23868 : Replace 
usages of HColumnDescriptor(byte [] familyName)…
URL: https://github.com/apache/hbase/pull/1222#discussion_r386274757
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 ##########
 @@ -301,15 +299,18 @@ private void initHRegion (byte [] tableName, String 
callingMethod,
   private void initHRegion (byte [] tableName, String callingMethod, int [] 
maxVersions,
     byte[] ... families)
   throws IOException {
-    HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(tableName));
+    TableDescriptorBuilder.ModifyableTableDescriptor tableDescriptor =
+      new 
TableDescriptorBuilder.ModifyableTableDescriptor(TableName.valueOf(tableName));
+
     int i=0;
     for(byte [] family : families) {
-      HColumnDescriptor hcd = new HColumnDescriptor(family);
-      hcd.setMaxVersions(maxVersions != null ? maxVersions[i++] : 1);
-      htd.addFamily(hcd);
+      ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor 
familyDescriptor =
+        new 
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor(family);
+      familyDescriptor.setMaxVersions(maxVersions != null ? maxVersions[i++] : 
1);
 
 Review comment:
   Use the builder.

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


With regards,
Apache Git Services

Reply via email to