hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject hbase git commit: HBASE-14781 Turn per cf flushing on for ITBLL by default
Date Sat, 07 Nov 2015 19:51:48 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 0edd51d2e -> 114423776


HBASE-14781 Turn per cf flushing on for ITBLL by default


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

Branch: refs/heads/master
Commit: 114423776562c3c22d58749e42e3ebbf8110a924
Parents: 0edd51d
Author: Elliott Clark <eclark@apache.org>
Authored: Fri Nov 6 12:11:47 2015 -0800
Committer: Elliott Clark <eclark@apache.org>
Committed: Sat Nov 7 11:50:13 2015 -0800

----------------------------------------------------------------------
 .../test/IntegrationTestBigLinkedList.java      | 24 ++++++--------------
 1 file changed, 7 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/11442377/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 69ad028..c864580 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
@@ -403,8 +403,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
         if (this.numNodes < this.wrap) {
           this.wrap = this.numNodes;
         }
-        this.multipleUnevenColumnFamilies =
-            context.getConfiguration().getBoolean(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY, false);
+        this.multipleUnevenColumnFamilies = isMultiUnevenColumnFamilies(context.getConfiguration());
       }
 
       protected void instantiateHTable() throws IOException {
@@ -610,11 +609,6 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       job.setOutputFormatClass(NullOutputFormat.class);
 
       job.getConfiguration().setBoolean("mapreduce.map.speculative", false);
-      String multipleUnevenColumnFamiliesStr = System.getProperty(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY);
-      if (multipleUnevenColumnFamiliesStr != null) {
-        job.getConfiguration().setBoolean(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,
-          Boolean.parseBoolean(multipleUnevenColumnFamiliesStr));
-      }
       TableMapReduceUtil.addDependencyJars(job);
       TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
       TableMapReduceUtil.initCredentials(job);
@@ -829,9 +823,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       protected void setup(
           Mapper<ImmutableBytesWritable, Result, BytesWritable, BytesWritable>.Context
context)
           throws IOException, InterruptedException {
-        this.multipleUnevenColumnFamilies =
-            context.getConfiguration().getBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,
-              false);
+        this.multipleUnevenColumnFamilies = isMultiUnevenColumnFamilies(context.getConfiguration());
       }
 
       @Override
@@ -1100,10 +1092,9 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       scan.addColumn(FAMILY_NAME, COLUMN_PREV);
       scan.setCaching(10000);
       scan.setCacheBlocks(false);
-      if (isMultiUnevenColumnFamilies()) {
+      if (isMultiUnevenColumnFamilies(getConf())) {
         scan.addColumn(BIG_FAMILY_NAME, BIG_FAMILY_NAME);
         scan.addColumn(TINY_FAMILY_NAME, TINY_FAMILY_NAME);
-        job.getConfiguration().setBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY, true);
       }
 
       TableMapReduceUtil.initTableMapperJob(getTableName(getConf()).getName(), scan,
@@ -1585,16 +1576,15 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
     }
   }
 
-  private static boolean isMultiUnevenColumnFamilies() {
-    return Boolean.TRUE.toString().equalsIgnoreCase(
-      System.getProperty(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY));
+  private static boolean isMultiUnevenColumnFamilies(Configuration conf) {
+    return conf.getBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,true);
   }
 
   @Test
   public void testContinuousIngest() throws IOException, Exception {
     //Loop <num iterations> <num mappers> <num nodes per mapper> <output
dir> <num reducers>
     Configuration conf = getTestingUtil(getConf()).getConfiguration();
-    if (isMultiUnevenColumnFamilies()) {
+    if (isMultiUnevenColumnFamilies(getConf())) {
       // make sure per CF flush is on
       conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, FlushLargeStoresPolicy.class.getName());
     }
@@ -1692,7 +1682,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
 
   @Override
   protected Set<String> getColumnFamilies() {
-    if (isMultiUnevenColumnFamilies()) {
+    if (isMultiUnevenColumnFamilies(getConf())) {
       return Sets.newHashSet(Bytes.toString(FAMILY_NAME), Bytes.toString(BIG_FAMILY_NAME),
         Bytes.toString(TINY_FAMILY_NAME));
     } else {


Mime
View raw message