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_r386274486
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobStoreCompaction.java
 ##########
 @@ -116,18 +113,17 @@ private void init(Configuration conf, long mobThreshold) 
throws Exception {
     HBaseTestingUtility UTIL = new HBaseTestingUtility(conf);
 
     compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
-    htd = UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()),
-      HColumnDescriptor.DEFAULT_MIN_VERSIONS, 3, HConstants.FOREVER,
-      HColumnDescriptor.DEFAULT_KEEP_DELETED);
-    hcd = new HColumnDescriptor(COLUMN_FAMILY);
-    hcd.setMobEnabled(true);
-    hcd.setMobThreshold(mobThreshold);
-    hcd.setMaxVersions(1);
-    htd.modifyFamily(hcd);
-
-    RegionInfo regionInfo = 
RegionInfoBuilder.newBuilder(htd.getTableName()).build();
-    region = HBaseTestingUtility
-        .createRegionAndWAL(regionInfo, UTIL.getDataTestDir(), conf, htd, new 
MobFileCache(conf));
+    tableDescriptor = 
UTIL.createModifyableTableDescriptor(name.getMethodName());
+    familyDescriptor =
+      new 
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor(COLUMN_FAMILY);
+    familyDescriptor.setMobEnabled(true);
 
 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