[08/18] hbase git commit: HBASE-19939 Fixed NPE in tests TestSplitTableRegionProcedure#testSplitWithoutPONR() and testRecoveryAndDoubleExecution()

2018-02-06 Thread zhangduo
HBASE-19939 Fixed NPE in tests 
TestSplitTableRegionProcedure#testSplitWithoutPONR() and 
testRecoveryAndDoubleExecution()

Value of 'htd' is null as it is initialized in the constructor but when the 
object is deserialized its null. Got rid of member variable htd and made it 
local to method.


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

Branch: refs/heads/HBASE-19064
Commit: 3bb8daa60565ec2f7955352e52c2f6379176d8c6
Parents: f519797
Author: Umesh Agashe 
Authored: Mon Feb 5 12:08:49 2018 -0800
Committer: Michael Stack 
Committed: Mon Feb 5 20:48:56 2018 -0800

--
 .../hbase/master/assignment/SplitTableRegionProcedure.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3bb8daa6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index 1828340..be0741d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -94,7 +94,6 @@ public class SplitTableRegionProcedure
   private RegionInfo daughter_1_RI;
   private RegionInfo daughter_2_RI;
   private byte[] bestSplitRow;
-  private TableDescriptor htd;
   private RegionSplitPolicy splitPolicy;
 
   public SplitTableRegionProcedure() {
@@ -120,14 +119,14 @@ public class SplitTableRegionProcedure
 .setSplit(false)
 .setRegionId(rid)
 .build();
-this.htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
-if(this.htd.getRegionSplitPolicyClassName() != null) {
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
+if(htd.getRegionSplitPolicyClassName() != null) {
   // Since we don't have region reference here, creating the split policy 
instance without it.
   // This can be used to invoke methods which don't require Region 
reference. This instantiation
   // of a class on Master-side though it only makes sense on the 
RegionServer-side is
   // for Phoenix Local Indexing. Refer HBASE-12583 for more information.
   Class clazz =
-  RegionSplitPolicy.getSplitPolicyClass(this.htd, 
env.getMasterConfiguration());
+  RegionSplitPolicy.getSplitPolicyClass(htd, 
env.getMasterConfiguration());
   this.splitPolicy = ReflectionUtils.newInstance(clazz, 
env.getMasterConfiguration());
 }
   }
@@ -611,6 +610,7 @@ public class SplitTableRegionProcedure
   maxThreads, Threads.getNamedThreadFactory("StoreFileSplitter-%1$d"));
 final List>> futures = new 
ArrayList>>(nbFiles);
 
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
 // Split each store file.
 for (Map.Entrye: files.entrySet()) {
   byte [] familyName = Bytes.toBytes(e.getKey());



[09/50] hbase git commit: HBASE-19939 Fixed NPE in tests TestSplitTableRegionProcedure#testSplitWithoutPONR() and testRecoveryAndDoubleExecution()

2018-02-06 Thread zhangduo
HBASE-19939 Fixed NPE in tests 
TestSplitTableRegionProcedure#testSplitWithoutPONR() and 
testRecoveryAndDoubleExecution()

Value of 'htd' is null as it is initialized in the constructor but when the 
object is deserialized its null. Got rid of member variable htd and made it 
local to method.


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

Branch: refs/heads/HBASE-19397-branch-2
Commit: 53e57072240b25051f568e77c9f70344ea80e7cf
Parents: 8b6b332
Author: Umesh Agashe 
Authored: Mon Feb 5 12:08:49 2018 -0800
Committer: Michael Stack 
Committed: Mon Feb 5 20:48:20 2018 -0800

--
 .../hbase/master/assignment/SplitTableRegionProcedure.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/53e57072/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index 1828340..be0741d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -94,7 +94,6 @@ public class SplitTableRegionProcedure
   private RegionInfo daughter_1_RI;
   private RegionInfo daughter_2_RI;
   private byte[] bestSplitRow;
-  private TableDescriptor htd;
   private RegionSplitPolicy splitPolicy;
 
   public SplitTableRegionProcedure() {
@@ -120,14 +119,14 @@ public class SplitTableRegionProcedure
 .setSplit(false)
 .setRegionId(rid)
 .build();
-this.htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
-if(this.htd.getRegionSplitPolicyClassName() != null) {
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
+if(htd.getRegionSplitPolicyClassName() != null) {
   // Since we don't have region reference here, creating the split policy 
instance without it.
   // This can be used to invoke methods which don't require Region 
reference. This instantiation
   // of a class on Master-side though it only makes sense on the 
RegionServer-side is
   // for Phoenix Local Indexing. Refer HBASE-12583 for more information.
   Class clazz =
-  RegionSplitPolicy.getSplitPolicyClass(this.htd, 
env.getMasterConfiguration());
+  RegionSplitPolicy.getSplitPolicyClass(htd, 
env.getMasterConfiguration());
   this.splitPolicy = ReflectionUtils.newInstance(clazz, 
env.getMasterConfiguration());
 }
   }
@@ -611,6 +610,7 @@ public class SplitTableRegionProcedure
   maxThreads, Threads.getNamedThreadFactory("StoreFileSplitter-%1$d"));
 final List>> futures = new 
ArrayList>>(nbFiles);
 
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
 // Split each store file.
 for (Map.Entrye: files.entrySet()) {
   byte [] familyName = Bytes.toBytes(e.getKey());



hbase git commit: HBASE-19939 Fixed NPE in tests TestSplitTableRegionProcedure#testSplitWithoutPONR() and testRecoveryAndDoubleExecution()

2018-02-05 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master f5197979a -> 3bb8daa60


HBASE-19939 Fixed NPE in tests 
TestSplitTableRegionProcedure#testSplitWithoutPONR() and 
testRecoveryAndDoubleExecution()

Value of 'htd' is null as it is initialized in the constructor but when the 
object is deserialized its null. Got rid of member variable htd and made it 
local to method.


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

Branch: refs/heads/master
Commit: 3bb8daa60565ec2f7955352e52c2f6379176d8c6
Parents: f519797
Author: Umesh Agashe 
Authored: Mon Feb 5 12:08:49 2018 -0800
Committer: Michael Stack 
Committed: Mon Feb 5 20:48:56 2018 -0800

--
 .../hbase/master/assignment/SplitTableRegionProcedure.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3bb8daa6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index 1828340..be0741d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -94,7 +94,6 @@ public class SplitTableRegionProcedure
   private RegionInfo daughter_1_RI;
   private RegionInfo daughter_2_RI;
   private byte[] bestSplitRow;
-  private TableDescriptor htd;
   private RegionSplitPolicy splitPolicy;
 
   public SplitTableRegionProcedure() {
@@ -120,14 +119,14 @@ public class SplitTableRegionProcedure
 .setSplit(false)
 .setRegionId(rid)
 .build();
-this.htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
-if(this.htd.getRegionSplitPolicyClassName() != null) {
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
+if(htd.getRegionSplitPolicyClassName() != null) {
   // Since we don't have region reference here, creating the split policy 
instance without it.
   // This can be used to invoke methods which don't require Region 
reference. This instantiation
   // of a class on Master-side though it only makes sense on the 
RegionServer-side is
   // for Phoenix Local Indexing. Refer HBASE-12583 for more information.
   Class clazz =
-  RegionSplitPolicy.getSplitPolicyClass(this.htd, 
env.getMasterConfiguration());
+  RegionSplitPolicy.getSplitPolicyClass(htd, 
env.getMasterConfiguration());
   this.splitPolicy = ReflectionUtils.newInstance(clazz, 
env.getMasterConfiguration());
 }
   }
@@ -611,6 +610,7 @@ public class SplitTableRegionProcedure
   maxThreads, Threads.getNamedThreadFactory("StoreFileSplitter-%1$d"));
 final List>> futures = new 
ArrayList>>(nbFiles);
 
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
 // Split each store file.
 for (Map.Entrye: files.entrySet()) {
   byte [] familyName = Bytes.toBytes(e.getKey());



hbase git commit: HBASE-19939 Fixed NPE in tests TestSplitTableRegionProcedure#testSplitWithoutPONR() and testRecoveryAndDoubleExecution()

2018-02-05 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2 8b6b3326a -> 53e570722


HBASE-19939 Fixed NPE in tests 
TestSplitTableRegionProcedure#testSplitWithoutPONR() and 
testRecoveryAndDoubleExecution()

Value of 'htd' is null as it is initialized in the constructor but when the 
object is deserialized its null. Got rid of member variable htd and made it 
local to method.


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

Branch: refs/heads/branch-2
Commit: 53e57072240b25051f568e77c9f70344ea80e7cf
Parents: 8b6b332
Author: Umesh Agashe 
Authored: Mon Feb 5 12:08:49 2018 -0800
Committer: Michael Stack 
Committed: Mon Feb 5 20:48:20 2018 -0800

--
 .../hbase/master/assignment/SplitTableRegionProcedure.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/53e57072/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index 1828340..be0741d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -94,7 +94,6 @@ public class SplitTableRegionProcedure
   private RegionInfo daughter_1_RI;
   private RegionInfo daughter_2_RI;
   private byte[] bestSplitRow;
-  private TableDescriptor htd;
   private RegionSplitPolicy splitPolicy;
 
   public SplitTableRegionProcedure() {
@@ -120,14 +119,14 @@ public class SplitTableRegionProcedure
 .setSplit(false)
 .setRegionId(rid)
 .build();
-this.htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
-if(this.htd.getRegionSplitPolicyClassName() != null) {
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
+if(htd.getRegionSplitPolicyClassName() != null) {
   // Since we don't have region reference here, creating the split policy 
instance without it.
   // This can be used to invoke methods which don't require Region 
reference. This instantiation
   // of a class on Master-side though it only makes sense on the 
RegionServer-side is
   // for Phoenix Local Indexing. Refer HBASE-12583 for more information.
   Class clazz =
-  RegionSplitPolicy.getSplitPolicyClass(this.htd, 
env.getMasterConfiguration());
+  RegionSplitPolicy.getSplitPolicyClass(htd, 
env.getMasterConfiguration());
   this.splitPolicy = ReflectionUtils.newInstance(clazz, 
env.getMasterConfiguration());
 }
   }
@@ -611,6 +610,7 @@ public class SplitTableRegionProcedure
   maxThreads, Threads.getNamedThreadFactory("StoreFileSplitter-%1$d"));
 final List>> futures = new 
ArrayList>>(nbFiles);
 
+TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
 // Split each store file.
 for (Map.Entrye: files.entrySet()) {
   byte [] familyName = Bytes.toBytes(e.getKey());