You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ra...@apache.org on 2015/01/27 05:56:26 UTC
hbase git commit: HBASE-12893 -
IntegrationTestBigLinkedListWithVisibility should use buffered writes
(Jingcheng Du)
Repository: hbase
Updated Branches:
refs/heads/master 2fb19fb95 -> cfb0cf72d
HBASE-12893 - IntegrationTestBigLinkedListWithVisibility should use
buffered writes (Jingcheng Du)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cfb0cf72
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cfb0cf72
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cfb0cf72
Branch: refs/heads/master
Commit: cfb0cf72d4b12a22af7a8267de8baaeef6dfc570
Parents: 2fb19fb
Author: Ramkrishna <ra...@intel.com>
Authored: Tue Jan 27 10:25:23 2015 +0530
Committer: Ramkrishna <ra...@intel.com>
Committed: Tue Jan 27 10:25:23 2015 +0530
----------------------------------------------------------------------
.../IntegrationTestBigLinkedListWithVisibility.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/cfb0cf72/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 e136ac8..99ad36a 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
@@ -38,15 +38,15 @@ import org.apache.hadoop.hbase.IntegrationTestingUtility;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.chaos.factories.MonkeyFactory;
import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.BufferedMutator;
+import org.apache.hadoop.hbase.client.BufferedMutatorParams;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.HBaseAdmin;
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.Scan;
-import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.io.hfile.HFile;
import org.apache.hadoop.hbase.mapreduce.Import;
@@ -172,8 +172,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
}
static class VisibilityGeneratorMapper extends GeneratorMapper {
- Table[] tables = new Table[DEFAULT_TABLES_COUNT];
- Table commonTable = null;
+ BufferedMutator[] tables = new BufferedMutator[DEFAULT_TABLES_COUNT];
@Override
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException,
@@ -184,8 +183,9 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
@Override
protected void instantiateHTable() throws IOException {
for (int i = 0; i < DEFAULT_TABLES_COUNT; i++) {
- Table table = connection.getTable(getTableName(i));
- //table.setWriteBufferSize(4 * 1024 * 1024);
+ BufferedMutatorParams params = new BufferedMutatorParams(getTableName(i));
+ params.writeBufferSize(4 * 1024 * 1024);
+ BufferedMutator table = connection.getBufferedMutator(params);
this.tables[i] = table;
}
}
@@ -218,7 +218,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
}
visibilityExps = split[j * 2] + OR + split[(j * 2) + 1];
put.setCellVisibility(new CellVisibility(visibilityExps));
- tables[j].put(put);
+ tables[j].mutate(put);
try {
Thread.sleep(1);
} catch (InterruptedException e) {