Skip to content

Commit e4e4af0

Browse files
committed
HBASE-26096 Cleanup the deprecated methods in HBTU related classes
1 parent 8bc2fc0 commit e4e4af0

File tree

7 files changed

+596
-1099
lines changed

7 files changed

+596
-1099
lines changed

hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private void installSlowingCoproc() throws IOException, InterruptedException {
211211
TableDescriptor desc = admin.getDescriptor(t);
212212
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(desc);
213213
builder.setCoprocessor(SlowMeCoproScanOperations.class.getName());
214-
HBaseTestingUtil.modifyTableSync(admin, builder.build());
214+
admin.modifyTable(builder.build());
215215
}
216216

217217
@Test

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.apache.hadoop.hbase.client.Scan;
3838
import org.apache.hadoop.hbase.client.Table;
3939
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
40+
import org.apache.hadoop.hbase.logging.Log4jUtils;
4041
import org.apache.hadoop.hbase.util.Bytes;
4142
import org.apache.hadoop.io.NullWritable;
4243
import org.apache.hadoop.mapreduce.Job;
@@ -73,7 +74,7 @@ public abstract class MultiTableInputFormatTestBase {
7374
@BeforeClass
7475
public static void setUpBeforeClass() throws Exception {
7576
// switch TIF to log at DEBUG level
76-
TEST_UTIL.enableDebug(MultiTableInputFormatBase.class);
77+
Log4jUtils.enableDebug(MultiTableInputFormatBase.class);
7778
// start mini hbase cluster
7879
TEST_UTIL.startMiniCluster(3);
7980
// create and fill table

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.apache.hadoop.hbase.HBaseClassTestRule;
2323
import org.apache.hadoop.hbase.client.Scan;
2424
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
25+
import org.apache.hadoop.hbase.logging.Log4jUtils;
2526
import org.apache.hadoop.hbase.testclassification.LargeTests;
2627
import org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests;
2728
import org.apache.hadoop.mapreduce.Job;
@@ -43,8 +44,8 @@ public class TestMultiTableInputFormat extends MultiTableInputFormatTestBase {
4344

4445
@BeforeClass
4546
public static void setupLogging() {
46-
TEST_UTIL.enableDebug(MultiTableInputFormat.class);
47-
}
47+
Log4jUtils.enableDebug(MultiTableInputFormat.class);
48+
}
4849

4950
@Override
5051
protected void initJob(List<Scan> scans, Job job) throws IOException {

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.apache.hadoop.hbase.TableName;
2828
import org.apache.hadoop.hbase.client.Scan;
2929
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
30+
import org.apache.hadoop.hbase.logging.Log4jUtils;
3031
import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;
3132
import org.apache.hadoop.hbase.testclassification.LargeTests;
3233
import org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests;
@@ -53,8 +54,8 @@ public class TestMultiTableSnapshotInputFormat extends MultiTableInputFormatTest
5354

5455
@BeforeClass
5556
public static void setUpSnapshots() throws Exception {
56-
TEST_UTIL.enableDebug(MultiTableSnapshotInputFormat.class);
57-
TEST_UTIL.enableDebug(MultiTableSnapshotInputFormatImpl.class);
57+
Log4jUtils.enableDebug(MultiTableSnapshotInputFormat.class);
58+
Log4jUtils.enableDebug(MultiTableSnapshotInputFormatImpl.class);
5859

5960
// take a snapshot of every table we have.
6061
for (String tableName : TABLES) {

0 commit comments

Comments
 (0)