You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/12/06 22:29:46 UTC

[1/6] hbase git commit: HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Repository: hbase
Updated Branches:
  refs/heads/branch-1 6c2d51132 -> f88304d16
  refs/heads/branch-1.2 199c0e6a3 -> a1e77f605
  refs/heads/branch-1.3 0875e8611 -> 6d8c080b1
  refs/heads/branch-1.4 6fcbdc0cc -> fda742b35


HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1.3
Commit: 6d8c080b1c98ef672a7bc24a76e95584a3dedbd0
Parents: 0875e86
Author: Pankaj Kumar <pa...@huawei.com>
Authored: Thu Dec 7 01:59:20 2017 +0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:15:04 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6d8c080b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 99cdf5f..9c75ef8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5637,6 +5637,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           seqId = ((FlushResultImpl)fs).flushSequenceId;
         } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY) {
           seqId = ((FlushResultImpl)fs).flushSequenceId;
+        } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH) {
+          // CANNOT_FLUSH may mean that a flush is already on-going
+          // we need to wait for that flush to complete
+          waitForFlushes();
         } else {
           throw new IOException("Could not bulk load with an assigned sequential ID because the "+
             "flush didn't run. Reason for not flushing: " + ((FlushResultImpl)fs).failureReason);


[2/6] hbase git commit: HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Posted by ap...@apache.org.
HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1.2
Commit: a1e77f6056ea184050a22e92d82b171af03f9128
Parents: 199c0e6
Author: Pankaj Kumar <pa...@huawei.com>
Authored: Thu Dec 7 01:59:20 2017 +0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:15:08 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a1e77f60/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 696f8c3..a19b3e8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5469,6 +5469,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           seqId = ((FlushResultImpl)fs).flushSequenceId;
         } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY) {
           seqId = ((FlushResultImpl)fs).flushSequenceId;
+        } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH) {
+          // CANNOT_FLUSH may mean that a flush is already on-going
+          // we need to wait for that flush to complete
+          waitForFlushes();
         } else {
           throw new IOException("Could not bulk load with an assigned sequential ID because the "+
             "flush didn't run. Reason for not flushing: " + ((FlushResultImpl)fs).failureReason);


[4/6] hbase git commit: HBASE-19440 Not able to enable balancer with RSGroups once disabled

Posted by ap...@apache.org.
HBASE-19440 Not able to enable balancer with RSGroups once disabled

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1
Commit: 2cab98f6beef0efb8798f05e0edf7883aceb1ae6
Parents: 6c2d511
Author: Abhishek Singh Chouhan <ac...@apache.org>
Authored: Wed Dec 6 19:43:30 2017 +0530
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:18:44 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java       |  2 +-
 .../org/apache/hadoop/hbase/rsgroup/TestRSGroups.java    | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2cab98f6/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
index b844651..44bd946 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
@@ -684,7 +684,7 @@ public class RSGroupAdminEndpoint extends RSGroupAdminService
   @Override
   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   boolean newValue) throws IOException {
-    return false;
+    return newValue;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/2cab98f6/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
index d3c546e..081c0a3 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
@@ -54,6 +54,7 @@ import java.io.IOException;
 import java.util.Iterator;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -279,6 +280,16 @@ public class TestRSGroups extends TestRSGroupsBase {
   }
 
   @Test
+  public void testRSGroupBalancerSwitch() throws IOException {
+    //Balancer is initially off in the test, set to true and check
+    assertFalse(admin.setBalancerRunning(true, true));
+    assertTrue(admin.isBalancerEnabled());
+    //Set balancer off and check if it actually turned off
+    assertTrue(admin.setBalancerRunning(false,true));
+    assertFalse(admin.isBalancerEnabled());
+  }
+
+  @Test
   public void testCloneSnapshot() throws Exception {
     final TableName tableName = TableName.valueOf(tablePrefix+"_testCloneSnapshot");
     LOG.info("testCloneSnapshot");


[6/6] hbase git commit: HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Posted by ap...@apache.org.
HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1.4
Commit: fda742b35b58cdac40e4b0c1891625346a2f9d47
Parents: 48b41c4
Author: Pankaj Kumar <pa...@huawei.com>
Authored: Thu Dec 7 01:59:20 2017 +0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:18:57 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fda742b3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 129e01d..92e8ef7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5783,6 +5783,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           seqId = ((FlushResultImpl)fs).flushSequenceId;
         } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY) {
           seqId = ((FlushResultImpl)fs).flushSequenceId;
+        } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH) {
+          // CANNOT_FLUSH may mean that a flush is already on-going
+          // we need to wait for that flush to complete
+          waitForFlushes();
         } else {
           throw new IOException("Could not bulk load with an assigned sequential ID because the "+
             "flush didn't run. Reason for not flushing: " + ((FlushResultImpl)fs).failureReason);


[5/6] hbase git commit: HBASE-19440 Not able to enable balancer with RSGroups once disabled

Posted by ap...@apache.org.
HBASE-19440 Not able to enable balancer with RSGroups once disabled

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1.4
Commit: 48b41c4b13fc4208d4f360e388a66dbe0ce533e3
Parents: 6fcbdc0
Author: Abhishek Singh Chouhan <ac...@apache.org>
Authored: Wed Dec 6 19:43:30 2017 +0530
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:18:57 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java       |  2 +-
 .../org/apache/hadoop/hbase/rsgroup/TestRSGroups.java    | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/48b41c4b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
index b844651..44bd946 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
@@ -684,7 +684,7 @@ public class RSGroupAdminEndpoint extends RSGroupAdminService
   @Override
   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   boolean newValue) throws IOException {
-    return false;
+    return newValue;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/48b41c4b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
index d3c546e..081c0a3 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
@@ -54,6 +54,7 @@ import java.io.IOException;
 import java.util.Iterator;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -279,6 +280,16 @@ public class TestRSGroups extends TestRSGroupsBase {
   }
 
   @Test
+  public void testRSGroupBalancerSwitch() throws IOException {
+    //Balancer is initially off in the test, set to true and check
+    assertFalse(admin.setBalancerRunning(true, true));
+    assertTrue(admin.isBalancerEnabled());
+    //Set balancer off and check if it actually turned off
+    assertTrue(admin.setBalancerRunning(false,true));
+    assertFalse(admin.isBalancerEnabled());
+  }
+
+  @Test
   public void testCloneSnapshot() throws Exception {
     final TableName tableName = TableName.valueOf(tablePrefix+"_testCloneSnapshot");
     LOG.info("testCloneSnapshot");


[3/6] hbase git commit: HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Posted by ap...@apache.org.
HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).

Signed-off-by: Andrew Purtell <ap...@apache.org>


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

Branch: refs/heads/branch-1
Commit: f88304d162529dd93206afcbaee9001019e07acc
Parents: 2cab98f
Author: Pankaj Kumar <pa...@huawei.com>
Authored: Thu Dec 7 01:59:20 2017 +0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Dec 6 14:18:44 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f88304d1/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 129e01d..92e8ef7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5783,6 +5783,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           seqId = ((FlushResultImpl)fs).flushSequenceId;
         } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY) {
           seqId = ((FlushResultImpl)fs).flushSequenceId;
+        } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH) {
+          // CANNOT_FLUSH may mean that a flush is already on-going
+          // we need to wait for that flush to complete
+          waitForFlushes();
         } else {
           throw new IOException("Could not bulk load with an assigned sequential ID because the "+
             "flush didn't run. Reason for not flushing: " + ((FlushResultImpl)fs).failureReason);