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_r386273681
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobStressToolRunner.java
##########
@@ -90,20 +90,21 @@ public void init(Configuration conf, long numRows) throws
IOException {
this.count = numRows;
initConf();
printConf();
- hdt = new HTableDescriptor(TableName.valueOf("testMobCompactTable"));
+ tableDescriptor = new TableDescriptorBuilder.ModifyableTableDescriptor(
+ TableName.valueOf("testMobCompactTable"));
Connection conn = ConnectionFactory.createConnection(this.conf);
this.admin = conn.getAdmin();
- this.hcd = new HColumnDescriptor(fam);
- this.hcd.setMobEnabled(true);
- this.hcd.setMobThreshold(mobLen);
- this.hcd.setMaxVersions(1);
- this.hdt.addFamily(hcd);
- if (admin.tableExists(hdt.getTableName())) {
- admin.disableTable(hdt.getTableName());
- admin.deleteTable(hdt.getTableName());
+ this.familyDescriptor = new
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor(fam);
+ this.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