hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-12490 Replace uses of setAutoFlush(boolean, boolean) (Solomon Duskis)
Date Tue, 02 Dec 2014 17:34:14 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 091142f47 -> 2b976c6bd


HBASE-12490 Replace uses of setAutoFlush(boolean, boolean) (Solomon Duskis)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2b976c6b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2b976c6b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2b976c6b

Branch: refs/heads/branch-1
Commit: 2b976c6bd1b4a56a7b351fe8f6f050394efb5dae
Parents: 091142f
Author: stack <stack@apache.org>
Authored: Tue Dec 2 09:33:51 2014 -0800
Committer: stack <stack@apache.org>
Committed: Tue Dec 2 09:34:04 2014 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/client/TestAsyncProcess.java   | 10 +++---
 .../test/IntegrationTestBigLinkedList.java      |  4 +--
 ...egrationTestBigLinkedListWithVisibility.java |  4 +--
 .../test/IntegrationTestLoadAndVerify.java      | 19 +++++-----
 .../trace/IntegrationTestSendTraceRequests.java |  4 +--
 .../hbase/rest/PerformanceEvaluation.java       | 38 ++++++++++----------
 .../hbase/mapreduce/MultiTableOutputFormat.java |  2 +-
 .../hbase/mapreduce/TableOutputFormat.java      |  2 +-
 .../hadoop/hbase/client/TestFromClientSide.java |  4 +--
 .../hadoop/hbase/client/TestHTableUtil.java     |  2 +-
 .../hadoop/hbase/client/TestMultiParallel.java  |  4 +--
 .../hbase/coprocessor/TestHTableWrapper.java    |  2 +-
 .../master/TestDistributedLogSplitting.java     |  6 ++--
 .../regionserver/TestRegionServerMetrics.java   |  2 +-
 .../hbase/regionserver/wal/TestLogRolling.java  |  4 +--
 ...estReplicationChangingPeerRegionservers.java |  7 ++--
 .../replication/TestReplicationSmallTests.java  |  6 ++--
 .../hbase/snapshot/SnapshotTestingUtils.java    |  4 +--
 18 files changed, 62 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
----------------------------------------------------------------------
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 d43ffc0..a56a254 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 {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
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 7493e4b..b424fa0 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);
       }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
----------------------------------------------------------------------
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 9a8f2ab..bd8fd8c 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;
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
----------------------------------------------------------------------
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 24dafa5..1e27626 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<NullWritable, NullWritable, NullWritable, NullWritable>
   {
     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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
----------------------------------------------------------------------
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 2ec5838..7e63829 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<Long> insertData() throws IOException, InterruptedException
{
     LinkedBlockingQueue<Long> rowKeys = new LinkedBlockingQueue<Long>(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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
----------------------------------------------------------------------
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 7e17c01..aaf7d59 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 {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableOutputFormat.java
----------------------------------------------------------------------
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 62a9626..20cf50a 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<ImmutableBytesWritable,
       if (!tables.containsKey(tableName)) {
         LOG.debug("Opening HTable \"" + Bytes.toString(tableName.get())+ "\" for writing");
         HTable table = new HTable(conf, TableName.valueOf(tableName.get()));
-        table.setAutoFlush(false, true);
+        table.setAutoFlushTo(false);
         tables.put(tableName, table);
       }
       return tables.get(tableName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
index de29f37..cd69a5b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
@@ -195,7 +195,7 @@ implements Configurable {
       }
       this.connection = ConnectionFactory.createConnection(this.conf);
       this.table = connection.getTable(TableName.valueOf(tableName));
-      ((HTable) this.table).setAutoFlush(false, true);
+      this.table.setAutoFlushTo(false);
       LOG.info("Created table instance for "  + tableName);
     } catch(IOException e) {
       LOG.error(e);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index 35982a2..d1fea02 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -3906,7 +3906,7 @@ public class TestFromClientSide {
     final int NB_BATCH_ROWS = 10;
     HTable table = TEST_UTIL.createTable(Bytes.toBytes("testRowsPutBufferedOneFlush"),
       new byte [][] {CONTENTS_FAMILY, SMALL_FAMILY});
-    table.setAutoFlush(false, true);
+    table.setAutoFlushTo(false);
     ArrayList<Put> rowsUpdate = new ArrayList<Put>();
     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<Put> rowsUpdate = new ArrayList<Put>();
     for (int i = 0; i < NB_BATCH_ROWS * 10; i++) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableUtil.java
----------------------------------------------------------------------
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 31db75a..08e3879 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<Put> puts = new ArrayList<Put>();
     puts.add( createPut("row1") );

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
----------------------------------------------------------------------
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 26bdb49..4e32f4d 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");

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java
----------------------------------------------------------------------
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 8c1e515..2a8ac62 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);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
----------------------------------------------------------------------
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 a0f571b..f9311ac 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<RegionServerThread> 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<HRegionInfo> regionSet = new HashSet<HRegionInfo>();
@@ -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

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java
----------------------------------------------------------------------
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 a808dd9..e7d2285 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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
----------------------------------------------------------------------
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 d0d3691..a8500d4 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));

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java
----------------------------------------------------------------------
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 76416f2..92ab769 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 :

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSmallTests.java
----------------------------------------------------------------------
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 799963a..55e958d 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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2b976c6b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
----------------------------------------------------------------------
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 186436c..0d87dc2 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);


Mime
View raw message