From 2b976c6bd1b4a56a7b351fe8f6f050394efb5dae Mon Sep 17 00:00:00 2001 From: stack Date: Tue, 2 Dec 2014 09:33:51 -0800 Subject: [PATCH] HBASE-12490 Replace uses of setAutoFlush(boolean, boolean) (Solomon Duskis) --- .../hadoop/hbase/client/TestAsyncProcess.java | 10 ++--- .../test/IntegrationTestBigLinkedList.java | 4 +- ...rationTestBigLinkedListWithVisibility.java | 4 +- .../test/IntegrationTestLoadAndVerify.java | 19 +++++----- .../IntegrationTestSendTraceRequests.java | 4 +- .../hbase/rest/PerformanceEvaluation.java | 38 +++++++++---------- .../mapreduce/MultiTableOutputFormat.java | 2 +- .../hbase/mapreduce/TableOutputFormat.java | 2 +- .../hbase/client/TestFromClientSide.java | 4 +- .../hadoop/hbase/client/TestHTableUtil.java | 2 +- .../hbase/client/TestMultiParallel.java | 4 +- .../hbase/coprocessor/TestHTableWrapper.java | 2 +- .../master/TestDistributedLogSplitting.java | 6 +-- .../regionserver/TestRegionServerMetrics.java | 2 +- .../regionserver/wal/TestLogRolling.java | 4 +- ...tReplicationChangingPeerRegionservers.java | 7 ++-- .../TestReplicationSmallTests.java | 6 +-- .../hbase/snapshot/SnapshotTestingUtils.java | 4 +- 18 files changed, 62 insertions(+), 62 deletions(-) diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java index d43ffc059e9..a56a254d86e 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java @@ -662,7 +662,7 @@ public class TestAsyncProcess { HTable ht = new HTable(); MyAsyncProcess ap = new MyAsyncProcess(createHConnection(), conf, true); ht.ap = ap; - ht.setAutoFlush(true, true); + ht.setAutoFlushTo(true); if (bufferOn) { ht.setWriteBufferSize(1024L * 1024L); } else { @@ -710,7 +710,7 @@ public class TestAsyncProcess { HTable ht = new HTable(); MyAsyncProcess ap = new MyAsyncProcess(createHConnection(), conf, true); ht.ap = ap; - ht.setAutoFlush(false, true); + ht.setAutoFlushTo(false); ht.setWriteBufferSize(0); Put p = createPut(1, false); @@ -738,7 +738,7 @@ public class TestAsyncProcess { public void testWithNoClearOnFail() throws IOException { HTable ht = new HTable(); ht.ap = new MyAsyncProcess(createHConnection(), conf, true); - ht.setAutoFlush(false, false); + ht.setAutoFlush(false); Put p = createPut(1, false); ht.put(p); @@ -805,7 +805,7 @@ public class TestAsyncProcess { ht.ap.serverTrackerTimeout = 1; Put p = createPut(1, false); - ht.setAutoFlush(false, false); + ht.setAutoFlush(false); ht.put(p); try { @@ -827,7 +827,7 @@ public class TestAsyncProcess { Assert.assertNotNull(ht.ap.createServerErrorTracker()); Put p = createPut(1, true); - ht.setAutoFlush(false, false); + ht.setAutoFlush(false); ht.put(p); try { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java index 7493e4b64bf..b424fa0b3a9 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java @@ -340,7 +340,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase { byte[] id; long count = 0; int i; - HTable table; + Table table; long numNodes; long wrap; int width; @@ -363,7 +363,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase { protected void instantiateHTable(Configuration conf) throws IOException { table = new HTable(conf, getTableName(conf)); - table.setAutoFlush(false, true); + table.setAutoFlushTo(false); table.setWriteBufferSize(4 * 1024 * 1024); } diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java index 9a8f2ab3232..bd8fd8c5d8d 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java @@ -184,8 +184,8 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB @Override protected void instantiateHTable(Configuration conf) throws IOException { for (int i = 0; i < DEFAULT_TABLES_COUNT; i++) { - HTable table = new HTable(conf, getTableName(i)); - table.setAutoFlush(true, true); + Table table = new HTable(conf, getTableName(i)); + table.setAutoFlushTo(true); //table.setWriteBufferSize(4 * 1024 * 1024); this.tables[i] = table; } diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java index 24dafa500ab..1e276265e8a 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java @@ -20,12 +20,7 @@ package org.apache.hadoop.hbase.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.io.IOException; -import java.util.Random; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import com.google.common.collect.Sets; import org.apache.commons.cli.CommandLine; import org.apache.commons.logging.Log; @@ -49,6 +44,7 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.ScannerCallable; +import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.mapreduce.NMapInputFormat; import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; @@ -68,7 +64,12 @@ import org.apache.hadoop.util.ToolRunner; import org.junit.Test; import org.junit.experimental.categories.Category; -import com.google.common.collect.Sets; +import java.io.IOException; +import java.util.Random; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * A large test which loads a lot of data that has internal references, and @@ -164,7 +165,7 @@ public void cleanUpCluster() throws Exception { extends Mapper { protected long recordsToWrite; - protected HTable table; + protected Table table; protected Configuration conf; protected int numBackReferencesPerRow; protected String shortTaskId; @@ -181,7 +182,7 @@ public void cleanUpCluster() throws Exception { numBackReferencesPerRow = conf.getInt(NUM_BACKREFS_KEY, NUM_BACKREFS_DEFAULT); table = new HTable(conf, TableName.valueOf(tableName)); table.setWriteBufferSize(4*1024*1024); - table.setAutoFlush(false, true); + table.setAutoFlushTo(false); String taskId = conf.get("mapreduce.task.attempt.id"); Matcher matcher = Pattern.compile(".+_m_(\\d+_\\d+)").matcher(taskId); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java index 2ec5838cb11..7e6382901fb 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java @@ -234,12 +234,12 @@ public class IntegrationTestSendTraceRequests extends AbstractHBaseTool { private LinkedBlockingQueue insertData() throws IOException, InterruptedException { LinkedBlockingQueue rowKeys = new LinkedBlockingQueue(25000); - HTable ht = new HTable(util.getConfiguration(), this.tableName); + Table ht = new HTable(util.getConfiguration(), this.tableName); byte[] value = new byte[300]; for (int x = 0; x < 5000; x++) { TraceScope traceScope = Trace.startSpan("insertData", Sampler.ALWAYS); try { - ht.setAutoFlush(false, true); + ht.setAutoFlushTo(false); for (int i = 0; i < 5; i++) { long rk = random.nextLong(); rowKeys.add(rk); diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java index 7e17c014be5..aaf7d59a8f7 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java @@ -18,22 +18,6 @@ */ package org.apache.hadoop.hbase.rest; -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.io.PrintStream; -import java.lang.reflect.Constructor; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.TreeMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -53,11 +37,11 @@ import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.HConnection; import org.apache.hadoop.hbase.client.HConnectionManager; -import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.filter.BinaryComparator; import org.apache.hadoop.hbase.filter.CompareFilter; import org.apache.hadoop.hbase.filter.Filter; @@ -91,6 +75,22 @@ import org.apache.hadoop.util.LineReader; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.TreeMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Script used evaluating Stargate performance and scalability. Runs a SG * client that steps through one of a set of hardcoded tests or 'experiments' @@ -870,7 +870,7 @@ public class PerformanceEvaluation extends Configured implements Tool { protected final int totalRows; private final Status status; protected TableName tableName; - protected HTableInterface table; + protected Table table; protected volatile Configuration conf; protected boolean flushCommits; protected boolean writeToWAL; @@ -909,7 +909,7 @@ public class PerformanceEvaluation extends Configured implements Tool { void testSetup() throws IOException { this.table = connection.getTable(tableName); - this.table.setAutoFlush(false, true); + this.table.setAutoFlushTo(false); } void testTakedown() throws IOException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableOutputFormat.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableOutputFormat.java index 62a9626c926..20cf50a7893 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableOutputFormat.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableOutputFormat.java @@ -104,7 +104,7 @@ public class MultiTableOutputFormat extends OutputFormat rowsUpdate = new ArrayList(); for (int i = 0; i < NB_BATCH_ROWS * 10; i++) { byte[] row = Bytes.toBytes("row" + i); @@ -3947,7 +3947,7 @@ public class TestFromClientSide { final int NB_BATCH_ROWS = 10; HTable table = TEST_UTIL.createTable(Bytes.toBytes("testRowsPutBufferedManyManyFlushes"), new byte[][] {CONTENTS_FAMILY, SMALL_FAMILY }); - table.setAutoFlush(false, true); + table.setAutoFlushTo(false); table.setWriteBufferSize(10); ArrayList rowsUpdate = new ArrayList(); for (int i = 0; i < NB_BATCH_ROWS * 10; i++) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableUtil.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableUtil.java index 31db75a9755..08e3879383f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableUtil.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableUtil.java @@ -69,7 +69,7 @@ public class TestHTableUtil { public void testBucketPut() throws Exception { byte [] TABLE = Bytes.toBytes("testBucketPut"); HTable ht = TEST_UTIL.createTable(TABLE, FAMILY); - ht.setAutoFlush(false, true); + ht.setAutoFlushTo(false); List puts = new ArrayList(); puts.add( createPut("row1") ); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java index 26bdb498914..4e32f4d5dd2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java @@ -263,8 +263,8 @@ public class TestMultiParallel { private void doTestFlushCommits(boolean doAbort) throws Exception { // Load the data LOG.info("get new table"); - HTable table = new HTable(UTIL.getConfiguration(), TEST_TABLE); - table.setAutoFlush(false, true); + Table table = new HTable(UTIL.getConfiguration(), TEST_TABLE); + table.setAutoFlushTo(false); table.setWriteBufferSize(10 * 1024 * 1024); LOG.info("constructPutRequests"); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java index 8c1e5159c34..2a8ac626078 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java @@ -177,7 +177,7 @@ public class TestHTableWrapper { boolean initialAutoFlush = hTableInterface.isAutoFlush(); hTableInterface.setAutoFlushTo(false); assertFalse(hTableInterface.isAutoFlush()); - hTableInterface.setAutoFlush(true, true); + hTableInterface.setAutoFlushTo(true); assertTrue(hTableInterface.isAutoFlush()); hTableInterface.setAutoFlushTo(initialAutoFlush); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java index a0f571bb608..f9311acc432 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java @@ -883,7 +883,7 @@ public class TestDistributedLogSplitting { List rsts = cluster.getLiveRegionServerThreads(); final ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "table-creation", null); - HTable ht = installTable(zkw, "table", "family", NUM_REGIONS_TO_CREATE); + Table ht = installTable(zkw, "table", "family", NUM_REGIONS_TO_CREATE); final SplitLogManager slm = master.getMasterFileSystem().splitLogManager; Set regionSet = new HashSet(); @@ -923,7 +923,7 @@ public class TestDistributedLogSplitting { if (key == null || key.length == 0) { key = new byte[] { 0, 0, 0, 0, 1 }; } - ht.setAutoFlush(true, true); + ht.setAutoFlushTo(true); Put put = new Put(key); put.add(Bytes.toBytes("family"), Bytes.toBytes("c1"), new byte[]{'b'}); ht.put(put); @@ -1595,7 +1595,7 @@ public class TestDistributedLogSplitting { * Load table with puts and deletes with expected values so that we can verify later */ private void prepareData(final HTable t, final byte[] f, final byte[] column) throws IOException { - t.setAutoFlush(false, true); + t.setAutoFlushTo(false); byte[] k = new byte[3]; // add puts diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java index a808dd986bd..e7d2285d43e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java @@ -351,7 +351,7 @@ public class TestRegionServerMetrics { TEST_UTIL.createTable(tableName, cf); HTable t = new HTable(conf, tableName); - t.setAutoFlush(false, true); + t.setAutoFlushTo(false); for (int insertCount =0; insertCount < 100; insertCount++) { Put p = new Put(Bytes.toBytes("" + insertCount + "row")); p.add(cf, qualifier, val); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java index d0d36915992..a8500d4fdd9 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java @@ -428,7 +428,7 @@ public class TestLogRolling { desc.addFamily(new HColumnDescriptor(HConstants.CATALOG_FAMILY)); admin.createTable(desc); - HTable table = new HTable(TEST_UTIL.getConfiguration(), desc.getTableName()); + Table table = new HTable(TEST_UTIL.getConfiguration(), desc.getTableName()); server = TEST_UTIL.getRSForFirstRegionInTable(desc.getTableName()); final WAL log = server.getWAL(null); @@ -455,7 +455,7 @@ public class TestLogRolling { writeData(table, 1002); - table.setAutoFlush(true, true); + table.setAutoFlushTo(true); long curTime = System.currentTimeMillis(); LOG.info("log.getCurrentFileName()): " + DefaultWALProvider.getCurrentFileName(log)); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java index 76416f285c9..92ab7699918 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java @@ -22,8 +22,6 @@ import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; -import java.io.IOException; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.LargeTests; @@ -36,11 +34,12 @@ import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.JVMClusterUtil; -import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; +import java.io.IOException; + /** * Test handling of changes to the number of a peer's regionservers. */ @@ -54,7 +53,7 @@ public class TestReplicationChangingPeerRegionservers extends TestReplicationBas */ @Before public void setUp() throws Exception { - ((HTable)htable1).setAutoFlush(false, true); + htable1.setAutoFlushTo(false); // Starting and stopping replication can make us miss new logs, // rolling like this makes sure the most recent one gets added to the queue for (JVMClusterUtil.RegionServerThread r : diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSmallTests.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSmallTests.java index 799963aca95..55e958d0329 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSmallTests.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSmallTests.java @@ -68,7 +68,7 @@ public class TestReplicationSmallTests extends TestReplicationBase { */ @Before public void setUp() throws Exception { - ((HTable)htable1).setAutoFlush(true, true); + htable1.setAutoFlushTo(true); // Starting and stopping replication can make us miss new logs, // rolling like this makes sure the most recent one gets added to the queue for ( JVMClusterUtil.RegionServerThread r : @@ -246,7 +246,7 @@ public class TestReplicationSmallTests extends TestReplicationBase { LOG.info("testSmallBatch"); Put put; // normal Batch tests - ((HTable)htable1).setAutoFlush(false, true); + htable1.setAutoFlushTo(false); for (int i = 0; i < NB_ROWS_IN_BATCH; i++) { put = new Put(Bytes.toBytes(i)); put.add(famName, row, row); @@ -386,7 +386,7 @@ public class TestReplicationSmallTests extends TestReplicationBase { public void testLoading() throws Exception { LOG.info("Writing out rows to table1 in testLoading"); htable1.setWriteBufferSize(1024); - ((HTable)htable1).setAutoFlush(false, true); + htable1.setAutoFlushTo(false); for (int i = 0; i < NB_ROWS_IN_BIG_BATCH; i++) { Put put = new Put(Bytes.toBytes(i)); put.add(famName, row, row); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java index 186436c0ed8..0d87dc2a178 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java @@ -673,9 +673,9 @@ public class SnapshotTestingUtils { loadData(util, new HTable(util.getConfiguration(), tableName), rows, families); } - public static void loadData(final HBaseTestingUtility util, final HTable table, int rows, + public static void loadData(final HBaseTestingUtility util, final Table table, int rows, byte[]... families) throws IOException, InterruptedException { - table.setAutoFlush(false, true); + table.setAutoFlushTo(false); // Ensure one row per region assertTrue(rows >= KEYS.length);