hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject git commit: HBASE-11976 Server startcode is not checked for bulk region assignment
Date Tue, 16 Sep 2014 19:14:05 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 b809496da -> 05e97b1a2


HBASE-11976 Server startcode is not checked for bulk region assignment


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

Branch: refs/heads/0.98
Commit: 05e97b1a2fb3184e4a3218df199dc1535cfdc588
Parents: b809496
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Mon Sep 15 11:38:30 2014 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Tue Sep 16 12:06:24 2014 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/protobuf/RequestConverter.java    | 7 +++++--
 .../java/org/apache/hadoop/hbase/master/ServerManager.java    | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/05e97b1a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
index 544af85..ad17178 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
@@ -22,7 +22,6 @@ import java.util.List;
 
 import org.apache.hadoop.hbase.util.ByteStringer;
 
-import org.apache.commons.configuration.Configuration;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.CellScannable;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
@@ -702,12 +701,13 @@ public final class RequestConverter {
  /**
   * Create a protocol buffer OpenRegionRequest to open a list of regions
   *
+  * @param server the serverName for the RPC
   * @param regionOpenInfos info of a list of regions to open
   * @param openForReplay
   * @return a protocol buffer OpenRegionRequest
   */
  public static OpenRegionRequest
-     buildOpenRegionRequest(final List<Triple<HRegionInfo, Integer,
+     buildOpenRegionRequest(ServerName server, final List<Triple<HRegionInfo, Integer,
          List<ServerName>>> regionOpenInfos, Boolean openForReplay) {
    OpenRegionRequest.Builder builder = OpenRegionRequest.newBuilder();
    for (Triple<HRegionInfo, Integer, List<ServerName>> regionOpenInfo: regionOpenInfos)
{
@@ -716,6 +716,9 @@ public final class RequestConverter {
      builder.addOpenInfo(buildRegionOpenInfo(regionOpenInfo.getFirst(), versionOfOfflineNode,

        regionOpenInfo.getThird(), openForReplay));
    }
+   if (server != null) {
+     builder.setServerStartCode(server.getStartcode());
+   }
    return builder.build();
  }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/05e97b1a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index 42f4adb..27b2137 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -694,7 +694,7 @@ public class ServerManager {
       return null;
     }
 
-    OpenRegionRequest request = RequestConverter.buildOpenRegionRequest(regionOpenInfos,

+    OpenRegionRequest request = RequestConverter.buildOpenRegionRequest(server, regionOpenInfos,
       (RecoveryMode.LOG_REPLAY == this.services.getMasterFileSystem().getLogRecoveryMode()));
     try {
       OpenRegionResponse response = admin.openRegion(null, request);


Mime
View raw message