hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/branch-1 9e3c381be -> 6588ca565


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/branch-1
Commit: 6588ca5654bba540c186acc7021b954cde82f8e2
Parents: 9e3c381
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Fri Oct 23 11:02:33 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 454 +++
 1 file changed, 454 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6588ca56/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..09de871
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,454 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.AsyncRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {
+
+  

[1/2] hbase git commit: HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos

2015-10-23 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/0.98 2d68af900 -> 602884b84
  refs/heads/branch-1 6588ca565 -> cdf2c01a7


HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos


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

Branch: refs/heads/branch-1
Commit: cdf2c01a76767aa221738b1c9cc1036aed9a6113
Parents: 6588ca5
Author: Nicolas Liochon 
Authored: Tue Oct 13 19:12:23 2015 +0200
Committer: Andrew Purtell 
Committed: Fri Oct 23 11:42:30 2015 -0700

--
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cdf2c01a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index a26a3bc..0137a83 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -3289,7 +3289,7 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
   /**
* This method clones the passed c configuration setting a new
* user into the clone.  Use it getting new instances of FileSystem.  Only
-   * works for DistributedFileSystem.
+   * works for DistributedFileSystem w/o Kerberos.
* @param c Initial configuration
* @param differentiatingSuffix Suffix to differentiate this user from 
others.
* @return A new configuration instance with a different user set into it.
@@ -3299,7 +3299,7 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
 final String differentiatingSuffix)
   throws IOException {
 FileSystem currentfs = FileSystem.get(c);
-if (!(currentfs instanceof DistributedFileSystem)) {
+if (!(currentfs instanceof DistributedFileSystem) || 
User.isHBaseSecurityEnabled(c)) {
   return User.getCurrent();
 }
 // Else distributed filesystem.  Make a new instance per daemon.  Below



[2/2] hbase git commit: HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos

2015-10-23 Thread apurtell
HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos


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

Branch: refs/heads/0.98
Commit: 602884b84098640efc04375cb4f95448358642ad
Parents: 2d68af9
Author: Nicolas Liochon 
Authored: Tue Oct 13 19:12:23 2015 +0200
Committer: Andrew Purtell 
Committed: Fri Oct 23 11:42:36 2015 -0700

--
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/602884b8/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index d0aacff..9c1e42c 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -2927,7 +2927,7 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
   /**
* This method clones the passed c configuration setting a new
* user into the clone.  Use it getting new instances of FileSystem.  Only
-   * works for DistributedFileSystem.
+   * works for DistributedFileSystem w/o Kerberos.
* @param c Initial configuration
* @param differentiatingSuffix Suffix to differentiate this user from 
others.
* @return A new configuration instance with a different user set into it.
@@ -2937,7 +2937,7 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
 final String differentiatingSuffix)
   throws IOException {
 FileSystem currentfs = FileSystem.get(c);
-if (!(currentfs instanceof DistributedFileSystem)) {
+if (!(currentfs instanceof DistributedFileSystem) || 
User.isHBaseSecurityEnabled(c)) {
   return User.getCurrent();
 }
 // Else distributed filesystem.  Make a new instance per daemon.  Below



hbase git commit: HBASE-14685 Procedure Id is not set for MasterRpcServices#modifyTable

2015-10-23 Thread mbertozzi
Repository: hbase
Updated Branches:
  refs/heads/master ef7f8467a -> f34011860


HBASE-14685 Procedure Id is not set for MasterRpcServices#modifyTable

Signed-off-by: Matteo Bertozzi 


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

Branch: refs/heads/master
Commit: f34011860e04fd1261b3b30cab0265016a22faa2
Parents: ef7f846
Author: Ashish Singhi 
Authored: Fri Oct 23 23:11:35 2015 +0530
Committer: Matteo Bertozzi 
Committed: Fri Oct 23 11:37:10 2015 -0700

--
 .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f3401186/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index f5dcd0e..b269c3d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -1214,15 +1214,15 @@ public class MasterRpcServices extends RSRpcServices
   public ModifyTableResponse modifyTable(RpcController controller,
   ModifyTableRequest req) throws ServiceException {
 try {
-  master.modifyTable(
+  long procId = master.modifyTable(
 ProtobufUtil.toTableName(req.getTableName()),
 HTableDescriptor.convert(req.getTableSchema()),
 req.getNonceGroup(),
 req.getNonce());
+  return ModifyTableResponse.newBuilder().setProcId(procId).build();
 } catch (IOException ioe) {
   throw new ServiceException(ioe);
 }
-return ModifyTableResponse.newBuilder().build();
   }
 
   @Override



hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 47a2b991b -> 29d3b110e


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/branch-1.0
Commit: 29d3b110ea575213f127d93bcdc281289ae20849
Parents: 47a2b99
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Fri Oct 23 11:05:51 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 426 +++
 1 file changed, 426 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/29d3b110/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..70538b9
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,426 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {
+
+TestRpcServer(Configuration conf) throws 

hbase git commit: HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests (Heng Chen)

2015-10-23 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master b4ba615c7 -> ef7f8467a


HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests (Heng Chen)


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

Branch: refs/heads/master
Commit: ef7f8467af52cd1d6563ad5b1f6624be6872a165
Parents: b4ba615
Author: stack 
Authored: Fri Oct 23 11:29:48 2015 -0700
Committer: stack 
Committed: Fri Oct 23 11:29:48 2015 -0700

--
 .../org/apache/hadoop/hbase/mapred/TestTableInputFormat.java | 8 
 .../apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java   | 2 --
 .../hbase/mapreduce/MultiTableInputFormatTestBase.java   | 3 ---
 .../hbase/mapreduce/TableSnapshotInputFormatTestBase.java| 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestCellCounter.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestCopyTable.java | 2 --
 .../apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java | 6 --
 .../hadoop/hbase/mapreduce/TestHFileOutputFormat2.java   | 6 --
 .../hadoop/hbase/mapreduce/TestHRegionPartitioner.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestHashTable.java | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestImportExport.java  | 2 --
 .../mapreduce/TestImportTSVWithOperationAttributes.java  | 2 --
 .../apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java | 2 --
 .../hbase/mapreduce/TestImportTSVWithVisibilityLabels.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestImportTsv.java | 2 --
 .../hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestRowCounter.java| 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestSyncTable.java | 2 --
 .../apache/hadoop/hbase/mapreduce/TestTableInputFormat.java  | 2 --
 .../hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java | 3 ---
 .../hadoop/hbase/mapreduce/TestTableMapReduceBase.java   | 2 --
 .../apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java | 2 --
 .../org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java | 2 --
 .../apache/hadoop/hbase/snapshot/TestMobExportSnapshot.java  | 1 -
 .../hadoop/hbase/snapshot/TestMobSecureExportSnapshot.java   | 1 -
 .../hadoop/hbase/snapshot/TestSecureExportSnapshot.java  | 1 -
 27 files changed, 4 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7f8467/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
index 8498341..1975c59 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
@@ -34,6 +34,7 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.client.Connection;
@@ -80,7 +81,7 @@ public class TestTableInputFormat {
   private static final Log LOG = LogFactory.getLog(TestTableInputFormat.class);
 
   private final static HBaseTestingUtility UTIL = new HBaseTestingUtility();
-  private static MiniMRCluster mrCluster;
+
   static final byte[] FAMILY = Bytes.toBytes("family");
 
   private static final byte[][] columns = new byte[][] { FAMILY };
@@ -88,12 +89,10 @@ public class TestTableInputFormat {
   @BeforeClass
   public static void beforeClass() throws Exception {
 UTIL.startMiniCluster();
-mrCluster = UTIL.startMiniMapReduceCluster();
   }
 
   @AfterClass
   public static void afterClass() throws Exception {
-UTIL.shutdownMiniMapReduceCluster();
 UTIL.shutdownMiniCluster();
   }
 
@@ -344,7 +343,8 @@ public class TestTableInputFormat {
   }
 
   void testInputFormat(Class clazz) throws IOException {
-final JobConf job = MapreduceTestingShim.getJobConf(mrCluster);
+Configuration conf = UTIL.getConfiguration();
+final JobConf job = new JobConf(conf);
 job.setInputFormat(clazz);
 job.setOutputFormat(NullOutputFormat.class);
 job.setMapperClass(ExampleVerifier.class);

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7f8467/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java

hbase git commit: HBASE-14663 HStore::close does not honor config hbase.rs.evictblocksonclose (Vladimir Rodionov)

2015-10-23 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/0.98 602884b84 -> ba02635a4


HBASE-14663 HStore::close does not honor config hbase.rs.evictblocksonclose 
(Vladimir Rodionov)


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

Branch: refs/heads/0.98
Commit: ba02635a47fda86ae88cbc32c2ec5e3a0defe1fc
Parents: 602884b
Author: stack 
Authored: Wed Oct 21 21:57:31 2015 -0700
Committer: Andrew Purtell 
Committed: Fri Oct 23 11:50:03 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/ba02635a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index da83e4b..ae516e5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -745,7 +745,9 @@ public class HStore implements Store {
   completionService.submit(new Callable() {
 @Override
 public Void call() throws IOException {
-  f.closeReader(true);
+  boolean evictOnClose = 
+  cacheConf != null? cacheConf.shouldEvictOnClose(): true; 
+  f.closeReader(evictOnClose);
   return null;
 }
   });



hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/0.98 d5867a4d9 -> 2d68af900


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/0.98
Commit: 2d68af9004c9c5f43f97b28003b00eea76844753
Parents: d5867a4
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Fri Oct 23 10:52:16 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 425 +++
 1 file changed, 425 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2d68af90/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..6dfef9c
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,425 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClient;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {
+
+TestRpcServer(Configuration conf) throws IOException {
+  this(new FifoRpcScheduler(conf, 1), conf);
+}
+
+  

[2/2] hbase git commit: HBASE-14658 Allow loading a MonkeyFactory by class name

2015-10-23 Thread apurtell
HBASE-14658 Allow loading a MonkeyFactory by class name


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

Branch: refs/heads/0.98
Commit: b5a5548f2330ff22925bfbf90b6b946494807d37
Parents: ba02635
Author: Elliott Clark 
Authored: Tue Oct 20 18:28:48 2015 -0700
Committer: Andrew Purtell 
Committed: Fri Oct 23 12:23:45 2015 -0700

--
 .../hadoop/hbase/chaos/factories/MonkeyFactory.java | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b5a5548f/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
index d8e921d..9ea34fd 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
@@ -22,15 +22,19 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.IntegrationTestingUtility;
 import org.apache.hadoop.hbase.chaos.monkies.ChaosMonkey;
 
 import com.google.common.collect.ImmutableMap;
+import org.apache.hadoop.hbase.util.ReflectionUtils;
 
 /**
  * Base class of the factory that will create a ChaosMonkey.
  */
 public abstract class MonkeyFactory {
+  private static final Log LOG = LogFactory.getLog(MonkeyFactory.class);
 
   protected String tableName;
   protected Set columnFamilies;
@@ -83,6 +87,16 @@ public abstract class MonkeyFactory {
 .build();
 
   public static MonkeyFactory getFactory(String factoryName) {
-return FACTORIES.get(factoryName);
+MonkeyFactory fact = FACTORIES.get(factoryName);
+if (fact == null) {
+  Class klass = null;
+  try {
+klass = Class.forName(factoryName);
+fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
+  } catch (ClassNotFoundException e) {
+LOG.error("Error trying to create " + factoryName + " could not load 
it by class name");
+  }
+}
+return fact;
   }
 }



[1/2] hbase git commit: HBASE-14658 Addendum; Allow loading a MonkeyFactory by class name

2015-10-23 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/0.98 ba02635a4 -> 5950b81fb


HBASE-14658 Addendum; Allow loading a MonkeyFactory by class name


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

Branch: refs/heads/0.98
Commit: 5950b81fb9a39556ddbdfb9d607e498fd2f7321d
Parents: b5a5548
Author: Elliott Clark 
Authored: Thu Oct 22 11:22:53 2015 -0700
Committer: Andrew Purtell 
Committed: Fri Oct 23 12:23:45 2015 -0700

--
 .../apache/hadoop/hbase/chaos/factories/MonkeyFactory.java  | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5950b81f/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
index 9ea34fd..bf00eab 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
@@ -88,13 +88,16 @@ public abstract class MonkeyFactory {
 
   public static MonkeyFactory getFactory(String factoryName) {
 MonkeyFactory fact = FACTORIES.get(factoryName);
-if (fact == null) {
+if (fact == null && factoryName != null && !factoryName.isEmpty()) {
   Class klass = null;
   try {
 klass = Class.forName(factoryName);
-fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
-  } catch (ClassNotFoundException e) {
+if (klass != null) {
+  fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
+}
+  } catch (Exception e) {
 LOG.error("Error trying to create " + factoryName + " could not load 
it by class name");
+return null;
   }
 }
 return fact;



hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/0.98 5950b81fb -> 73e7722b8


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/0.98
Commit: 73e7722b808a79c93882cbe1a2d14dfa3cef8b58
Parents: 5950b81
Author: tedyu 
Authored: Fri Oct 23 15:27:47 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 15:27:47 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 30 ++-
 .../hbase/regionserver/CompactionRequestor.java |  5 +-
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  |  8 +-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 11 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 28 +--
 .../TestRegionObserverScannerOpenHook.java  | 11 ++-
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 16 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 17 files changed, 249 insertions(+), 73 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/73e7722b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index 2766b5b..3e73ec1 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -330,7 +329,7 @@ public class CompactSplitThread implements 
CompactionRequestor {
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -348,8 +347,8 @@ public class CompactSplitThread implements 
CompactionRequestor {
   }
 
   private CompactionContext selectCompaction(final HRegion r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
   if(LOG.isDebugEnabled()) {
 LOG.debug("Not compacting " + r.getRegionNameAsString() +
@@ -460,7 +459,7 @@ public class CompactSplitThread implements 
CompactionRequestor {
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -472,7 +471,7 @@ public class CompactSplitThread implements 
CompactionRequestor {
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -500,7 +499,7 @@ public class CompactSplitThread implements 
CompactionRequestor {
 // Note: please don't put single-compaction logic here;
 //   put it into region/store/etc. This is CST logic.
 long start = EnvironmentEdgeManager.currentTimeMillis();
-boolean completed = 

[45/50] [abbrv] hbase git commit: HBASE-14678 Experiment: Temporarily disable balancer and a few others to see if root of crashed/timedout JVMs; ADD TestDistributedLogSplitting to the mix

2015-10-23 Thread syuanjiang
HBASE-14678 Experiment: Temporarily disable balancer and a few others to see if 
root of crashed/timedout JVMs; ADD TestDistributedLogSplitting to the mix


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

Branch: refs/heads/hbase-12439
Commit: 129c48430e2102bb6f71b56047a8b15b31105fd2
Parents: 36d4a5a
Author: stack 
Authored: Thu Oct 22 17:01:58 2015 -0700
Committer: stack 
Committed: Thu Oct 22 17:01:58 2015 -0700

--
 .../master/TestDistributedLogSplitting.java | 1799 --
 1 file changed, 1799 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/129c4843/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
deleted file mode 100644
index 4a43bbd..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
+++ /dev/null
@@ -1,1799 +0,0 @@
-/**
- *
-
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.master;
-
-import static 
org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_wait_for_zk_delete;
-import static 
org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_final_transition_failed;
-import static org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_preempt_task;
-import static org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_task_acquired;
-import static org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_task_done;
-import static org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_task_err;
-import static org.apache.hadoop.hbase.SplitLogCounters.tot_wkr_task_resigned;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.NavigableSet;
-import java.util.Set;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FSDataOutputStream;
-import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.PathFilter;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.MiniHBaseCluster;
-import org.apache.hadoop.hbase.NamespaceDescriptor;
-import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.SplitLogCounters;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.Waiter;
-import org.apache.hadoop.hbase.client.ClusterConnection;
-import org.apache.hadoop.hbase.client.ConnectionUtils;
-import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.Increment;
-import org.apache.hadoop.hbase.client.NonceGenerator;
-import org.apache.hadoop.hbase.client.PerClientRandomNonceGenerator;
-import 

[13/50] [abbrv] hbase git commit: HBASE-14636 Clear HFileScannerImpl#prevBlocks in between Compaction flow.

2015-10-23 Thread syuanjiang
HBASE-14636 Clear HFileScannerImpl#prevBlocks in between Compaction flow.


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

Branch: refs/heads/hbase-12439
Commit: c9523a569d45e9edc2c2d7b8d4d9cbf05f46a100
Parents: 51693b9
Author: anoopsjohn 
Authored: Tue Oct 20 13:06:09 2015 +0530
Committer: anoopsjohn 
Committed: Tue Oct 20 13:06:09 2015 +0530

--
 .../hadoop/hbase/io/hfile/HFileBlock.java   |  7 
 .../hadoop/hbase/io/hfile/HFileReaderImpl.java  |  6 ++-
 .../regionserver/compactions/Compactor.java | 43 ++--
 3 files changed, 42 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c9523a56/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
index 4fd32a4..a68d0a6 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
@@ -1938,6 +1938,13 @@ public class HFileBlock implements Cacheable {
   }
 
   /**
+   * @return true if this block is backed by a shared memory area(such as that 
of a BucketCache).
+   */
+  public boolean usesSharedMemory() {
+return this.memType == MemoryType.SHARED;
+  }
+
+  /**
* Convert the contents of the block header into a human readable string.
* This is mostly helpful for debugging. This assumes that the block
* has minor version > 0.

http://git-wip-us.apache.org/repos/asf/hbase/blob/c9523a56/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
index 6970d27..5af72b6 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
@@ -510,14 +510,16 @@ public class HFileReaderImpl implements HFile.Reader, 
Configurable {
   block.getOffset() == this.curBlock.getOffset()) {
 return;
   }
-  if (this.curBlock != null) {
+  // We don't have to keep ref to EXCLUSIVE type of block
+  if (this.curBlock != null && this.curBlock.usesSharedMemory()) {
 prevBlocks.add(this.curBlock);
   }
   this.curBlock = block;
 }
 
 void reset() {
-  if (this.curBlock != null) {
+  // We don't have to keep ref to EXCLUSIVE type of block
+  if (this.curBlock != null && this.curBlock.usesSharedMemory()) {
 this.prevBlocks.add(this.curBlock);
   }
   this.curBlock = null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/c9523a56/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
index 873d827..eaccd0d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.io.hfile.HFile.FileInfo;
 import org.apache.hadoop.hbase.regionserver.HStore;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
+import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
 import org.apache.hadoop.hbase.regionserver.ScanType;
 import org.apache.hadoop.hbase.regionserver.ScannerContext;
 import org.apache.hadoop.hbase.regionserver.Store;
@@ -58,13 +59,14 @@ import 
org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
 @InterfaceAudience.Private
 public abstract class Compactor {
   private static final Log LOG = LogFactory.getLog(Compactor.class);
+  private static final long COMPACTION_PROGRESS_LOG_INTERVAL = 60 * 1000;
   protected CompactionProgress progress;
   protected Configuration conf;
   protected Store store;
 
   protected int compactionKVMax;
   protected Compression.Algorithm compactionCompression;
-  
+
   /** specify how many days to keep MVCC 

[22/50] [abbrv] hbase git commit: HBASE-14662 Fix NPE in HFileOutputFormat2 (Heng Chen)

2015-10-23 Thread syuanjiang
HBASE-14662 Fix NPE in HFileOutputFormat2 (Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: 81e2aba1f9bbe592d9d9284e701af5bedad3cd56
Parents: 5363f37
Author: stack 
Authored: Wed Oct 21 21:48:47 2015 -0700
Committer: stack 
Committed: Wed Oct 21 21:48:47 2015 -0700

--
 .../hbase/mapreduce/HFileOutputFormat2.java  | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/81e2aba1/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
index 388c017..a183773 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
@@ -210,15 +210,16 @@ public class HFileOutputFormat2
   if (conf.getBoolean(LOCALITY_SENSITIVE_CONF_KEY, 
DEFAULT_LOCALITY_SENSITIVE)) {
 HRegionLocation loc = null;
 String tableName = conf.get(OUTPUT_TABLE_NAME_CONF_KEY);
-
-try (Connection connection = 
ConnectionFactory.createConnection(conf);
-   RegionLocator locator =
- 
connection.getRegionLocator(TableName.valueOf(tableName))) {
-  loc = locator.getRegionLocation(rowKey);
-} catch (Throwable e) {
-  LOG.warn("there's something wrong when locating rowkey: " +
-Bytes.toString(rowKey), e);
-  loc = null;
+if (tableName != null) {
+  try (Connection connection = 
ConnectionFactory.createConnection(conf);
+ RegionLocator locator =
+   
connection.getRegionLocator(TableName.valueOf(tableName))) {
+loc = locator.getRegionLocation(rowKey);
+  } catch (Throwable e) {
+LOG.warn("there's something wrong when locating rowkey: " +
+  Bytes.toString(rowKey), e);
+loc = null;
+  }
 }
 
 if (null == loc) {



[46/50] [abbrv] hbase git commit: HBASE-14681 addendum

2015-10-23 Thread syuanjiang
HBASE-14681 addendum


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

Branch: refs/heads/hbase-12439
Commit: eb4f9b8b32cf0551088a342cfa9b46b20593ac27
Parents: 129c484
Author: Misty Stanley-Jones 
Authored: Fri Oct 23 10:25:14 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Fri Oct 23 10:25:20 2015 +1000

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/eb4f9b8b/pom.xml
--
diff --git a/pom.xml b/pom.xml
index be2eec8..eab8eb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2997,7 +2997,7 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-2.13
+2.16
 
   target/**
   hbase/checkstyle.xml



[42/50] [abbrv] hbase git commit: HBASE-13538 Procedure v2 - client add/delete/modify column family sync (incompatible with branch-1.x)

2015-10-23 Thread syuanjiang
HBASE-13538 Procedure v2 - client add/delete/modify column family sync 
(incompatible with branch-1.x)

Signed-off-by: Matteo Bertozzi 


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

Branch: refs/heads/hbase-12439
Commit: 467bc098a9512afca38356da56d92c351f15b042
Parents: 93023f5
Author: Ashish Singhi 
Authored: Tue Oct 20 17:21:22 2015 +0530
Committer: Matteo Bertozzi 
Committed: Thu Oct 22 13:12:35 2015 -0700

--
 .../org/apache/hadoop/hbase/client/Admin.java   |  27 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  | 120 ++-
 .../hbase/protobuf/generated/MasterProtos.java  | 897 ---
 hbase-protocol/src/main/protobuf/Master.proto   |   3 +
 .../org/apache/hadoop/hbase/master/HMaster.java |  15 +-
 .../hadoop/hbase/master/MasterRpcServices.java  |  27 +-
 .../hadoop/hbase/master/MasterServices.java |   6 +-
 .../hadoop/hbase/master/TestCatalogJanitor.java |  27 +-
 8 files changed, 751 insertions(+), 371 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/467bc098/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 4137ac0..972939e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -507,13 +507,19 @@ public interface Admin extends Abortable, Closeable {
 
   /**
* Add a column family to an existing table. Asynchronous operation.
+   * You can use Future.get(long, TimeUnit) to wait on the operation to 
complete.
+   * It may throw ExecutionException if there was an error while executing the 
operation
+   * or TimeoutException in case the wait timeout was not long enough to allow 
the
+   * operation to complete.
*
* @param tableName name of the table to add column family to
* @param columnFamily column family descriptor of column family to be added
* @throws IOException if a remote or network exception occurs
+   * @return the result of the async add column family. You can use 
Future.get(long, TimeUnit) to
+   * wait on the operation to complete.
*/
-  void addColumnFamily(final TableName tableName, final HColumnDescriptor 
columnFamily)
-throws IOException;
+  Future addColumnFamily(final TableName tableName, final 
HColumnDescriptor columnFamily)
+  throws IOException;
 
   /**
* Delete a column family from a table. Asynchronous operation.
@@ -531,15 +537,26 @@ public interface Admin extends Abortable, Closeable {
 
   /**
* Delete a column family from a table. Asynchronous operation.
+   * You can use Future.get(long, TimeUnit) to wait on the operation to 
complete.
+   * It may throw ExecutionException if there was an error while executing the 
operation
+   * or TimeoutException in case the wait timeout was not long enough to allow 
the
+   * operation to complete.
*
* @param tableName name of table
* @param columnFamily name of column family to be deleted
* @throws IOException if a remote or network exception occurs
+   * @return the result of the async delete column family. You can use 
Future.get(long, TimeUnit) to
+   * wait on the operation to complete.
*/
-  void deleteColumnFamily(final TableName tableName, final byte[] 
columnFamily) throws IOException;
+  Future deleteColumnFamily(final TableName tableName, final byte[] 
columnFamily)
+  throws IOException;
 
   /**
* Modify an existing column family on a table. Asynchronous operation.
+   * You can use Future.get(long, TimeUnit) to wait on the operation to 
complete.
+   * It may throw ExecutionException if there was an error while executing the 
operation
+   * or TimeoutException in case the wait timeout was not long enough to allow 
the
+   * operation to complete.
*
* @param tableName name of table
* @param columnFamily new column family descriptor to use
@@ -559,8 +576,10 @@ public interface Admin extends Abortable, Closeable {
* @param tableName name of table
* @param columnFamily new column family descriptor to use
* @throws IOException if a remote or network exception occurs
+   * @return the result of the async modify column family. You can use 
Future.get(long, TimeUnit) to
+   * wait on the operation to complete.
*/
-  void modifyColumnFamily(final TableName tableName, final HColumnDescriptor 

[37/50] [abbrv] hbase git commit: HBASE-14669 remove unused import and fix javadoc

2015-10-23 Thread syuanjiang
http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
index eb25972..0ec46e4 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
@@ -37,7 +37,6 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
index 33d1a66..23714b7 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
@@ -32,7 +32,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Table;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
index 1dcbd2a..5ece857 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
@@ -29,7 +29,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
index 572d9ae..5436a1d 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
@@ -33,7 +33,6 @@ import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
index d2bb11a..579e28a 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.MiniHBaseCluster;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.HTable;
 import 

[41/50] [abbrv] hbase git commit: HBASE-14678 Experiment: Temporarily disable balancer and a few others to see if root of crashed/timedout JVMs

2015-10-23 Thread syuanjiang
HBASE-14678 Experiment: Temporarily disable balancer and a few others to see if 
root of crashed/timedout JVMs


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

Branch: refs/heads/hbase-12439
Commit: 93023f544b673ccc99fc0e327f2eca8964128097
Parents: 35660b4
Author: stack 
Authored: Thu Oct 22 12:31:04 2015 -0700
Committer: stack 
Committed: Thu Oct 22 12:31:04 2015 -0700

--
 .../hbase/TestPartialResultsFromClientSide.java | 832 ---
 .../balancer/TestStochasticLoadBalancer.java| 532 
 .../balancer/TestStochasticLoadBalancer2.java   |  90 --
 .../TestMasterFailoverWithProcedures.java   | 514 
 .../hbase/client/TestReplicationShell.java  |  37 -
 .../apache/hadoop/hbase/client/TestShell.java   |  39 -
 6 files changed, 2044 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/93023f54/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
deleted file mode 100644
index 3794e59..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
+++ /dev/null
@@ -1,832 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.client.ClientScanner;
-import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.client.ResultScanner;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.client.Table;
-import org.apache.hadoop.hbase.filter.ColumnPrefixFilter;
-import org.apache.hadoop.hbase.filter.ColumnRangeFilter;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
-import org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter;
-import org.apache.hadoop.hbase.filter.RandomRowFilter;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-/**
- * These tests are focused on testing how partial results appear to a client. 
Partial results are
- * {@link Result}s that contain only a portion of a row's complete list of 
cells. Partial results
- * are formed when the server breaches its maximum result size when trying to 
service a client's RPC
- * request. It is the responsibility of the scanner on the client side to 
recognize when partial
- * results have been returned and to take action to form the complete results.
- * 
- * Unless the flag {@link Scan#setAllowPartialResults(boolean)} has been set 
to true, the caller of
- * {@link ResultScanner#next()} should never see partial results.
- */
-@Category(MediumTests.class)
-public class TestPartialResultsFromClientSide {
-  private static final Log LOG = 
LogFactory.getLog(TestPartialResultsFromClientSide.class);
-
-  private final static HBaseTestingUtility TEST_UTIL = new 
HBaseTestingUtility();
-
-  private static Table TABLE = null;
-
-  /**
-   * Table configuration
-   */
-  private 

[31/50] [abbrv] hbase git commit: HBASE-14603 Addendum

2015-10-23 Thread syuanjiang
HBASE-14603 Addendum


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

Branch: refs/heads/hbase-12439
Commit: ac2cfbaa58e231541021e0c736be0572b460f8c7
Parents: 2996355
Author: Misty Stanley-Jones 
Authored: Thu Oct 22 19:16:08 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 19:16:08 2015 +1000

--
 pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ac2cfbaa/pom.xml
--
diff --git a/pom.xml b/pom.xml
index dadb714..64015cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2748,7 +2748,9 @@
 2.7
 
   
-index
+
+  index
+
   
 
 



[24/50] [abbrv] hbase git commit: HBASE-14663 HStore::close does not honor config hbase.rs.evictblocksonclose (Vladimir Rodionov)

2015-10-23 Thread syuanjiang
HBASE-14663 HStore::close does not honor config hbase.rs.evictblocksonclose 
(Vladimir Rodionov)


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

Branch: refs/heads/hbase-12439
Commit: ab677a19fc5d909890b4f74ddc3087e4699d81a1
Parents: f9df3e9
Author: stack 
Authored: Wed Oct 21 21:57:31 2015 -0700
Committer: stack 
Committed: Wed Oct 21 21:57:41 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/ab677a19/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index cfda1c6..2ba8dc5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -862,7 +862,9 @@ public class HStore implements Store {
   completionService.submit(new Callable() {
 @Override
 public Void call() throws IOException {
-  f.closeReader(true);
+  boolean evictOnClose = 
+  cacheConf != null? cacheConf.shouldEvictOnClose(): true; 
+  f.closeReader(evictOnClose);
   return null;
 }
   });



[08/50] [abbrv] hbase git commit: HBASE-14631 Region merge request should be audited with request user through proper scope of doAs() calls to region observer notifications

2015-10-23 Thread syuanjiang
HBASE-14631 Region merge request should be audited with request user through 
proper scope of doAs() calls to region observer notifications


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

Branch: refs/heads/hbase-12439
Commit: 57fea77074ea319024b00ea1fab9cc6f1068d696
Parents: 8e6316a
Author: tedyu 
Authored: Mon Oct 19 08:41:16 2015 -0700
Committer: tedyu 
Committed: Mon Oct 19 08:41:16 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  |   4 +-
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../hbase/regionserver/RegionMergeRequest.java  |   7 +-
 .../regionserver/RegionMergeTransaction.java|  35 -
 .../RegionMergeTransactionImpl.java | 144 +--
 .../coprocessor/TestRegionServerObserver.java   |   2 +-
 6 files changed, 173 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/57fea770/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index 04adf25..a9e2fca 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -223,9 +223,9 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   public synchronized void requestRegionsMerge(final Region a,
-  final Region b, final boolean forcible, long masterSystemTime) {
+  final Region b, final boolean forcible, long masterSystemTime, User 
user) {
 try {
-  mergePool.execute(new RegionMergeRequest(a, b, this.server, forcible, 
masterSystemTime));
+  mergePool.execute(new RegionMergeRequest(a, b, this.server, forcible, 
masterSystemTime,user));
   if (LOG.isDebugEnabled()) {
 LOG.debug("Region merge requested for " + a + "," + b + ", forcible="
 + forcible + ".  " + this);

http://git-wip-us.apache.org/repos/asf/hbase/blob/57fea770/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 28c1f45..38288ef 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -1432,7 +1432,7 @@ public class RSRpcServices implements 
HBaseRPCErrorHandler,
 regionServer.metricsRegionServer.updateFlushTime(endTime - startTime);
   }
   regionServer.compactSplitThread.requestRegionsMerge(regionA, regionB, 
forcible,
-  masterSystemTime);
+  masterSystemTime, RpcServer.getRequestUser());
   return MergeRegionsResponse.newBuilder().build();
 } catch (DroppedSnapshotException ex) {
   regionServer.abort("Replay of WAL required. Forcing server shutdown", 
ex);

http://git-wip-us.apache.org/repos/asf/hbase/blob/57fea770/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
index 339c566..ce69ad3 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
@@ -25,6 +25,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.DroppedSnapshotException;
 import org.apache.hadoop.hbase.master.TableLockManager.TableLock;
+import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.ipc.RemoteException;
 import org.apache.hadoop.util.StringUtils;
@@ -43,15 +44,17 @@ class RegionMergeRequest implements Runnable {
   private final boolean forcible;
   private TableLock tableLock;
   private final long masterSystemTime;
+  private final User user;
 
   

[12/50] [abbrv] hbase git commit: HBASE-14642 Update website-publishing script

2015-10-23 Thread syuanjiang
HBASE-14642 Update website-publishing script


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

Branch: refs/heads/hbase-12439
Commit: 51693b9cdeb1671ddaf8aa3eeb6eca2a57761bd6
Parents: c1f0442
Author: Misty Stanley-Jones 
Authored: Tue Oct 20 12:02:53 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Tue Oct 20 16:31:20 2015 +1000

--
 dev-support/publish_hbase_website.sh | 236 --
 1 file changed, 124 insertions(+), 112 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/51693b9c/dev-support/publish_hbase_website.sh
--
diff --git a/dev-support/publish_hbase_website.sh 
b/dev-support/publish_hbase_website.sh
index 2a43a1f..1560bcf 100755
--- a/dev-support/publish_hbase_website.sh
+++ b/dev-support/publish_hbase_website.sh
@@ -32,8 +32,8 @@ if [ "$#" == "0" ]; then
 fi
 
 # Process args
-INTERACTIVE=
-AUTO=
+INTERACTIVE=0
+AUTO=0
 GIT_DIR=
 SVN_DIR=
 while getopts "hiag:s:" OPTION
@@ -44,41 +44,50 @@ do
   exit
   ;;
 i)
-  INTERACTIVE=1
+  if [ $AUTO -eq 1 ]; then
+echo "Cannot specify both -i and -a."
+echo -e "$USAGE"
+exit 1
+  else
+INTERACTIVE=1
+AUTO=0
+  fi
   ;;
 a)
-  # We don't actually use this variable but require it to be 
+  # We don't actually use this variable but require it to be
   # set explicitly because it will commit changes without asking
-  AUTO=1
+  if [ $INTERACTIVE -eq 1 ]; then
+echo "Cannot specify both -i and -a."
+echo -e "$USAGE"
+exit 1
+  else
+AUTO=1
+INTERACTIVE=0
+  fi
   ;;
 g)
   GIT_DIR=$OPTARG
+  if [ ! -d "$GIT_DIR/.git" ]; then
+echo "Git directory $GIT_DIR does not exist or is not a Git 
repository."
+exit 1
+  fi
   ;;
 s)
   SVN_DIR=$OPTARG
+  if [ ! -d "$SVN_DIR/.svn" ]; then
+echo "SVN directory $SVN_DIR does not exist or is not a Subversion 
repository."
+exit 1
+  fi
   ;;
   esac
 done
 
-if [ $INTERACTIVE ] && [ $AUTO ]; then
-echo "Only one of -i or -a can be used."
-echo -e $USAGE
-exit 1
-fi
-
 # Set GIT_DIR and SVN_DIR to defaults if not given
-if [ ! $GIT_DIR ]; then
-  GIT_DIR=~/git/hbase
-fi
-if [ ! $SVN_DIR ]; then
-  SVN_DIR=~/svn/hbase.apache.org/trunk
+if [ -z "$GIT_DIR" ]; then
+  GIT_DIR="$HOME/git/hbase"
 fi
-
-# Check that GIT_DIR and SVN_DIR exist
-if [ ! -d $GIT_DIR -o ! -d $SVN_DIR ]; then
-  echo "Both the GIT and SVN directories must exist."
-  echo -e $USAGE
-  exit 1
+if [ -z "$SVN_DIR" ]; then
+  SVN_DIR="$HOME/svn/hbase.apache.org/trunk"
 fi
 
 export MAVEN_OPTS=${MAVEN_OPTS:-"-Xmx3g -XX:MaxPermSize=256m"}
@@ -87,73 +96,102 @@ cd $GIT_DIR
 
 # Get the latest
 echo "Updating Git"
-git checkout master
-git pull
+git checkout -q master
+git pull -q
+status=$?
+if [ $status -ne 0 ]; then
+  echo "git pull command failed."
+  echo " Please examine and run this script again after you have corrected the 
problem."
+fi
+
+GIT_SHA=$(git log --pretty=format:%H -n1)
 
 # Generate the site to ~/git/hbase/target/site
-if [ $INTERACTIVE ]; then
-read -p "Build the site? (y/n)" yn
-case $yn in
-[Yy]* ) 
-  mvn clean package javadoc:aggregate post-site site:stage -DskipTests 
-Dcheckstyle.skip
-  status=$?
-  if [ $status -ne 0 ]; then
-echo "The website does not build. Aborting."
-exit $status
-  fi
-   ;;
-[Nn]* ) 
-  echo "Not building the site."
-;;
-esac
+if [ $INTERACTIVE -eq 1 ]; then
+  read -p "Build the site? (y/n)" yn
+  case $yn in
+[Yy]* )
+  echo "Building $GIT_SHA"
+  mvn clean site post-site site:stage
+  status=$?
+  if [ $status -ne 0 ]; then
+echo "The site does not build. Aborting."
+exit $status
+  fi
+  ;;
+[Nn]* )
+  echo "Not building the site."
+  if [ -d target/staging ]; then
+echo "Using site in $GIT_DIR/target/staging directory."
+  else
+echo "Not building the site but $GIT_DIR/target/staging does not 
exist. Giving up."
+exit 1
+  fi
+  ;;
+  esac
 else
   echo "Building the site in auto mode."
-  mvn clean package javadoc:aggregate post-site site:stage -DskipTests 
-Dcheckstyle.skip
+  mvn clean site post-site site:stage
   status=$?
   if [ $status != 0 ]; then
-echo "The website does not build. Aborting."
+echo "The site does not build. Aborting."
 exit 

[01/50] [abbrv] hbase git commit: HBASE-14597 Fix Groups cache in multi-threaded env

2015-10-23 Thread syuanjiang
Repository: hbase
Updated Branches:
  refs/heads/hbase-12439 6c3fd3447 -> 8b7796b0b


HBASE-14597 Fix Groups cache in multi-threaded env


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

Branch: refs/heads/hbase-12439
Commit: 0ed8b0e5d559e0499a85f8b1fbb3d3925a611688
Parents: 6076ed2
Author: Elliott Clark 
Authored: Tue Oct 13 08:30:12 2015 -0700
Committer: Elliott Clark 
Committed: Fri Oct 16 15:15:26 2015 -0700

--
 .../org/apache/hadoop/hbase/security/User.java  | 44 +++-
 .../hadoop/hbase/security/UserProvider.java | 40 ---
 .../apache/hadoop/hbase/security/TestUser.java  | 74 ++--
 3 files changed, 142 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0ed8b0e5/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
index 93ce003..c480dad 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
@@ -22,13 +22,18 @@ package org.apache.hadoop.hbase.security;
 import java.io.IOException;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
+import java.util.Arrays;
 import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import com.google.common.cache.LoadingCache;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.util.Methods;
+import org.apache.hadoop.security.Groups;
 import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
@@ -255,7 +260,7 @@ public abstract class User {
   @InterfaceAudience.Private
public static final class SecureHadoopUser extends User {
 private String shortName;
-private LoadingCache cache;
+private LoadingCache cache;
 
 public SecureHadoopUser() throws IOException {
   ugi = UserGroupInformation.getCurrentUser();
@@ -268,7 +273,7 @@ public abstract class User {
 }
 
 public SecureHadoopUser(UserGroupInformation ugi,
-LoadingCache 
cache) {
+LoadingCache cache) {
   this.ugi = ugi;
   this.cache = cache;
 }
@@ -289,7 +294,7 @@ public abstract class User {
 public String[] getGroupNames() {
   if (cache != null) {
 try {
-  return this.cache.get(ugi);
+  return this.cache.get(getShortName());
 } catch (ExecutionException e) {
   return new String[0];
 }
@@ -311,6 +316,13 @@ public abstract class User {
 /** @see User#createUserForTesting(org.apache.hadoop.conf.Configuration, 
String, String[]) */
 public static User createUserForTesting(Configuration conf,
 String name, String[] groups) {
+  synchronized (UserProvider.class) {
+if (!(UserProvider.groups instanceof TestingGroups)) {
+  UserProvider.groups = new TestingGroups(UserProvider.groups);
+}
+  }
+
+  ((TestingGroups)UserProvider.groups).setUserGroups(name, groups);
   return new 
SecureHadoopUser(UserGroupInformation.createUserForTesting(name, groups));
 }
 
@@ -340,4 +352,30 @@ public abstract class User {
   return UserGroupInformation.isSecurityEnabled();
 }
   }
+
+  static class TestingGroups extends Groups {
+private final Map userToGroupsMapping =
+new HashMap();
+private Groups underlyingImplementation;
+
+TestingGroups(Groups underlyingImplementation) {
+  super(new Configuration());
+  this.underlyingImplementation = underlyingImplementation;
+}
+
+@Override
+public List getGroups(String user) throws IOException {
+  List result = userToGroupsMapping.get(user);
+
+  if (result == null) {
+result = underlyingImplementation.getGroups(user);
+  }
+
+  return result;
+}
+
+private void setUserGroups(String user, String[] groups) {
+  userToGroupsMapping.put(user, Arrays.asList(groups));
+}
+  }
 }


[27/50] [abbrv] hbase git commit: Revert "HBASE-14326 Clarify that ExploringCompactionPolicy evaluates a selection of StoreFiles, not a single StoreFile"

2015-10-23 Thread syuanjiang
Revert "HBASE-14326 Clarify that ExploringCompactionPolicy evaluates a 
selection of StoreFiles, not a single StoreFile"

This reverts commit 6a90e7b43ba7a0eb54b446ffa1067cf5858ee8c6.


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

Branch: refs/heads/hbase-12439
Commit: fd50b5c033b2e7035510ad1d84a7e618ce96ff60
Parents: aa78ebb
Author: Misty Stanley-Jones 
Authored: Thu Oct 22 19:08:31 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 19:08:31 2015 +1000

--
 hbase-common/src/main/resources/hbase-default.xml | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/fd50b5c0/hbase-common/src/main/resources/hbase-default.xml
--
diff --git a/hbase-common/src/main/resources/hbase-default.xml 
b/hbase-common/src/main/resources/hbase-default.xml
index 1654391..b825bef 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -736,8 +736,7 @@ possible configurations would overwhelm and obscure the 
important.
   
 hbase.hstore.compaction.min.size
 134217728
-A StoreFile (or a selection of StoreFiles, when using 
ExploringCompactionPolicy)
-  smaller than this size will always be eligible for minor compaction.
+A StoreFile smaller than this size will always be eligible 
for minor compaction.
   HFiles this size or larger are evaluated by 
hbase.hstore.compaction.ratio to determine if
   they are eligible. Because this limit represents the "automatic 
include"limit for all
   StoreFiles smaller than this value, this value may need to be reduced in 
write-heavy
@@ -751,8 +750,7 @@ possible configurations would overwhelm and obscure the 
important.
 
 hbase.hstore.compaction.max.size
 9223372036854775807
-A StoreFile (or a selection of StoreFiles, when using 
ExploringCompactionPolicy)
-  larger than this size will be excluded from compaction. The effect of
+A StoreFile larger than this size will be excluded from 
compaction. The effect of
   raising hbase.hstore.compaction.max.size is fewer, larger StoreFiles 
that do not get
   compacted often. If you feel that compaction is happening too often 
without much benefit, you
   can try raising this value. Default: the value of LONG.MAX_VALUE, 
expressed in bytes.



[50/50] [abbrv] hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread syuanjiang
HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/hbase-12439
Commit: 8b7796b0b661ca960463c9e16034ee8f64494dbd
Parents: f340118
Author: tedyu 
Authored: Fri Oct 23 14:48:04 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 14:48:04 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 32 ++--
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  | 13 ++-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 29 +--
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 11 +++
 .../TestRegionObserverScannerOpenHook.java  |  9 +++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 17 files changed, 260 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8b7796b0/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index a9e2fca..6ce90bc 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -352,7 +351,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -370,10 +369,10 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final Region r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
-  if(LOG.isDebugEnabled()) {
+  if(LOG.isDebugEnabled() && r.getRegionInfo() != null) {
 LOG.debug("Not compacting " + 
r.getRegionInfo().getRegionNameAsString() +
 " because compaction request was cancelled");
   }
@@ -484,7 +483,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -496,7 +495,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -528,7 +527,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 //   put it into region/store/etc. This is CST logic.
 long start 

[25/50] [abbrv] hbase git commit: HBASE-14326 Clarify that ExploringCompactionPolicy evaluates a selection of StoreFiles, not a single StoreFile

2015-10-23 Thread syuanjiang
HBASE-14326 Clarify that ExploringCompactionPolicy evaluates a selection of 
StoreFiles, not a single StoreFile


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

Branch: refs/heads/hbase-12439
Commit: 6a90e7b43ba7a0eb54b446ffa1067cf5858ee8c6
Parents: ab677a1
Author: Misty Stanley-Jones 
Authored: Mon Oct 12 14:23:46 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 15:37:37 2015 +1000

--
 hbase-common/src/main/resources/hbase-default.xml | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6a90e7b4/hbase-common/src/main/resources/hbase-default.xml
--
diff --git a/hbase-common/src/main/resources/hbase-default.xml 
b/hbase-common/src/main/resources/hbase-default.xml
index b825bef..1654391 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -736,7 +736,8 @@ possible configurations would overwhelm and obscure the 
important.
   
 hbase.hstore.compaction.min.size
 134217728
-A StoreFile smaller than this size will always be eligible 
for minor compaction.
+A StoreFile (or a selection of StoreFiles, when using 
ExploringCompactionPolicy)
+  smaller than this size will always be eligible for minor compaction.
   HFiles this size or larger are evaluated by 
hbase.hstore.compaction.ratio to determine if
   they are eligible. Because this limit represents the "automatic 
include"limit for all
   StoreFiles smaller than this value, this value may need to be reduced in 
write-heavy
@@ -750,7 +751,8 @@ possible configurations would overwhelm and obscure the 
important.
 
 hbase.hstore.compaction.max.size
 9223372036854775807
-A StoreFile larger than this size will be excluded from 
compaction. The effect of
+A StoreFile (or a selection of StoreFiles, when using 
ExploringCompactionPolicy)
+  larger than this size will be excluded from compaction. The effect of
   raising hbase.hstore.compaction.max.size is fewer, larger StoreFiles 
that do not get
   compacted often. If you feel that compaction is happening too often 
without much benefit, you
   can try raising this value. Default: the value of LONG.MAX_VALUE, 
expressed in bytes.



[03/50] [abbrv] hbase git commit: HBASE-14621 ReplicationLogCleaner stuck on RS crash.

2015-10-23 Thread syuanjiang
HBASE-14621 ReplicationLogCleaner stuck on RS crash.

Signed-off-by: Elliott Clark 


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

Branch: refs/heads/hbase-12439
Commit: 6774f223a4a1cfd3cd81a17861ac94faad3b2916
Parents: e874a31
Author: Ashu Pachauri 
Authored: Thu Oct 15 11:58:33 2015 -0700
Committer: Elliott Clark 
Committed: Fri Oct 16 15:26:02 2015 -0700

--
 .../master/ReplicationLogCleaner.java   |  2 +-
 .../hbase/master/cleaner/TestLogsCleaner.java   | 24 
 2 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6774f223/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
index 474f497..a6b6dd8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java
@@ -95,8 +95,8 @@ public class ReplicationLogCleaner extends 
BaseLogCleanerDelegate implements Abo
* not be included.
*/
   private Set loadWALsFromQueues() throws KeeperException {
-int v0 = replicationQueues.getQueuesZNodeCversion();
 for (int retry = 0; ; retry++) {
+  int v0 = replicationQueues.getQueuesZNodeCversion();
   List rss = replicationQueues.getListOfReplicators();
   if (rss == null) {
 LOG.debug("Didn't find any region server that replicates, won't 
prevent any deletions.");

http://git-wip-us.apache.org/repos/asf/hbase/blob/6774f223/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
index 768b015..f874523 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
@@ -20,7 +20,9 @@ package org.apache.hadoop.hbase.master.cleaner;
 import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
+import java.lang.reflect.Field;
 import java.net.URLEncoder;
+import java.util.LinkedList;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
@@ -36,6 +38,8 @@ import org.apache.hadoop.hbase.Waiter;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.replication.ReplicationFactory;
 import org.apache.hadoop.hbase.replication.ReplicationQueues;
+import org.apache.hadoop.hbase.replication.ReplicationQueuesClient;
+import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner;
 import org.apache.hadoop.hbase.replication.regionserver.Replication;
 import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
@@ -45,6 +49,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.mockito.Mockito;
 
 @Category({MasterTests.class, MediumTests.class})
 public class TestLogsCleaner {
@@ -126,6 +131,7 @@ public class TestLogsCleaner {
 assertEquals(34, fs.listStatus(oldLogDir).length);
 
 LogCleaner cleaner  = new LogCleaner(1000, server, conf, fs, oldLogDir);
+
 cleaner.chore();
 
 // We end up with the current log file, a newer one and the 3 old log
@@ -142,6 +148,24 @@ public class TestLogsCleaner {
 }
   }
 
+  @Test(timeout=5000)
+  public void testZnodeCversionChange() throws Exception {
+Configuration conf = TEST_UTIL.getConfiguration();
+ReplicationLogCleaner cleaner = new ReplicationLogCleaner();
+cleaner.setConf(conf);
+
+ReplicationQueuesClient rqcMock = 
Mockito.mock(ReplicationQueuesClient.class);
+Mockito.when(rqcMock.getQueuesZNodeCversion()).thenReturn(1, 2, 3, 4);
+
+Field rqc = 
ReplicationLogCleaner.class.getDeclaredField("replicationQueues");
+rqc.setAccessible(true);
+
+rqc.set(cleaner, rqcMock);
+
+// This should return eventually when cversion stabilizes
+cleaner.getDeletableFiles(new LinkedList());
+  }
+
  

[05/50] [abbrv] hbase git commit: HBASE-14637 Loosen TestChoreService assert AND have TestDataBlockEncoders do less work (and add timeouts)

2015-10-23 Thread syuanjiang
HBASE-14637 Loosen TestChoreService assert AND have TestDataBlockEncoders do 
less work (and add timeouts)


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

Branch: refs/heads/hbase-12439
Commit: 71b38d60bbd26ff80ac23c53149d8da85976f39b
Parents: d9ee191
Author: stack 
Authored: Sat Oct 17 16:14:45 2015 -0700
Committer: stack 
Committed: Sat Oct 17 16:14:45 2015 -0700

--
 .../java/org/apache/hadoop/hbase/TestChoreService.java |  9 -
 .../hbase/io/encoding/TestDataBlockEncoders.java   | 13 -
 2 files changed, 16 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/71b38d60/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java
--
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java
index 14a2cbb..9ee6b40 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java
@@ -38,8 +38,6 @@ import org.junit.experimental.categories.Category;
 
 @Category(SmallTests.class)
 public class TestChoreService {
-  private static final Log LOG = LogFactory.getLog(TestChoreService.class);
-
   /**
* A few ScheduledChore samples that are useful for testing with ChoreService
*/
@@ -373,7 +371,7 @@ public class TestChoreService {
 final int period = 100;
 final int delta = 5;
 ChoreService service = ChoreService.getInstance("testForceTrigger");
-CountingChore chore = new CountingChore("countingChore", period);
+final CountingChore chore = new CountingChore("countingChore", period);
 try {
   service.scheduleChore(chore);
   Thread.sleep(10 * period + delta);
@@ -393,11 +391,12 @@ public class TestChoreService {
   chore.triggerNow();
   Thread.sleep(delta);
 
-  assertTrue(chore.getCountOfChoreCalls() == 16);
+  assertTrue("" + chore.getCountOfChoreCalls(), 
chore.getCountOfChoreCalls() == 16);
 
   Thread.sleep(10 * period + delta);
 
-  assertTrue(chore.getCountOfChoreCalls() == 26);
+  // Be loosey-goosey. It used to be '26' but it was a big flakey relying 
on timing.
+  assertTrue("" + chore.getCountOfChoreCalls(), 
chore.getCountOfChoreCalls() > 16);
 } finally {
   shutdownService(service);
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/71b38d60/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
index 075c6fe..63fe57b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
@@ -30,6 +30,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Random;
 
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.CellUtil;
@@ -49,11 +50,14 @@ import org.apache.hadoop.hbase.testclassification.IOTests;
 import org.apache.hadoop.hbase.testclassification.LargeTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.test.RedundantKVGenerator;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
+import org.mortbay.log.Log;
 
 /**
  * Test all of the data block encoding algorithms for correctness. Most of the
@@ -62,9 +66,11 @@ import org.junit.runners.Parameterized.Parameters;
 @Category({IOTests.class, LargeTests.class})
 @RunWith(Parameterized.class)
 public class TestDataBlockEncoders {
+  @Rule public final TestRule timeout = CategoryBasedTimeout.builder().
+  withTimeout(this.getClass()).withLookingForStuckThread(true).build();
 
   private static int NUMBER_OF_KV = 1;
-  private static int NUM_RANDOM_SEEKS = 1;
+  private static int NUM_RANDOM_SEEKS = 1000;
 
   private static int ENCODED_DATA_OFFSET = HConstants.HFILEBLOCK_HEADER_SIZE
   + DataBlockEncoding.ID_SIZE;
@@ -182,6 +188,7 @@ 

[29/50] [abbrv] hbase git commit: Revert "Lots of work on the POM to enhance Javadocs, Xrefs"

2015-10-23 Thread syuanjiang
Revert "Lots of work on the POM to enhance Javadocs, Xrefs"

This reverts commit aa78ebbd5a589efbf979e63e0a7e35f0e410f350.


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

Branch: refs/heads/hbase-12439
Commit: 74d523206532be99c04225b681b428d5ef220049
Parents: c4fa884
Author: Misty Stanley-Jones 
Authored: Thu Oct 22 19:11:40 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 19:11:40 2015 +1000

--
 .../apache/hadoop/hbase/HTableDescriptor.java   |   6 +-
 pom.xml | 224 +--
 src/main/site/site.xml  |  38 ++--
 3 files changed, 66 insertions(+), 202 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/74d52320/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
index f3d7312..28d125d 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
@@ -320,7 +320,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a TableName object
* @param name Table name.
-   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 HBASE: 
(HBASE-174) Un-openable tablename bug
+   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
*/
   public HTableDescriptor(final TableName name) {
 super();
@@ -330,7 +330,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a byte array table name
* @param name Table name.
-   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
+   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
*/
   @Deprecated
   public HTableDescriptor(final byte[] name) {
@@ -340,7 +340,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a String table name
* @param name Table name.
-   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
+   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
*/
   @Deprecated
   public HTableDescriptor(final String name) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/74d52320/pom.xml
--
diff --git a/pom.xml b/pom.xml
index dadb714..b723113 100644
--- a/pom.xml
+++ b/pom.xml
@@ -971,13 +971,31 @@
 false
 
   
+copy-javadocs
+
+  copy-resources
+
+site
+
+  target/site/apidocs
+  
+
+  ${basedir}/target/apidocs
+  
+**/**
+  
+
+  
+
+  
+  
 copy-htaccess
 
   copy-resources
 
 post-site
 
-  
${project.reporting.outputDirectory}/
+  ${basedir}/target/site
   
 
   ${basedir}/src/main/site/resources/
@@ -996,7 +1014,7 @@
 
 post-site
 
-  
${project.reporting.outputDirectory}/
+  ${basedir}/target/site
   
 
   ${basedir}/src/main/site/resources/
@@ -1057,7 +1075,7 @@
   
 
 
-  
${project.reporting.outputDirectory}/
+  target/site
   book
   images
   coderay
@@ -1109,8 +1127,8 @@
 post-site
 
   
-
-
+
+
   
 
 
@@ -2757,19 +2775,19 @@
 
   
 
-  
   
 org.apache.maven.plugins
 maven-jxr-plugin
 2.3
 
   true
-  true
   true
-  
${project.reporting.outputDirectory}/devapidocs
-  
${project.reporting.outputDirectory}/testdevapidocs
-  ${project.reporting.outputDirectory}/xref
+  ${basedir}/target/site/apidocs
+  
${basedir}/target/site/xref
+  ${basedir}/target/site/xref
+  
+

[36/50] [abbrv] hbase git commit: HBASE-14669 remove unused import and fix javadoc

2015-10-23 Thread syuanjiang
http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
--
diff --git 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
index 3251d13..bef35f6 100644
--- 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
+++ 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.hbase.client.Append;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HRegionLocator;
 import org.apache.hadoop.hbase.client.Increment;
 import org.apache.hadoop.hbase.client.OperationWithAttributes;
 import org.apache.hadoop.hbase.client.Put;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
--
diff --git 
a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
 
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
index 5b7a808..8003bff 100644
--- 
a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
+++ 
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Increment;

http://git-wip-us.apache.org/repos/asf/hbase/blob/36a19672/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
--
diff --git 
a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
 
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
index 9153c9b..89ed909 100644
--- 
a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
+++ 
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
 import 
org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.UserProvider;



[17/50] [abbrv] hbase git commit: HBASE-14643 - Avoid Splits from once again opening a closed reader for fetching the first and last key (Heng Chen)

2015-10-23 Thread syuanjiang
HBASE-14643 - Avoid Splits from once again opening a closed reader for
fetching the first and last key (Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: 6e3b7af0efced7351163a5011a44bfc18851fce0
Parents: 5a5b854
Author: ramkrishna 
Authored: Wed Oct 21 10:12:38 2015 +0530
Committer: ramkrishna 
Committed: Wed Oct 21 10:12:38 2015 +0530

--
 .../hbase/regionserver/HRegionFileSystem.java   |  8 +++
 .../hadoop/hbase/regionserver/StoreFile.java| 23 
 .../hbase/regionserver/TestStoreFile.java   |  5 -
 3 files changed, 31 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3b7af0/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
index b16738f..412f9b3 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
@@ -587,23 +587,23 @@ public class HRegionFileSystem {
 if (top) {
   //check if larger than last key.
   KeyValue splitKey = KeyValueUtil.createFirstOnRow(splitRow);
-  Cell lastKey = f.createReader().getLastKey();
+  Cell lastKey = f.getLastKey();
   // If lastKey is null means storefile is empty.
   if (lastKey == null) {
 return null;
   }
-  if (f.getReader().getComparator().compare(splitKey, lastKey) > 0) {
+  if (f.getComparator().compare(splitKey, lastKey) > 0) {
 return null;
   }
 } else {
   //check if smaller than first key
   KeyValue splitKey = KeyValueUtil.createLastOnRow(splitRow);
-  Cell firstKey = f.createReader().getFirstKey();
+  Cell firstKey = f.getFirstKey();
   // If firstKey is null means storefile is empty.
   if (firstKey == null) {
 return null;
   }
-  if (f.getReader().getComparator().compare(splitKey, firstKey) < 0) {
+  if (f.getComparator().compare(splitKey, firstKey) < 0) {
 return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3b7af0/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
index 11d71cf..88aa151 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
@@ -129,6 +129,25 @@ public class StoreFile {
   // Set when we obtain a Reader.
   private long maxMemstoreTS = -1;
 
+  // firstKey, lastkey and cellComparator will be set when openReader.
+  private Cell firstKey;
+
+  private Cell lastKey;
+
+  private Comparator comparator;
+
+  public Cell getFirstKey() {
+return firstKey;
+  }
+
+  public Cell getLastKey() {
+return lastKey;
+  }
+
+  public Comparator getComparator() {
+return comparator;
+  }
+
   public long getMaxMemstoreTS() {
 return maxMemstoreTS;
   }
@@ -475,6 +494,10 @@ public class StoreFile {
   "proceeding without", e);
   this.reader.timeRangeTracker = null;
 }
+// initialize so we can reuse them after reader closed.
+firstKey = reader.getFirstKey();
+lastKey = reader.getLastKey();
+comparator = reader.getComparator();
 return this.reader;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6e3b7af0/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
index b763a22..85e4439 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
@@ -175,6 +175,8 @@ public class TestStoreFile extends 

[30/50] [abbrv] hbase git commit: HBASE-14603 Lots of work on the POM to enhance Javadocs, Xrefs

2015-10-23 Thread syuanjiang
HBASE-14603 Lots of work on the POM to enhance Javadocs, Xrefs

* We now have apidocs, devapidocs, testapidocs, and testdevapidocs
* When using reportSets, the Javadoc plugin ignores the plugin configuration,
  so I propagated it to the individual reportSet configuration blocks.
* I was able to remove some of the logic that moved / copied things around
  in post-site.
* We now have xref and xref-test (these are superfluous but something needs them
  so I left them)
* Added source to Javadocs -- you can click a method or property to browse its 
source.
  More user-friendly than xref maybe.
* You can now get the whole site to build by doing 'mvn clean site site:stage' 
and
  it takes about 10 minutes.


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

Branch: refs/heads/hbase-12439
Commit: 2996355e9417faf228a08c4ec88b951a0fcb1ab5
Parents: 74d5232
Author: Misty Stanley-Jones 
Authored: Fri Oct 16 23:37:20 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 19:12:42 2015 +1000

--
 .../apache/hadoop/hbase/HTableDescriptor.java   |   6 +-
 pom.xml | 224 ++-
 src/main/site/site.xml  |  38 ++--
 3 files changed, 202 insertions(+), 66 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2996355e/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
index 28d125d..f3d7312 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
@@ -320,7 +320,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a TableName object
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 HBASE: 
(HBASE-174) Un-openable tablename bug
*/
   public HTableDescriptor(final TableName name) {
 super();
@@ -330,7 +330,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a byte array table name
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
*/
   @Deprecated
   public HTableDescriptor(final byte[] name) {
@@ -340,7 +340,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a String table name
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
*/
   @Deprecated
   public HTableDescriptor(final String name) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2996355e/pom.xml
--
diff --git a/pom.xml b/pom.xml
index b723113..dadb714 100644
--- a/pom.xml
+++ b/pom.xml
@@ -971,31 +971,13 @@
 false
 
   
-copy-javadocs
-
-  copy-resources
-
-site
-
-  target/site/apidocs
-  
-
-  ${basedir}/target/apidocs
-  
-**/**
-  
-
-  
-
-  
-  
 copy-htaccess
 
   copy-resources
 
 post-site
 
-  ${basedir}/target/site
+  
${project.reporting.outputDirectory}/
   
 
   ${basedir}/src/main/site/resources/
@@ -1014,7 +996,7 @@
 
 post-site
 
-  ${basedir}/target/site
+  
${project.reporting.outputDirectory}/
   
 
   ${basedir}/src/main/site/resources/
@@ -1075,7 +1057,7 @@
   
 
 
-  target/site
+  
${project.reporting.outputDirectory}/
   book
   images
   coderay
@@ -1127,8 +1109,8 @@
 post-site
 
   
-
-
+

[43/50] [abbrv] hbase git commit: HBASE-14657 Remove unneeded API from EncodedSeeker (Heng Chen)

2015-10-23 Thread syuanjiang
HBASE-14657 Remove unneeded API from EncodedSeeker (Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: c21e8ed1d860f3b380b260890d04cd2c492ab0a3
Parents: 467bc09
Author: stack 
Authored: Thu Oct 22 14:20:28 2015 -0700
Committer: stack 
Committed: Thu Oct 22 14:20:28 2015 -0700

--
 .../io/encoding/BufferedDataBlockEncoder.java   | 32 
 .../hbase/io/encoding/DataBlockEncoder.java |  4 ---
 .../codec/prefixtree/PrefixTreeSeeker.java  |  8 -
 .../io/encoding/TestDataBlockEncoders.java  |  7 +++--
 4 files changed, 4 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c21e8ed1/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
index 87a5b79..8919d01 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
@@ -760,38 +760,6 @@ abstract class BufferedDataBlockEncoder implements 
DataBlockEncoder {
 }
 
 @Override
-public ByteBuffer getKeyValueBuffer() {
-  ByteBuffer kvBuffer = createKVBuffer();
-  kvBuffer.putInt(current.keyLength);
-  kvBuffer.putInt(current.valueLength);
-  kvBuffer.put(current.keyBuffer, 0, current.keyLength);
-  currentBuffer.get(kvBuffer, current.valueOffset, current.valueLength);
-  if (current.tagsLength > 0) {
-// Put short as unsigned
-kvBuffer.put((byte) (current.tagsLength >> 8 & 0xff));
-kvBuffer.put((byte) (current.tagsLength & 0xff));
-if (current.tagsOffset != -1) {
-  // the offset of the tags bytes in the underlying buffer is marked. 
So the temp
-  // buffer,tagsBuffer was not been used.
-  currentBuffer.get(kvBuffer, current.tagsOffset, current.tagsLength);
-} else {
-  // When tagsOffset is marked as -1, tag compression was present and 
so the tags were
-  // uncompressed into temp buffer, tagsBuffer. Let us copy it from 
there
-  kvBuffer.put(current.tagsBuffer, 0, current.tagsLength);
-}
-  }
-  kvBuffer.rewind();
-  return kvBuffer;
-}
-
-protected ByteBuffer createKVBuffer() {
-  int kvBufSize = (int) 
KeyValue.getKeyValueDataStructureSize(current.keyLength,
-  current.valueLength, current.tagsLength);
-  ByteBuffer kvBuffer = ByteBuffer.allocate(kvBufSize);
-  return kvBuffer;
-}
-
-@Override
 public Cell getCell() {
   return current.toCell();
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/c21e8ed1/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java
index ed4528c..397855a 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java
@@ -154,10 +154,6 @@ public interface DataBlockEncoder {
  * @return value at current position
  */
 ByteBuffer getValueShallowCopy();
-
-//TODO : to be removed - currently used in testcases only
-/** @return a key value buffer with the position set at the beginning of 
the buffer */
-ByteBuffer getKeyValueBuffer();
 
 /**
  * @return the Cell at the current position. Includes memstore timestamp.

http://git-wip-us.apache.org/repos/asf/hbase/blob/c21e8ed1/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
--
diff --git 
a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
 
b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
index 71935e3..4be72fd 100644
--- 
a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
+++ 

[11/50] [abbrv] hbase git commit: HBASE-14647 Disable TestWALProcedureStoreOnHDFS#testWalRollOnLowReplication

2015-10-23 Thread syuanjiang
HBASE-14647 Disable TestWALProcedureStoreOnHDFS#testWalRollOnLowReplication


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

Branch: refs/heads/hbase-12439
Commit: c1f0442045f44fcbb3935f9244794929a5d0caea
Parents: ea0cf39
Author: stack 
Authored: Mon Oct 19 10:39:09 2015 -0700
Committer: stack 
Committed: Mon Oct 19 10:39:09 2015 -0700

--
 .../master/procedure/TestWALProcedureStoreOnHDFS.java  | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c1f04420/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
index 8712c80..f615c1a 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestWALProcedureStoreOnHDFS.java
@@ -55,6 +55,7 @@ import org.apache.hadoop.hdfs.server.datanode.DataNode;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
@@ -182,7 +183,7 @@ public class TestWALProcedureStoreOnHDFS {
reCount.get() < thread.length);
   }
 
-  @Test(timeout=6)
+  @Ignore ("Needs work") @Test(timeout=6)
   public void testWalRollOnLowReplication() throws Exception {
 store.unregisterListener(stopProcedureListener);
 store.registerListener(new ProcedureStore.ProcedureStoreListener() {
@@ -191,6 +192,7 @@ public class TestWALProcedureStoreOnHDFS {
 
   @Override
   public void abortProcess() {
+LOG.info("Aborted");
   }
 });
 int dnCount = 0;
@@ -203,9 +205,12 @@ public class TestWALProcedureStoreOnHDFS {
 String msg = re.getMessage();
 // We could get a sync failed here...if the test cluster is crawling 
such that DN recovery
 // is taking a long time. If we've done enough passes, just finish up 
the test as a 'pass'
-if (msg != null && msg.toLowerCase().contains("sync aborted") && i > 
50) {
-  LOG.info("Returning early... We ran enough of this test", re);
-  return;
+if (msg != null && msg.toLowerCase().contains("sync aborted")) {
+  LOG.info("i=" + i, re);
+  if (i > 50) {
+LOG.info("Returning early... i=" + i + "...We ran enough of this 
test", re);
+return;
+  }
 }
 throw re;
   }



[10/50] [abbrv] hbase git commit: HBASE-14646 Move TestCellACLs from medium to large category

2015-10-23 Thread syuanjiang
HBASE-14646 Move TestCellACLs from medium to large category


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

Branch: refs/heads/hbase-12439
Commit: ea0cf399b4b665d6a0daa0c4e616e893e377a283
Parents: fb583dd
Author: stack 
Authored: Mon Oct 19 10:34:55 2015 -0700
Committer: stack 
Committed: Mon Oct 19 10:34:55 2015 -0700

--
 .../apache/hadoop/hbase/security/access/TestCellACLs.java   | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ea0cf399/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCellACLs.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCellACLs.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCellACLs.java
index 4b14f66..f73fcfd 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCellACLs.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCellACLs.java
@@ -26,12 +26,12 @@ import java.util.Map;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.AuthUtil;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableNotFoundException;
 import org.apache.hadoop.hbase.client.Admin;
@@ -45,12 +45,11 @@ import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Table;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.master.MasterCoprocessorHost;
 import org.apache.hadoop.hbase.regionserver.RegionServerCoprocessorHost;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.access.Permission.Action;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.testclassification.LargeTests;
 import org.apache.hadoop.hbase.testclassification.SecurityTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.TestTableName;
@@ -67,7 +66,7 @@ import org.junit.experimental.categories.Category;
 
 import com.google.common.collect.Lists;
 
-@Category({SecurityTests.class, MediumTests.class})
+@Category({SecurityTests.class, LargeTests.class})
 public class TestCellACLs extends SecureTestUtil {
   private static final Log LOG = LogFactory.getLog(TestCellACLs.class);
 
@@ -466,4 +465,4 @@ public class TestCellACLs extends SecureTestUtil {
 }
 assertEquals(0, AccessControlLists.getTablePermissions(conf, 
TEST_TABLE.getTableName()).size());
   }
-}
+}
\ No newline at end of file



[48/50] [abbrv] hbase git commit: HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests (Heng Chen)

2015-10-23 Thread syuanjiang
HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests (Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: ef7f8467af52cd1d6563ad5b1f6624be6872a165
Parents: b4ba615
Author: stack 
Authored: Fri Oct 23 11:29:48 2015 -0700
Committer: stack 
Committed: Fri Oct 23 11:29:48 2015 -0700

--
 .../org/apache/hadoop/hbase/mapred/TestTableInputFormat.java | 8 
 .../apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java   | 2 --
 .../hbase/mapreduce/MultiTableInputFormatTestBase.java   | 3 ---
 .../hbase/mapreduce/TableSnapshotInputFormatTestBase.java| 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestCellCounter.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestCopyTable.java | 2 --
 .../apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java | 6 --
 .../hadoop/hbase/mapreduce/TestHFileOutputFormat2.java   | 6 --
 .../hadoop/hbase/mapreduce/TestHRegionPartitioner.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestHashTable.java | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestImportExport.java  | 2 --
 .../mapreduce/TestImportTSVWithOperationAttributes.java  | 2 --
 .../apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java | 2 --
 .../hbase/mapreduce/TestImportTSVWithVisibilityLabels.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestImportTsv.java | 2 --
 .../hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestRowCounter.java| 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestSyncTable.java | 2 --
 .../apache/hadoop/hbase/mapreduce/TestTableInputFormat.java  | 2 --
 .../hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java | 3 ---
 .../hadoop/hbase/mapreduce/TestTableMapReduceBase.java   | 2 --
 .../apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java   | 2 --
 .../org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java | 2 --
 .../org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java | 2 --
 .../apache/hadoop/hbase/snapshot/TestMobExportSnapshot.java  | 1 -
 .../hadoop/hbase/snapshot/TestMobSecureExportSnapshot.java   | 1 -
 .../hadoop/hbase/snapshot/TestSecureExportSnapshot.java  | 1 -
 27 files changed, 4 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7f8467/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
index 8498341..1975c59 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java
@@ -34,6 +34,7 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.client.Connection;
@@ -80,7 +81,7 @@ public class TestTableInputFormat {
   private static final Log LOG = LogFactory.getLog(TestTableInputFormat.class);
 
   private final static HBaseTestingUtility UTIL = new HBaseTestingUtility();
-  private static MiniMRCluster mrCluster;
+
   static final byte[] FAMILY = Bytes.toBytes("family");
 
   private static final byte[][] columns = new byte[][] { FAMILY };
@@ -88,12 +89,10 @@ public class TestTableInputFormat {
   @BeforeClass
   public static void beforeClass() throws Exception {
 UTIL.startMiniCluster();
-mrCluster = UTIL.startMiniMapReduceCluster();
   }
 
   @AfterClass
   public static void afterClass() throws Exception {
-UTIL.shutdownMiniMapReduceCluster();
 UTIL.shutdownMiniCluster();
   }
 
@@ -344,7 +343,8 @@ public class TestTableInputFormat {
   }
 
   void testInputFormat(Class clazz) throws IOException {
-final JobConf job = MapreduceTestingShim.getJobConf(mrCluster);
+Configuration conf = UTIL.getConfiguration();
+final JobConf job = new JobConf(conf);
 job.setInputFormat(clazz);
 job.setOutputFormat(NullOutputFormat.class);
 job.setMapperClass(ExampleVerifier.class);

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7f8467/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java
--
diff --git 

[09/50] [abbrv] hbase git commit: HBASE-14541 TestHFileOutputFormat.testMRIncrementalLoadWithSplit failed due to too many splits and few retries

2015-10-23 Thread syuanjiang
HBASE-14541 TestHFileOutputFormat.testMRIncrementalLoadWithSplit failed due to 
too many splits and few retries


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

Branch: refs/heads/hbase-12439
Commit: fb583dd1ea5850f8d826bd39f9f8a61f5053e8e3
Parents: 57fea77
Author: Matteo Bertozzi 
Authored: Mon Oct 19 09:22:59 2015 -0700
Committer: Matteo Bertozzi 
Committed: Mon Oct 19 09:22:59 2015 -0700

--
 .../hbase/mapreduce/LoadIncrementalHFiles.java  |  7 ++-
 .../mapreduce/TestLoadIncrementalHFiles.java| 22 
 2 files changed, 28 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/fb583dd1/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
index 9ff8a22..7a59ea1 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
@@ -398,6 +398,7 @@ public class LoadIncrementalHFiles extends Configured 
implements Tool {
 }
 
 int maxRetries = getConf().getInt("hbase.bulkload.retries.number", 10);
+maxRetries = Math.max(maxRetries, startEndKeys.getFirst().length + 1);
 if (maxRetries != 0 && count >= maxRetries) {
   throw new IOException("Retry attempted " + count +
 " times without completing, bailing out");
@@ -581,7 +582,11 @@ public class LoadIncrementalHFiles extends Configured 
implements Tool {
 
 // We use a '_' prefix which is ignored when walking directory trees
 // above.
-final Path tmpDir = new Path(item.hfilePath.getParent(), "_tmp");
+final String TMP_DIR = "_tmp";
+Path tmpDir = item.hfilePath.getParent();
+if (!tmpDir.getName().equals(TMP_DIR)) {
+  tmpDir = new Path(tmpDir, TMP_DIR);
+}
 
 LOG.info("HFile at " + hfilePath + " no longer fits inside a single " +
 "region. Splitting...");

http://git-wip-us.apache.org/repos/asf/hbase/blob/fb583dd1/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFiles.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFiles.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFiles.java
index 20c64c4..fcf9ef2 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFiles.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFiles.java
@@ -189,6 +189,28 @@ public class TestLoadIncrementalHFiles {
 testRegionCrossingHFileSplit(BloomType.ROWCOL);
   }
 
+  @Test
+  public void testSplitALot() throws Exception {
+runTest("testSplitALot", BloomType.NONE,
+  new byte[][] {
+Bytes.toBytes(""), Bytes.toBytes("bbb"),
+Bytes.toBytes("ccc"), Bytes.toBytes("ddd"),
+Bytes.toBytes("eee"), Bytes.toBytes("fff"),
+Bytes.toBytes("ggg"), Bytes.toBytes("hhh"),
+Bytes.toBytes("iii"), Bytes.toBytes("lll"),
+Bytes.toBytes("mmm"), Bytes.toBytes("nnn"),
+Bytes.toBytes("ooo"), Bytes.toBytes("ppp"),
+Bytes.toBytes("qqq"), Bytes.toBytes("rrr"),
+Bytes.toBytes("sss"), Bytes.toBytes("ttt"),
+Bytes.toBytes("uuu"), Bytes.toBytes("vvv"),
+Bytes.toBytes("zzz"),
+  },
+  new byte[][][] {
+new byte[][] { Bytes.toBytes(""), Bytes.toBytes("zzz") },
+  }
+);
+  }
+
   private void testRegionCrossingHFileSplit(BloomType bloomType) throws 
Exception {
 runTest("testHFileSplit" + bloomType + "Bloom", bloomType,
 new byte[][] {



[26/50] [abbrv] hbase git commit: Lots of work on the POM to enhance Javadocs, Xrefs

2015-10-23 Thread syuanjiang
Lots of work on the POM to enhance Javadocs, Xrefs

* We now have apidocs, devapidocs, testapidocs, and testdevapidocs
* When using reportSets, the Javadoc plugin ignores the plugin configuration,
  so I propagated it to the individual reportSet configuration blocks.
* I was able to remove some of the logic that moved / copied things around
  in post-site.
* We now have xref and xref-test (these are superfluous but something needs them
  so I left them)
* Added source to Javadocs -- you can click a method or property to browse its 
source.
  More user-friendly than xref maybe.
* You can now get the whole site to build by doing 'mvn clean site site:stage' 
and
  it takes about 10 minutes.


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

Branch: refs/heads/hbase-12439
Commit: aa78ebbd5a589efbf979e63e0a7e35f0e410f350
Parents: 6a90e7b
Author: Misty Stanley-Jones 
Authored: Fri Oct 16 23:37:20 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 18:29:08 2015 +1000

--
 .../apache/hadoop/hbase/HTableDescriptor.java   |   6 +-
 pom.xml | 238 ++-
 src/main/site/site.xml  |  38 ++-
 3 files changed, 203 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/aa78ebbd/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
index 28d125d..f3d7312 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
@@ -320,7 +320,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a TableName object
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 HBASE: 
(HBASE-174) Un-openable tablename bug
*/
   public HTableDescriptor(final TableName name) {
 super();
@@ -330,7 +330,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a byte array table name
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
*/
   @Deprecated
   public HTableDescriptor(final byte[] name) {
@@ -340,7 +340,7 @@ public class HTableDescriptor implements 
Comparable {
   /**
* Construct a table descriptor specifying a String table name
* @param name Table name.
-   * @see HADOOP-1581 HBASE: Un-openable tablename 
bug
+   * @see https://issues.apache.org/jira/browse/HBASE-174;>HADOOP-1581 (HBASE-174) 
HBASE: Un-openable tablename bug
*/
   @Deprecated
   public HTableDescriptor(final String name) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/aa78ebbd/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 256a2ed..e505399 100644
--- a/pom.xml
+++ b/pom.xml
@@ -971,31 +971,13 @@
 false
 
   
-copy-javadocs
-
-  copy-resources
-
-site
-
-  target/site/apidocs
-  
-
-  ${basedir}/target/apidocs
-  
-**/**
-  
-
-  
-
-  
-  
 copy-htaccess
 
   copy-resources
 
 post-site
 
-  ${basedir}/target/site
+  
${project.reporting.outputDirectory}/
   
 
   ${basedir}/src/main/site/resources/
@@ -1014,7 +996,7 @@
 
 post-site
 
-  ${basedir}/target/site
+  
${project.reporting.outputDirectory}/
   
 
   ${basedir}/src/main/site/resources/
@@ -1075,7 +1057,7 @@
   
 
 
-  target/site
+  
${project.reporting.outputDirectory}/
   book
   images
   coderay
@@ -1127,8 +1109,8 @@
 post-site
 
   
-
-
+
+   

[49/50] [abbrv] hbase git commit: HBASE-14685 Procedure Id is not set for MasterRpcServices#modifyTable

2015-10-23 Thread syuanjiang
HBASE-14685 Procedure Id is not set for MasterRpcServices#modifyTable

Signed-off-by: Matteo Bertozzi 


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

Branch: refs/heads/hbase-12439
Commit: f34011860e04fd1261b3b30cab0265016a22faa2
Parents: ef7f846
Author: Ashish Singhi 
Authored: Fri Oct 23 23:11:35 2015 +0530
Committer: Matteo Bertozzi 
Committed: Fri Oct 23 11:37:10 2015 -0700

--
 .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f3401186/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index f5dcd0e..b269c3d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -1214,15 +1214,15 @@ public class MasterRpcServices extends RSRpcServices
   public ModifyTableResponse modifyTable(RpcController controller,
   ModifyTableRequest req) throws ServiceException {
 try {
-  master.modifyTable(
+  long procId = master.modifyTable(
 ProtobufUtil.toTableName(req.getTableName()),
 HTableDescriptor.convert(req.getTableSchema()),
 req.getNonceGroup(),
 req.getNonce());
+  return ModifyTableResponse.newBuilder().setProcId(procId).build();
 } catch (IOException ioe) {
   throw new ServiceException(ioe);
 }
-return ModifyTableResponse.newBuilder().build();
   }
 
   @Override



[16/50] [abbrv] hbase git commit: HBASE-14633 Try fluid width UI

2015-10-23 Thread syuanjiang
HBASE-14633 Try fluid width UI


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

Branch: refs/heads/hbase-12439
Commit: 5a5b854c2a66200e24b46682c5cf19d67142c06f
Parents: a532ed7
Author: Elliott Clark 
Authored: Sat Oct 17 11:10:42 2015 -0700
Committer: Elliott Clark 
Committed: Tue Oct 20 17:45:47 2015 -0700

--
 .../src/main/resources/hbase-webapps/rest/rest.jsp |  4 ++--
 .../hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon|  4 ++--
 .../hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon  |  4 ++--
 .../main/resources/hbase-webapps/master/snapshot.jsp   |  6 +++---
 .../src/main/resources/hbase-webapps/master/table.jsp  | 13 -
 .../resources/hbase-webapps/master/tablesDetailed.jsp  |  4 ++--
 .../src/main/resources/hbase-webapps/master/zk.jsp |  4 ++--
 .../main/resources/hbase-webapps/static/css/hbase.css  |  9 +++--
 .../src/main/resources/hbase-webapps/thrift/thrift.jsp |  4 ++--
 .../main/resources/hbase-webapps/static/css/hbase.css  |  9 +++--
 .../src/main/resources/hbase-webapps/thrift/thrift.jsp |  4 ++--
 11 files changed, 35 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5a5b854c/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
--
diff --git a/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp 
b/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
index 43895a8..afc0b2f 100644
--- a/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
+++ b/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
@@ -45,7 +45,7 @@ String listenPort = conf.get("hbase.rest.port", "8080");
 
   
   
-  
+  
   
   
   
@@ -68,7 +68,7 @@ String listenPort = conf.get("hbase.rest.port", "8080");
   
   
 
-
+
 
 
 RESTServer <%= listenPort %>

http://git-wip-us.apache.org/repos/asf/hbase/blob/5a5b854c/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index 8f57fcb..6704eae 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -111,7 +111,7 @@ AssignmentManager assignmentManager = 
master.getAssignmentManager();
   
 
 
-
+
 
 
 
@@ -136,7 +136,7 @@ AssignmentManager assignmentManager = 
master.getAssignmentManager();
 
 
 
-
+
<%if master.isActiveMaster() %>
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5a5b854c/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
index 3d47643..f38cce9 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
@@ -69,7 +69,7 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
   
 
 
-
+
 
 
 
@@ -94,7 +94,7 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
   
 
 
-  
+  
 
 
 RegionServer <% serverName %>

http://git-wip-us.apache.org/repos/asf/hbase/blob/5a5b854c/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
--
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp 
b/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
index b18a63e..c658d63 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
@@ -81,7 +81,7 @@
   
 
 
-
+
 
 
 
@@ -106,7 +106,7 @@
 
 
 <% if (snapshot == null) { %>
-  
+  
   
 
   Snapshot "<%= snapshotName %>" does not exists
@@ -114,7 +114,7 @@
   
   Go Back, or wait 

[44/50] [abbrv] hbase git commit: HBASE-14681 Upgrade Checkstyle plugin to 2.16

2015-10-23 Thread syuanjiang
HBASE-14681 Upgrade Checkstyle plugin to 2.16


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

Branch: refs/heads/hbase-12439
Commit: 36d4a5a650ceead3be5012cdd25dc35efa383755
Parents: c21e8ed
Author: Misty Stanley-Jones 
Authored: Fri Oct 23 09:24:33 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Fri Oct 23 09:25:16 2015 +1000

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/36d4a5a6/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5781db2..be2eec8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -836,7 +836,7 @@
 
   org.apache.maven.plugins
   maven-checkstyle-plugin
-  2.13
+  2.16
   
 
   org.apache.hbase



[38/50] [abbrv] hbase git commit: HBASE-14669 remove unused import and fix javadoc

2015-10-23 Thread syuanjiang
HBASE-14669 remove unused import and fix javadoc


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

Branch: refs/heads/hbase-12439
Commit: 36a196722c914ca1ee90d4e16e32dfc522f9361b
Parents: 2e2cbd0
Author: Matteo Bertozzi 
Authored: Thu Oct 22 09:24:08 2015 -0700
Committer: Matteo Bertozzi 
Committed: Thu Oct 22 09:25:26 2015 -0700

--
 .../hbase/client/ClientSimpleScanner.java   |  1 -
 .../org/apache/hadoop/hbase/client/HTable.java  |  3 --
 .../hadoop/hbase/protobuf/ProtobufUtil.java |  1 -
 .../client/TestClientExponentialBackoff.java|  1 -
 .../org/apache/hadoop/hbase/ProcedureInfo.java  |  2 +-
 .../hadoop/hbase/CategoryBasedTimeout.java  |  3 --
 .../apache/hadoop/hbase/TestChoreService.java   |  2 --
 .../org/apache/hadoop/hbase/TestTimeout.java|  1 -
 .../hadoop/hbase/codec/TestCellCodec.java   |  1 -
 .../example/TestBulkDeleteProtocol.java |  1 -
 .../example/TestRowCountEndpoint.java   |  1 -
 .../TestZooKeeperScanPolicyObserver.java|  1 -
 .../apache/hadoop/hbase/types/TestPBCell.java   |  1 -
 .../TestMetricsRegionSourceImpl.java|  2 --
 .../hbase/test/MetricsAssertHelperImpl.java |  1 -
 .../hbase/IntegrationTestLazyCfLoading.java |  1 -
 .../hbase/IntegrationTestMetaReplicas.java  |  1 -
 .../actions/RestartRsHoldingTableAction.java|  8 --
 .../chaos/actions/TruncateTableAction.java  |  1 -
 ...undedMultiGetRequestsWithRegionReplicas.java |  1 -
 ...stTimeBoundedRequestsWithRegionReplicas.java |  2 --
 .../hbase/procedure2/TestYieldProcedures.java   |  4 ---
 .../store/wal/TestWALProcedureStore.java|  2 --
 .../hadoop/hbase/coprocessor/package-info.java  |  2 --
 .../hadoop/hbase/mapreduce/CopyTable.java   |  1 -
 .../hadoop/hbase/master/RegionStates.java   |  1 -
 .../hadoop/hbase/master/ServerManager.java  |  1 -
 .../hbase/regionserver/CompactionRequestor.java |  2 +-
 .../snapshot/FlushSnapshotSubprocedure.java |  1 -
 .../org/apache/hadoop/hbase/util/Merge.java |  1 -
 .../hadoop/hbase/util/RegionSizeCalculator.java |  1 -
 .../hadoop/hbase/wal/DisabledWALProvider.java   |  1 -
 .../hadoop/hbase/TestGlobalMemStoreSize.java|  1 -
 .../hbase/TestHBaseOnOtherDfsCluster.java   |  1 -
 .../hadoop/hbase/TestMetaTableAccessor.java |  1 -
 .../org/apache/hadoop/hbase/TestNamespace.java  |  5 
 .../hadoop/hbase/TestTableDescriptor.java   |  1 -
 .../hadoop/hbase/client/TestClientTimeouts.java |  1 -
 .../hadoop/hbase/client/TestFastFail.java   |  1 -
 .../TestMobRestoreSnapshotFromClient.java   |  5 
 .../TestMobSnapshotCloneIndependence.java   |  1 -
 .../hbase/client/TestMobSnapshotFromClient.java |  1 -
 .../hbase/client/TestReplicaWithCluster.java|  1 -
 .../hbase/client/TestResultSizeEstimation.java  |  1 -
 .../hbase/codec/TestCellMessageCodec.java   |  1 -
 .../hadoop/hbase/constraint/TestConstraint.java |  1 -
 .../coprocessor/TestAggregateProtocol.java  |  1 -
 .../TestBatchCoprocessorEndpoint.java   |  3 --
 .../TestBigDecimalColumnInterpreter.java|  1 -
 .../coprocessor/TestCoprocessorEndpoint.java|  3 --
 .../hbase/coprocessor/TestCoprocessorHost.java  |  1 -
 .../TestDoubleColumnInterpreter.java|  1 -
 .../coprocessor/TestRegionObserverBypass.java   |  1 -
 ...gionServerCoprocessorExceptionWithAbort.java |  1 -
 ...ionServerCoprocessorExceptionWithRemove.java |  1 -
 .../hbase/filter/FilterTestingCluster.java  |  1 -
 .../hadoop/hbase/filter/TestFilterWrapper.java  |  1 -
 .../hbase/http/TestHttpServerLifecycle.java |  1 -
 .../encoding/TestLoadAndSwitchEncodeOnDisk.java |  5 
 .../hadoop/hbase/io/hfile/CacheTestUtils.java   |  1 -
 .../hadoop/hbase/io/hfile/TestCacheConfig.java  |  1 -
 .../hadoop/hbase/io/hfile/TestChecksum.java |  2 --
 .../io/hfile/TestHFileBlockCompatibility.java   |  1 -
 .../hbase/ipc/TestGlobalEventLoopGroup.java |  1 -
 .../hbase/mapred/TestTableInputFormat.java  |  1 -
 .../hadoop/hbase/mapred/TestTableMapReduce.java |  1 -
 .../MultiTableInputFormatTestBase.java  |  1 -
 .../hadoop/hbase/mapreduce/TestCellCounter.java |  1 -
 .../hadoop/hbase/mapreduce/TestCopyTable.java   |  2 --
 .../hadoop/hbase/mapreduce/TestHashTable.java   |  1 -
 .../TestLoadIncrementalHFilesSplitRecovery.java |  1 -
 .../mapreduce/TestMultiTableInputFormat.java|  2 --
 .../mapreduce/TestMultithreadedTableMapper.java |  1 -
 .../hadoop/hbase/mapreduce/TestRowCounter.java  |  5 
 .../hadoop/hbase/mapreduce/TestSyncTable.java   |  1 -
 .../hbase/mapreduce/TestTableInputFormat.java   |  1 -
 

[47/50] [abbrv] hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread syuanjiang
HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/hbase-12439
Commit: b4ba615c70e89aa00ec0878d64e6e0f42e437df0
Parents: eb4f9b8
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Thu Oct 22 18:35:34 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 454 +++
 1 file changed, 454 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b4ba615c/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..09de871
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,454 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.AsyncRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {
+
+TestRpcServer(Configuration conf) throws IOException {
+  this(new 

[21/50] [abbrv] hbase git commit: HBASE-14666 Remove deprecated HBaseTestingUtility#deleteTable(...) methods

2015-10-23 Thread syuanjiang
HBASE-14666 Remove deprecated HBaseTestingUtility#deleteTable(...) methods


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

Branch: refs/heads/hbase-12439
Commit: 5363f371bb7cd83902e8027b221fe7bf690f9eec
Parents: 7b73899
Author: Jonathan M Hsieh 
Authored: Wed Oct 21 12:44:29 2015 -0700
Committer: Jonathan M Hsieh 
Committed: Wed Oct 21 21:34:23 2015 -0700

--
 .../mapreduce/IntegrationTestImportTsv.java |  2 +-
 .../hadoop/hbase/HBaseTestingUtility.java   | 35 +---
 .../hadoop/hbase/mapreduce/TestImportTsv.java   | 95 ++--
 .../hbase/regionserver/TestDeleteMobTable.java  |  5 +-
 4 files changed, 50 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5363f371/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
index 7ebe825..8d6cad4 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
@@ -199,7 +199,7 @@ public class IntegrationTestImportTsv extends Configured 
implements Tool {
 
 // run the job, complete the load.
 util.createTable(table, new String[]{cf});
-Tool t = TestImportTsv.doMROnTableTest(util, table.getNameAsString(), cf, 
simple_tsv, args);
+Tool t = TestImportTsv.doMROnTableTest(util, table, cf, simple_tsv, args);
 doLoadIncrementalHFiles(hfiles, table);
 
 // validate post-conditions

http://git-wip-us.apache.org/repos/asf/hbase/blob/5363f371/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index ceb0d75..ab7b51c 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -1677,26 +1677,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
   /**
* Drop an existing table
* @param tableName existing table
-   * @deprecated use {@link #deleteTable(TableName)}
-   */
-  @Deprecated
-  public void deleteTable(String tableName) throws IOException {
-deleteTable(TableName.valueOf(tableName));
-  }
-
-  /**
-   * Drop an existing table
-   * @param tableName existing table
-   * @deprecated use {@link #deleteTable(TableName)}
-   */
-  @Deprecated
-  public void deleteTable(byte[] tableName) throws IOException {
-deleteTable(TableName.valueOf(tableName));
-  }
-
-  /**
-   * Drop an existing table
-   * @param tableName existing table
*/
   public void deleteTable(TableName tableName) throws IOException {
 try {
@@ -1865,20 +1845,7 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
 
   //
   // ==
-
-  /**
-   * Provide an existing table name to truncate.
-   * Scans the table and issues a delete for each row read.
-   * @param tableName existing table
-   * @return HTable to that new table
-   * @throws IOException
-   * @deprecated use {@link #deleteTableData(TableName)}
-   */
-  @Deprecated
-  public HTable deleteTableData(byte[] tableName) throws IOException {
-return deleteTableData(TableName.valueOf(tableName));
-  }
-
+  
   /**
* Provide an existing table name to truncate.
* Scans the table and issues a delete for each row read.

http://git-wip-us.apache.org/repos/asf/hbase/blob/5363f371/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
index 099ebe1..66fdf93 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
@@ -87,7 +87,7 @@ public class TestImportTsv implements Configurable {
   protected static final String FORCE_COMBINER_CONF = NAME + ".forceCombiner";
 
   

[07/50] [abbrv] hbase git commit: HBASE-14458 AsyncRpcClient#createRpcChannel() should check and remove dead channel before creating new one to same server (Samir Ahmic)

2015-10-23 Thread syuanjiang
HBASE-14458 AsyncRpcClient#createRpcChannel() should check and remove dead 
channel before creating new one to same server (Samir Ahmic)


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

Branch: refs/heads/hbase-12439
Commit: 8e6316a80cf96f4d4cd6bd10f4c647ebf45c7e02
Parents: f1b6355
Author: tedyu 
Authored: Sun Oct 18 20:49:31 2015 -0700
Committer: tedyu 
Committed: Sun Oct 18 20:49:31 2015 -0700

--
 .../main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java  | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8e6316a8/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java
index 60e9add..f972d0e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java
@@ -386,7 +386,11 @@ public class AsyncRpcClient extends AbstractRpcClient {
 throw new StoppedRpcClientException();
   }
   rpcChannel = connections.get(hashCode);
-  if (rpcChannel == null || !rpcChannel.isAlive()) {
+  if (rpcChannel != null && !rpcChannel.isAlive()) {
+LOG.debug("Removing dead channel from 
server="+rpcChannel.address.toString());
+connections.remove(hashCode);
+  }
+  if (rpcChannel == null) {
 rpcChannel = new AsyncRpcChannel(this.bootstrap, this, ticket, 
serviceName, location);
 connections.put(hashCode, rpcChannel);
   }



[32/50] [abbrv] hbase git commit: HBASE-14603 Addendum put back project info reports -- stack was right

2015-10-23 Thread syuanjiang
HBASE-14603 Addendum put back project info reports -- stack was right


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

Branch: refs/heads/hbase-12439
Commit: 3f385c2e2462d9fe805cf18ba1f98fd2a562bf97
Parents: ac2cfba
Author: Misty Stanley-Jones 
Authored: Thu Oct 22 19:34:19 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 19:34:19 2015 +1000

--
 pom.xml | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3f385c2e/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 64015cc..51951d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2750,6 +2750,19 @@
   
 
   index
+  project-team
+  mailing-list
+  cim
+  issue-tracking
+  license
+  scm
+  cim
+  dependency-info
+  dependency-convergence
+  distribution-management
+  modules
+  plugin-management
+  plugins
 
   
 



[39/50] [abbrv] hbase git commit: HBASE-14667 HBaseFsck constructors have diverged

2015-10-23 Thread syuanjiang
HBASE-14667 HBaseFsck constructors have diverged


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

Branch: refs/heads/hbase-12439
Commit: 619a240ebd6305eb2fdca8efe104a9ee92065ff6
Parents: 36a1967
Author: Matteo Bertozzi 
Authored: Thu Oct 22 09:28:33 2015 -0700
Committer: Matteo Bertozzi 
Committed: Thu Oct 22 09:28:33 2015 -0700

--
 .../org/apache/hadoop/hbase/util/HBaseFsck.java  | 19 ---
 1 file changed, 4 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/619a240e/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
index 4988481..e55b53f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
@@ -313,23 +313,12 @@ public class HBaseFsck extends Configured implements 
Closeable {
*/
   public HBaseFsck(Configuration conf) throws MasterNotRunningException,
   ZooKeeperConnectionException, IOException, ClassNotFoundException {
-super(conf);
-// make a copy, just to be sure we're not overriding someone else's config
-setConf(HBaseConfiguration.create(getConf()));
-// disable blockcache for tool invocation, see HBASE-10500
-getConf().setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0);
-// Disable usage of meta replicas in hbck
-getConf().setBoolean(HConstants.USE_META_REPLICAS, false);
-errors = getErrorReporter(conf);
+this(conf, createThreadPool(conf));
+  }
 
+  private static ExecutorService createThreadPool(Configuration conf) {
 int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS);
-executor = new ScheduledThreadPoolExecutor(numThreads, 
Threads.newDaemonThreadFactory("hbasefsck"));
-lockFileRetryCounterFactory = new RetryCounterFactory(
-  getConf().getInt("hbase.hbck.lockfile.attempts", 
DEFAULT_MAX_LOCK_FILE_ATTEMPTS),
-  getConf().getInt(
-"hbase.hbck.lockfile.attempt.sleep.interval", 
DEFAULT_LOCK_FILE_ATTEMPT_SLEEP_INTERVAL),
-  getConf().getInt(
-"hbase.hbck.lockfile.attempt.maxsleeptime", 
DEFAULT_LOCK_FILE_ATTEMPT_MAX_SLEEP_TIME));
+return new ScheduledThreadPoolExecutor(numThreads, 
Threads.newDaemonThreadFactory("hbasefsck"));
   }
 
   /**



[40/50] [abbrv] hbase git commit: HBASE-14658 Addendum; Allow loading a MonkeyFactory by class name

2015-10-23 Thread syuanjiang
HBASE-14658 Addendum; Allow loading a MonkeyFactory by class name


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

Branch: refs/heads/hbase-12439
Commit: 35660b4f5c4081996f18943ad5359be1454630b4
Parents: 619a240
Author: Elliott Clark 
Authored: Thu Oct 22 11:22:53 2015 -0700
Committer: Elliott Clark 
Committed: Thu Oct 22 12:09:58 2015 -0700

--
 .../apache/hadoop/hbase/chaos/factories/MonkeyFactory.java  | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/35660b4f/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
index e479975..2a69c8c 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
@@ -93,13 +93,16 @@ public abstract class MonkeyFactory {
 
   public static MonkeyFactory getFactory(String factoryName) {
 MonkeyFactory fact = FACTORIES.get(factoryName);
-if (fact == null) {
+if (fact == null && factoryName != null && !factoryName.isEmpty()) {
   Class klass = null;
   try {
 klass = Class.forName(factoryName);
-fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
-  } catch (ClassNotFoundException e) {
+if (klass != null) {
+  fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
+}
+  } catch (Exception e) {
 LOG.error("Error trying to create " + factoryName + " could not load 
it by class name");
+return null;
   }
 }
 return fact;



[14/50] [abbrv] hbase git commit: HBASE-14604 Improve MoveCostFunction in StochasticLoadBalancer (Guanghao Zhang)

2015-10-23 Thread syuanjiang
HBASE-14604 Improve MoveCostFunction in StochasticLoadBalancer (Guanghao Zhang)


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

Branch: refs/heads/hbase-12439
Commit: 60465964039acd05f43f268cdb4f909a150a0f41
Parents: c9523a5
Author: tedyu 
Authored: Tue Oct 20 02:35:40 2015 -0700
Committer: tedyu 
Committed: Tue Oct 20 02:35:40 2015 -0700

--
 .../hbase/master/balancer/BaseLoadBalancer.java | 11 ++
 .../master/balancer/StochasticLoadBalancer.java |  2 +-
 .../balancer/TestStochasticLoadBalancer.java| 38 
 3 files changed, 50 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/60465964/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
index 962b241..33e8d97 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
@@ -54,6 +54,7 @@ import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.T
 import org.apache.hadoop.hbase.security.access.AccessControlLists;
 import org.apache.hadoop.util.StringUtils;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Lists;
@@ -898,6 +899,16 @@ public abstract class BaseLoadBalancer implements 
LoadBalancer {
   }
 }
 
+@VisibleForTesting
+protected void setNumRegions(int numRegions) {
+  this.numRegions = numRegions;
+}
+
+@VisibleForTesting
+protected void setNumMovedRegions(int numMovedRegions) {
+  this.numMovedRegions = numMovedRegions;
+}
+
 
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SBSC_USE_STRINGBUFFER_CONCATENATION",
 justification="Not important but should be fixed")
 @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/60465964/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
index 249423f..f9b3baf 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
@@ -1026,7 +1026,7 @@ public class StochasticLoadBalancer extends 
BaseLoadBalancer {
 return 100;   // return a number much greater than any of the 
other cost
   }
 
-  return scale(0, cluster.numRegions, moveCost);
+  return scale(0, Math.min(cluster.numRegions, maxMoves), moveCost);
 }
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/60465964/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java
index 85ecb29..7abbeb4 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java
@@ -122,6 +122,44 @@ public class TestStochasticLoadBalancer extends 
BalancerTestBase {
   }
 
   @Test
+  public void testMoveCost() throws Exception {
+Configuration conf = HBaseConfiguration.create();
+StochasticLoadBalancer.CostFunction
+costFunction = new StochasticLoadBalancer.MoveCostFunction(conf);
+for (int[] mockCluster : clusterStateMocks) {
+  BaseLoadBalancer.Cluster cluster = mockCluster(mockCluster);
+  costFunction.init(cluster);
+  double cost = costFunction.cost();
+  assertEquals(0.0f, cost, 0.001);
+
+  // cluster region number is smaller than maxMoves=600
+  cluster.setNumRegions(200);
+  cluster.setNumMovedRegions(10);
+  cost = costFunction.cost();
+  

[20/50] [abbrv] hbase git commit: HBASE-14665 Remove deprecated HBaseTestingUtility#createTable methods

2015-10-23 Thread syuanjiang
HBASE-14665 Remove deprecated HBaseTestingUtility#createTable methods


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

Branch: refs/heads/hbase-12439
Commit: 7b73899e9507374ea8023082c86077056486706e
Parents: 3952106
Author: Jonathan M Hsieh 
Authored: Wed Oct 21 20:50:54 2015 -0700
Committer: Jonathan M Hsieh 
Committed: Wed Oct 21 21:28:27 2015 -0700

--
 .../hadoop/hbase/HBaseTestingUtility.java   | 279 ---
 1 file changed, 279 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7b73899e/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 2cfafb9..ceb0d75 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -1312,19 +1312,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
   /**
* Create a table.
* @param tableName
-   * @param family
-   * @return An HTable instance for the created table.
-   * @throws IOException
-   * @deprecated use {@link #createTable(TableName, byte[])}
-   */
-  @Deprecated
-  public HTable createTable(byte[] tableName, byte[] family) throws 
IOException {
-return createTable(TableName.valueOf(tableName), new byte[][] { family });
-  }
-
-  /**
-   * Create a table.
-   * @param tableName
* @param families
* @return An HTable instance for the created table.
* @throws IOException
@@ -1368,22 +1355,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
 return createTable(tableName, new byte[][] { family }, splitKeys);
   }
 
-
-  /**
-   * Create a table.
-   * @param tableName
-   * @param families
-   * @return An HTable instance for the created table.
-   * @throws IOException
-   * @deprecated use {@link #createTable(TableName, byte[][])}
-   */
-  @Deprecated
-  public HTable createTable(byte[] tableName, byte[][] families)
-  throws IOException {
-return createTable(tableName, families,
-new Configuration(getConfiguration()));
-  }
-
   /**
* Create a table.
* @param tableName
@@ -1420,20 +1391,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
 return createTable(tableName, families, splitKeys, new 
Configuration(getConfiguration()));
   }
 
-  @Deprecated
-  public HTable createTable(byte[] tableName, byte[][] families, int 
numVersions, byte[] startKey,
-  byte[] endKey, int numRegions) throws IOException {
-return createTable(TableName.valueOf(tableName), families, numVersions, 
startKey, endKey,
-numRegions);
-  }
-
-  @Deprecated
-  public HTable createTable(String tableName, byte[][] families, int 
numVersions, byte[] startKey,
-  byte[] endKey, int numRegions) throws IOException {
-return createTable(TableName.valueOf(tableName), families, numVersions, 
startKey, endKey,
-numRegions);
-  }
-
   public HTable createTable(TableName tableName, byte[][] families,
   int numVersions, byte[] startKey, byte[] endKey, int numRegions)
   throws IOException{
@@ -1509,21 +1466,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
* Create a table.
* @param tableName
* @param families
-   * @param c Configuration to use
-   * @return An HTable instance for the created table.
-   * @throws IOException
-   * @deprecated use {@link #createTable(TableName, byte[][])}
-   */
-  @Deprecated
-  public HTable createTable(TableName tableName, byte[][] families, final 
Configuration c)
-  throws IOException {
-return createTable(tableName, families, (byte[][]) null, c);
-  }
-
-  /**
-   * Create a table.
-   * @param tableName
-   * @param families
* @param splitKeys
* @param c Configuration to use
* @return An HTable instance for the created table.
@@ -1537,95 +1479,6 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
   /**
* Create a table.
* @param tableName
-   * @param families
-   * @param c Configuration to use
-   * @return An HTable instance for the created table.
-   * @throws IOException
-   * @deprecated use {@link #createTable(TableName, byte[][])}
-   */
-  @Deprecated
-  public HTable createTable(byte[] tableName, byte[][] families, final 
Configuration c)
-  throws IOException {
-HTableDescriptor desc = new 

[19/50] [abbrv] hbase git commit: HBASE-14668 Remove deprecated HBaseTestCase dependency from TestHFile

2015-10-23 Thread syuanjiang
HBASE-14668 Remove deprecated HBaseTestCase dependency from TestHFile


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

Branch: refs/heads/hbase-12439
Commit: 39521068e8733b2df0f27832c3da214fe3b19d20
Parents: b3afdb8
Author: Jonathan M Hsieh 
Authored: Wed Oct 21 21:04:11 2015 -0700
Committer: Jonathan M Hsieh 
Committed: Wed Oct 21 21:04:11 2015 -0700

--
 .../apache/hadoop/hbase/io/hfile/TestHFile.java | 66 +---
 1 file changed, 30 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/39521068/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
index 1264fa0..929ad8a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
@@ -27,6 +27,7 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
@@ -35,7 +36,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;
@@ -46,26 +46,24 @@ import org.apache.hadoop.hbase.io.compress.Compression;
 import org.apache.hadoop.hbase.io.hfile.HFile.Reader;
 import org.apache.hadoop.hbase.io.hfile.HFile.Writer;
 import org.apache.hadoop.hbase.nio.ByteBuff;
-import org.apache.hadoop.hbase.nio.MultiByteBuff;
 import org.apache.hadoop.hbase.testclassification.IOTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.io.Writable;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.*;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import static org.junit.Assert.*;
 
 /**
  * test hfile features.
- * 
- * Copied from
- * https://issues.apache.org/jira/browse/HADOOP-3315;>hadoop-3315 
tfile.
- * Remove after tfile is committed and use the tfile version of this class
- * instead.
  */
 @Category({IOTests.class, SmallTests.class})
-public class TestHFile extends HBaseTestCase {
+public class TestHFile  {
+
+  @Rule public TestName testName = new TestName();
+
   private static final Log LOG = LogFactory.getLog(TestHFile.class);
 
   private static final HBaseTestingUtility TEST_UTIL = new 
HBaseTestingUtility();
@@ -75,18 +73,15 @@ public class TestHFile extends HBaseTestCase {
   private static String localFormatter = "%010d";
   private static CacheConfig cacheConf = null;
   private Map startingMetrics;
+  private static Configuration conf ;
+  private static FileSystem fs;
 
-  @Before
-  public void setUp() throws Exception {
-super.setUp();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-super.tearDown();
+  @BeforeClass
+  public static void setUp() throws Exception {
+conf = TEST_UTIL.getConfiguration();
+fs = TEST_UTIL.getTestFileSystem();
   }
-
-
+  
   /**
* Test empty HFile.
* Test all features work reasonably when hfile is empty of entries.
@@ -95,7 +90,7 @@ public class TestHFile extends HBaseTestCase {
   @Test
   public void testEmptyHFile() throws IOException {
 if (cacheConf == null) cacheConf = new CacheConfig(conf);
-Path f = new Path(ROOT_DIR, getName());
+Path f = new Path(ROOT_DIR, testName.getMethodName());
 HFileContext context = new 
HFileContextBuilder().withIncludesTags(false).build();
 Writer w =
 HFile.getWriterFactory(conf, cacheConf).withPath(fs, 
f).withFileContext(context).create();
@@ -112,7 +107,7 @@ public class TestHFile extends HBaseTestCase {
   @Test
   public void testCorrupt0LengthHFile() throws IOException {
 if (cacheConf == null) cacheConf = new CacheConfig(conf);
-Path f = new Path(ROOT_DIR, getName());
+Path f = new Path(ROOT_DIR, testName.getMethodName());
 FSDataOutputStream fsos = fs.create(f);
 fsos.close();
 
@@ -146,7 +141,7 @@ public class 

[15/50] [abbrv] hbase git commit: HBASE-14634 Disable flakey TestSnapshotCloneIndependence.testOnlineSnapshotDeleteIndependent; ADDENDUM

2015-10-23 Thread syuanjiang
HBASE-14634 Disable flakey 
TestSnapshotCloneIndependence.testOnlineSnapshotDeleteIndependent; ADDENDUM


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

Branch: refs/heads/hbase-12439
Commit: a532ed73d808f543909c5563999405c82fa9b1d5
Parents: 6046596
Author: stack 
Authored: Tue Oct 20 12:18:54 2015 -0700
Committer: stack 
Committed: Tue Oct 20 12:19:10 2015 -0700

--
 .../apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a532ed73/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
index a8ba468..5f20790 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
@@ -187,7 +187,7 @@ public class TestSnapshotCloneIndependence {
 runTestSnapshotDeleteIndependent(false);
   }
 
-  @Test (timeout=30)
+  @Ignore ("Flakey test") @Test (timeout=30)
   public void testOnlineSnapshotDeleteIndependent() throws Exception {
 runTestSnapshotDeleteIndependent(true);
   }



hbase git commit: HBASE-14598 ByteBufferOutputStream grows its HeapByteBuffer beyond JVM limitations (Ian Friedman)

2015-10-23 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 c39d066fc -> 1a7e4c073


HBASE-14598 ByteBufferOutputStream grows its HeapByteBuffer beyond JVM 
limitations (Ian Friedman)

Conflicts:

hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java


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

Branch: refs/heads/branch-1.0
Commit: 1a7e4c07368f39c5f63894bbb25d03800aefe814
Parents: c39d066
Author: stack 
Authored: Wed Oct 14 13:13:01 2015 -0700
Committer: Andrew Purtell 
Committed: Fri Oct 23 16:47:27 2015 -0700

--
 .../org/apache/hadoop/hbase/ipc/IPCUtil.java|  4 +++
 .../hadoop/hbase/io/ByteBufferOutputStream.java | 33 +---
 2 files changed, 26 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1a7e4c07/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
index b7e7728..8b7be44 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
@@ -22,6 +22,7 @@ import java.io.DataInput;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
 import org.apache.commons.io.IOUtils;
@@ -31,6 +32,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseIOException;
 import org.apache.hadoop.hbase.codec.Codec;
 import org.apache.hadoop.hbase.io.ByteBufferOutputStream;
@@ -126,6 +128,8 @@ public class IPCUtil {
   // If no cells, don't mess around.  Just return null (could be a bunch 
of existence checking
   // gets or something -- stuff that does not return a cell).
   if (count == 0) return null;
+} catch (BufferOverflowException e) {
+  throw new DoNotRetryIOException(e);
 } finally {
   os.close();
   if (poolCompressor != null) CodecPool.returnCompressor(poolCompressor);

http://git-wip-us.apache.org/repos/asf/hbase/blob/1a7e4c07/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
index 257b850..9eee6b2 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.io;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.WritableByteChannel;
@@ -35,6 +36,10 @@ import org.apache.hadoop.hbase.util.Bytes;
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class ByteBufferOutputStream extends OutputStream {
+  
+  // Borrowed from openJDK:
+  // 
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/util/ArrayList.java#221
+  private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
 
   protected ByteBuffer buf;
 
@@ -54,6 +59,13 @@ public class ByteBufferOutputStream extends OutputStream {
 return buf.position();
   }
 
+  private static ByteBuffer allocate(final int capacity, final boolean 
useDirectByteBuffer) {
+if (capacity > MAX_ARRAY_SIZE) { // avoid OutOfMemoryError
+  throw new BufferOverflowException();
+}
+return useDirectByteBuffer? ByteBuffer.allocateDirect(capacity): 
ByteBuffer.allocate(capacity);
+  }
+
   /**
* This flips the underlying BB so be sure to use it _last_!
* @return ByteBuffer
@@ -64,18 +76,17 @@ public class ByteBufferOutputStream extends OutputStream {
   }
 
   private void checkSizeAndGrow(int extra) {
-if ( (buf.position() + extra) > buf.limit()) {
-  // size calculation is complex, because we could overflow negative,
-  // and/or not allocate enough space. this fixes that.
-  int newSize = (int)Math.minlong)buf.capacity()) * 

svn commit: r1710296 - in /hbase/hbase.apache.org/trunk: ./ devapidocs/ devapidocs/org/apache/hadoop/hbase/mob/ devapidocs/org/apache/hadoop/hbase/regionserver/ devapidocs/org/apache/hadoop/hbase/regi

2015-10-23 Thread misty
Author: misty
Date: Sat Oct 24 00:31:05 2015
New Revision: 1710296

URL: http://svn.apache.org/viewvc?rev=1710296=rev
Log:
Published site at 8b7796b0b661ca960463c9e16034ee8f64494dbd. 

Added 4 files. 
Removed 4 files. 
Modified 324 files.


[This commit notification would consist of 126 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]


hbase git commit: HBASE-14598 ByteBufferOutputStream grows its HeapByteBuffer beyond JVM limitations (Ian Friedman)

2015-10-23 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/0.98 73e7722b8 -> 5f3a43a2c


HBASE-14598 ByteBufferOutputStream grows its HeapByteBuffer beyond JVM 
limitations (Ian Friedman)


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

Branch: refs/heads/0.98
Commit: 5f3a43a2c412ec8fb23f92b120c9783a8ad5f0e7
Parents: 73e7722
Author: stack 
Authored: Wed Oct 14 13:13:01 2015 -0700
Committer: Andrew Purtell 
Committed: Fri Oct 23 16:44:35 2015 -0700

--
 .../org/apache/hadoop/hbase/ipc/IPCUtil.java|  4 +++
 .../hadoop/hbase/io/ByteBufferOutputStream.java | 26 ++--
 2 files changed, 23 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5f3a43a2/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
index 2210cec..f143203 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
@@ -22,6 +22,7 @@ import java.io.DataInput;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
 import org.apache.commons.io.IOUtils;
@@ -30,6 +31,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseIOException;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.codec.Codec;
@@ -154,6 +156,8 @@ class IPCUtil {
   // If no cells, don't mess around.  Just return null (could be a bunch 
of existence checking
   // gets or something -- stuff that does not return a cell).
   if (count == 0) return null;
+} catch (BufferOverflowException e) {
+  throw new DoNotRetryIOException(e);
 } finally {
   os.close();
   if (poolCompressor != null) CodecPool.returnCompressor(poolCompressor);

http://git-wip-us.apache.org/repos/asf/hbase/blob/5f3a43a2/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
index af12113..a6647f6 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBufferOutputStream.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.io;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.WritableByteChannel;
@@ -35,6 +36,10 @@ import org.apache.hadoop.hbase.util.Bytes;
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class ByteBufferOutputStream extends OutputStream {
+  
+  // Borrowed from openJDK:
+  // 
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/util/ArrayList.java#221
+  private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
 
   protected ByteBuffer buf;
 
@@ -66,6 +71,9 @@ public class ByteBufferOutputStream extends OutputStream {
   }
 
   private static ByteBuffer allocate(final int capacity, final boolean 
useDirectByteBuffer) {
+if (capacity > MAX_ARRAY_SIZE) { // avoid OutOfMemoryError
+  throw new BufferOverflowException();
+}
 return useDirectByteBuffer? ByteBuffer.allocateDirect(capacity): 
ByteBuffer.allocate(capacity);
   }
 
@@ -79,13 +87,17 @@ public class ByteBufferOutputStream extends OutputStream {
   }
 
   private void checkSizeAndGrow(int extra) {
-if ( (buf.position() + extra) > buf.limit()) {
-  // size calculation is complex, because we could overflow negative,
-  // and/or not allocate enough space. this fixes that.
-  int newSize = (int)Math.minlong)buf.capacity()) * 2),
-  (long)(Integer.MAX_VALUE));
-  newSize = Math.max(newSize, buf.position() + extra);
-  ByteBuffer newBuf = allocate(newSize, buf.isDirect());
+long capacityNeeded = buf.position() + (long) extra;
+if (capacityNeeded > buf.limit()) 

hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 b3219d0d2 -> aa95519a9


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/branch-1.2
Commit: aa95519a9c01267bc5bb147220010c508133459e
Parents: b3219d0
Author: tedyu 
Authored: Fri Oct 23 15:02:31 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 15:02:31 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 32 ++--
 .../hbase/regionserver/CompactionRequestor.java |  5 +-
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  | 13 ++-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 29 +--
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 13 ++-
 .../TestRegionObserverScannerOpenHook.java  |  9 +++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 18 files changed, 263 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/aa95519a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index bf44eea..be9180c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -352,7 +351,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -370,10 +369,10 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final Region r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
-  if(LOG.isDebugEnabled()) {
+  if(LOG.isDebugEnabled() && r.getRegionInfo() != null) {
 LOG.debug("Not compacting " + 
r.getRegionInfo().getRegionNameAsString() +
 " because compaction request was cancelled");
   }
@@ -484,7 +483,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -496,7 +495,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -528,7 +527,7 @@ public class 

hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 29d3b110e -> c39d066fc


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/branch-1.0
Commit: c39d066fcdc10044925bb722b5e4f422264aa903
Parents: 29d3b11
Author: tedyu 
Authored: Fri Oct 23 15:24:59 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 15:24:59 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 30 ++-
 .../hbase/regionserver/CompactionRequestor.java |  5 +-
 .../hbase/regionserver/DefaultStoreEngine.java  |  8 +-
 .../hadoop/hbase/regionserver/HRegion.java  |  8 +-
 .../hadoop/hbase/regionserver/HStore.java   | 83 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 14 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  3 +
 .../regionserver/compactions/Compactor.java | 50 ++--
 .../compactions/DefaultCompactor.java   | 14 ++--
 .../compactions/StripeCompactionPolicy.java | 14 ++--
 .../compactions/StripeCompactor.java| 26 --
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 12 +++
 .../TestRegionObserverScannerOpenHook.java  |  8 ++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  5 +-
 .../compactions/TestStripeCompactionPolicy.java | 16 ++--
 18 files changed, 252 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c39d066f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index 24ff5c8..ae4a69a 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -341,7 +340,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -359,8 +358,8 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final HRegion r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
   if(LOG.isDebugEnabled()) {
 LOG.debug("Not compacting " + r.getRegionNameAsString() +
@@ -473,7 +472,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -485,7 +484,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -513,7 +512,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 // Note: please don't put single-compaction logic here;
 //   put it into 

hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 2b84cd5cf -> b19daf4c5


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/branch-1.1
Commit: b19daf4c56d32302c6b9671286fc64a47e5bbb42
Parents: 2b84cd5
Author: tedyu 
Authored: Fri Oct 23 15:24:28 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 15:24:28 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 32 ++--
 .../hbase/regionserver/CompactionRequestor.java |  5 +-
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  | 13 ++-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 29 +--
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 11 +++
 .../TestRegionObserverScannerOpenHook.java  |  9 +++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 18 files changed, 262 insertions(+), 75 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b19daf4c/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index b7809db..2d0cc5b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -350,7 +349,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -368,10 +367,10 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final Region r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
-  if(LOG.isDebugEnabled()) {
+  if(LOG.isDebugEnabled() && r.getRegionInfo() != null) {
 LOG.debug("Not compacting " + 
r.getRegionInfo().getRegionNameAsString() +
 " because compaction request was cancelled");
   }
@@ -482,7 +481,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -494,7 +493,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -523,7 +522,7 @@ public class 

[18/50] [abbrv] hbase git commit: HBASE-14427 Fix 'should' assertions in TestFastFail (Abhishek Singh Chouhan)

2015-10-23 Thread syuanjiang
HBASE-14427 Fix 'should' assertions in TestFastFail (Abhishek Singh Chouhan)


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

Branch: refs/heads/hbase-12439
Commit: b3afdb8de1a9fa88c553159b2d2d2aa96902a345
Parents: 6e3b7af
Author: stack 
Authored: Wed Oct 21 09:53:27 2015 -0700
Committer: stack 
Committed: Wed Oct 21 09:53:27 2015 -0700

--
 .../apache/hadoop/hbase/client/TestFastFail.java   | 17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b3afdb8d/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
index 204c4a4..3ce7afb 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
@@ -60,7 +60,7 @@ public class TestFastFail {
   private final static HBaseTestingUtility TEST_UTIL = new 
HBaseTestingUtility();
   private static byte[] FAMILY = Bytes.toBytes("testFamily");
   private static final Random random = new Random();
-  private static int SLAVES = 3;
+  private static int SLAVES = 1;
   private static byte[] QUALIFIER = Bytes.toBytes("testQualifier");
   private static final int SLEEPTIME = 5000;
 
@@ -217,8 +217,6 @@ public class TestFastFail {
 
 doneHalfway.await();
 
-ClusterStatus status = TEST_UTIL.getHBaseCluster().getClusterStatus();
-
 // Kill a regionserver
 TEST_UTIL.getHBaseCluster().getRegionServer(0).getRpcServer().stop();
 TEST_UTIL.getHBaseCluster().getRegionServer(0).stop("Testing");
@@ -227,8 +225,8 @@ public class TestFastFail {
 continueOtherHalf.countDown();
 
 Thread.sleep(2 * SLEEPTIME);
-// Restore the cluster
-TEST_UTIL.getHBaseCluster().restoreClusterStatus(status);
+// Start a RS in the cluster
+TEST_UTIL.getHBaseCluster().startRegionServer();
 
 int numThreadsReturnedFalse = 0;
 int numThreadsReturnedTrue = 0;
@@ -269,19 +267,16 @@ public class TestFastFail {
 assertEquals("The regionservers that returned true should equal to the"
 + " number of successful threads", numThreadsReturnedTrue,
 numSuccessfullThreads.get());
-/* 'should' is not worthy of an assert. Disabling because randomly this 
seems to randomly
- * not but true. St.Ack 20151012
- *
 assertTrue(
-"There should be atleast one thread that retried instead of failing",
+"There will be atleast one thread that retried instead of failing",
 MyPreemptiveFastFailInterceptor.numBraveSouls.get() > 0);
 assertTrue(
-"There should be atleast one PreemptiveFastFail exception,"
+"There will be atleast one PreemptiveFastFail exception,"
 + " otherwise, the test makes little sense."
 + "numPreemptiveFastFailExceptions: "
 + numPreemptiveFastFailExceptions.get(),
 numPreemptiveFastFailExceptions.get() > 0);
-*/
+
 assertTrue(
 "Only few thread should ideally be waiting for the dead "
 + "regionserver to be coming back. numBlockedWorkers:"



[23/50] [abbrv] hbase git commit: HBASE-14671 Remove deprecated HBaseTestCase/Put/Delete apis from TestGetClosestAtOrBefore

2015-10-23 Thread syuanjiang
HBASE-14671 Remove deprecated HBaseTestCase/Put/Delete apis from 
TestGetClosestAtOrBefore


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

Branch: refs/heads/hbase-12439
Commit: f9df3e9229ecb78abc9dd5332095d82fb390eb8d
Parents: 81e2aba
Author: Jonathan M Hsieh 
Authored: Wed Oct 21 15:17:04 2015 -0700
Committer: Jonathan M Hsieh 
Committed: Wed Oct 21 21:56:54 2015 -0700

--
 .../regionserver/TestGetClosestAtOrBefore.java  | 63 +++-
 1 file changed, 35 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f9df3e92/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
index 470a453..7ee3f0b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
@@ -24,11 +24,11 @@ import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -44,15 +44,21 @@ import 
org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.wal.WAL;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 /**
  * TestGet is a medley of tests of get all done up as a single test.
  * This class
  */
 @Category({RegionServerTests.class, MediumTests.class})
-public class TestGetClosestAtOrBefore extends HBaseTestCase {
+public class TestGetClosestAtOrBefore  {
+  @Rule public TestName testName = new TestName();
   private static final Log LOG = 
LogFactory.getLog(TestGetClosestAtOrBefore.class);
 
   private static final byte[] T00 = Bytes.toBytes("000");
@@ -66,18 +72,17 @@ public class TestGetClosestAtOrBefore extends HBaseTestCase 
{
   private static final byte[] T40 = Bytes.toBytes("040");
 
   private static HBaseTestingUtility UTIL = new HBaseTestingUtility();
-
-
+  private static Configuration conf = UTIL.getConfiguration();
 
   @Test
   public void testUsingMetaAndBinary() throws IOException {
 FileSystem filesystem = FileSystem.get(conf);
-Path rootdir = testDir;
+Path rootdir = UTIL.getDataTestDirOnTestFS();
 // Up flush size else we bind up when we use default catalog flush of 16k.
-fsTableDescriptors.get(TableName.META_TABLE_NAME).setMemStoreFlushSize(64 
* 1024 * 1024);
+UTIL.getMetaTableDescriptor().setMemStoreFlushSize(64 * 1024 * 1024);
 
 Region mr = 
HBaseTestingUtility.createRegionAndWAL(HRegionInfo.FIRST_META_REGIONINFO,
-rootdir, this.conf, fsTableDescriptors.get(TableName.META_TABLE_NAME));
+rootdir, this.conf, UTIL.getMetaTableDescriptor());
 try {
 // Write rows for three tables 'A', 'B', and 'C'.
 for (char c = 'A'; c < 'D'; c++) {
@@ -189,43 +194,44 @@ public class TestGetClosestAtOrBefore extends 
HBaseTestCase {
   @Test
   public void testGetClosestRowBefore3() throws IOException{
 Region region = null;
-byte [] c0 = COLUMNS[0];
-byte [] c1 = COLUMNS[1];
+byte [] c0 = UTIL.COLUMNS[0];
+byte [] c1 = UTIL.COLUMNS[1];
 try {
-  HTableDescriptor htd = createTableDescriptor(getName());
-  region = createNewHRegion(htd, null, null);
+  TableName tn = TableName.valueOf(testName.getMethodName());
+  HTableDescriptor htd = UTIL.createTableDescriptor(tn);
+  region = UTIL.createLocalHRegion(htd, null, null);
 
   Put p = new Put(T00);
-  p.add(c0, c0, T00);
+  p.addColumn(c0, c0, T00);
   region.put(p);
 
   p = new Put(T10);
-  p.add(c0, c0, T10);
+  p.addColumn(c0, c0, T10);
   region.put(p);
 
   p = new Put(T20);
-  p.add(c0, c0, T20);
+  

hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/master f34011860 -> 8b7796b0b


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/master
Commit: 8b7796b0b661ca960463c9e16034ee8f64494dbd
Parents: f340118
Author: tedyu 
Authored: Fri Oct 23 14:48:04 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 14:48:04 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 32 ++--
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  | 13 ++-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 29 +--
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 11 +++
 .../TestRegionObserverScannerOpenHook.java  |  9 +++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 17 files changed, 260 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8b7796b0/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index a9e2fca..6ce90bc 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -352,7 +351,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -370,10 +369,10 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final Region r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
-  if(LOG.isDebugEnabled()) {
+  if(LOG.isDebugEnabled() && r.getRegionInfo() != null) {
 LOG.debug("Not compacting " + 
r.getRegionInfo().getRegionNameAsString() +
 " because compaction request was cancelled");
   }
@@ -484,7 +483,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -496,7 +495,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -528,7 +527,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 

hbase git commit: HBASE-14655 Narrow the scope of doAs() calls to region observer notifications for compaction

2015-10-23 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/branch-1 cdf2c01a7 -> bc990a332


HBASE-14655 Narrow the scope of doAs() calls to region observer notifications 
for compaction


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

Branch: refs/heads/branch-1
Commit: bc990a332885b1fd07dc6d1b22624380378609a0
Parents: cdf2c01
Author: tedyu 
Authored: Fri Oct 23 15:00:04 2015 -0700
Committer: tedyu 
Committed: Fri Oct 23 15:00:04 2015 -0700

--
 .../hbase/regionserver/CompactSplitThread.java  | 32 ++--
 .../hbase/regionserver/CompactionRequestor.java |  5 +-
 .../hbase/regionserver/DefaultStoreEngine.java  |  9 ++-
 .../hadoop/hbase/regionserver/HRegion.java  | 13 ++-
 .../hadoop/hbase/regionserver/HStore.java   | 84 +---
 .../apache/hadoop/hbase/regionserver/Store.java | 15 
 .../hbase/regionserver/StripeStoreEngine.java   | 10 ++-
 .../compactions/CompactionContext.java  |  4 +
 .../regionserver/compactions/Compactor.java | 49 ++--
 .../compactions/DefaultCompactor.java   | 13 +--
 .../compactions/StripeCompactionPolicy.java | 15 ++--
 .../compactions/StripeCompactor.java| 29 +--
 .../org/apache/hadoop/hbase/TestIOFencing.java  | 13 ++-
 .../TestRegionObserverScannerOpenHook.java  |  9 +++
 .../regionserver/StatefulStoreMockMaker.java|  3 +
 .../hbase/regionserver/TestCompaction.java  | 15 +++-
 .../regionserver/TestStripeStoreEngine.java |  6 +-
 .../compactions/TestStripeCompactionPolicy.java | 15 ++--
 18 files changed, 263 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bc990a33/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index bf44eea..be9180c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.regionserver;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -352,7 +351,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
 
 CompactionContext compaction = null;
 if (selectNow) {
-  compaction = selectCompaction(r, s, priority, request);
+  compaction = selectCompaction(r, s, priority, request, user);
   if (compaction == null) return null; // message logged inside
 }
 
@@ -370,10 +369,10 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   }
 
   private CompactionContext selectCompaction(final Region r, final Store s,
-  int priority, CompactionRequest request) throws IOException {
-CompactionContext compaction = s.requestCompaction(priority, request);
+  int priority, CompactionRequest request, User user) throws IOException {
+CompactionContext compaction = s.requestCompaction(priority, request, 
user);
 if (compaction == null) {
-  if(LOG.isDebugEnabled()) {
+  if(LOG.isDebugEnabled() && r.getRegionInfo() != null) {
 LOG.debug("Not compacting " + 
r.getRegionInfo().getRegionNameAsString() +
 " because compaction request was cancelled");
   }
@@ -484,7 +483,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   : ("Store = " + store.toString() + ", pri = " + queuedPriority);
 }
 
-private void doCompaction() {
+private void doCompaction(User user) {
   // Common case - system compaction without a file selection. Select now.
   if (this.compaction == null) {
 int oldPriority = this.queuedPriority;
@@ -496,7 +495,7 @@ public class CompactSplitThread implements 
CompactionRequestor, PropagatingConfi
   return;
 }
 try {
-  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null);
+  this.compaction = selectCompaction(this.region, this.store, 
queuedPriority, null, user);
 } catch (IOException ex) {
   LOG.error("Compaction selection failed " + this, ex);
   server.checkFileSystem();
@@ -528,7 +527,7 @@ public class CompactSplitThread 

[04/50] [abbrv] hbase git commit: HBASE-14634 Disable flakey TestSnapshotCloneIndependence.testOnlineSnapshotDeleteIndependent

2015-10-23 Thread syuanjiang
HBASE-14634 Disable flakey 
TestSnapshotCloneIndependence.testOnlineSnapshotDeleteIndependent


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

Branch: refs/heads/hbase-12439
Commit: d9ee19131881d3730f1fe5dada6160560d953284
Parents: 6774f22
Author: stack 
Authored: Fri Oct 16 21:14:49 2015 -0700
Committer: stack 
Committed: Fri Oct 16 21:14:49 2015 -0700

--
 .../apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d9ee1913/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
index ff315f0..a8ba468 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
@@ -44,6 +44,7 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 
 /**
@@ -127,7 +128,7 @@ public class TestSnapshotCloneIndependence {
* Verify that adding data to the cloned table will not affect the original, 
and vice-versa when
* it is taken as an online snapshot.
*/
-  @Test (timeout=30)
+  @Ignore ("Flakey. Fix") @Test (timeout=30)
   public void testOnlineSnapshotAppendIndependent() throws Exception {
 runTestSnapshotAppendIndependent(true);
   }



[02/50] [abbrv] hbase git commit: HBASE-14625 Chaos Monkey should shut down faster

2015-10-23 Thread syuanjiang
HBASE-14625 Chaos Monkey should shut down faster


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

Branch: refs/heads/hbase-12439
Commit: e874a31d7503eb4e85dedf22788e3d9f94e03b49
Parents: 0ed8b0e
Author: Elliott Clark 
Authored: Thu Oct 15 22:29:17 2015 -0400
Committer: Elliott Clark 
Committed: Fri Oct 16 15:22:31 2015 -0700

--
 .../hadoop/hbase/chaos/actions/Action.java  |  9 
 .../hbase/chaos/actions/AddColumnAction.java|  5 
 .../chaos/actions/BatchRestartRsAction.java | 24 +++-
 .../chaos/actions/ChangeBloomFilterAction.java  |  4 
 .../chaos/actions/ChangeCompressionAction.java  |  5 
 .../chaos/actions/ChangeEncodingAction.java |  4 
 .../chaos/actions/ChangeVersionsAction.java |  4 
 .../hbase/chaos/actions/CompactMobAction.java   |  5 
 .../actions/DecreaseMaxHFileSizeAction.java |  5 
 .../hbase/chaos/actions/FlushTableAction.java   |  5 
 .../chaos/actions/ForceBalancerAction.java  |  4 
 ...MergeRandomAdjacentRegionsOfTableAction.java |  6 +
 .../chaos/actions/MoveRegionsOfTableAction.java |  6 +
 .../hbase/chaos/actions/RemoveColumnAction.java |  4 
 .../chaos/actions/RestartActionBaseAction.java  | 17 ++
 .../actions/RollingBatchRestartRsAction.java|  2 +-
 .../chaos/actions/SnapshotTableAction.java  |  5 
 .../actions/SplitAllRegionOfTableAction.java|  5 +++-
 .../actions/SplitRandomRegionOfTableAction.java |  4 
 .../chaos/actions/TruncateTableAction.java  |  5 
 .../UnbalanceKillAndRebalanceAction.java| 15 ++--
 .../hadoop/hbase/chaos/policies/Policy.java | 15 
 22 files changed, 148 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e874a31d/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java
index d632ce5..fe140e2 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java
@@ -210,6 +210,11 @@ public class Action {
 + " servers to " + toServers.size() + " different servers");
 Admin admin = 
this.context.getHBaseIntegrationTestingUtility().getHBaseAdmin();
 for (byte[] victimRegion : victimRegions) {
+  // Don't keep moving regions if we're
+  // trying to stop the monkey.
+  if (context.isStopping()) {
+break;
+  }
   int targetIx = RandomUtils.nextInt(toServers.size());
   admin.move(victimRegion, 
Bytes.toBytes(toServers.get(targetIx).getServerName()));
 }
@@ -249,5 +254,9 @@ public class Action {
 public HBaseCluster getHBaseCluster() {
   return util.getHBaseClusterInterface();
 }
+
+public boolean isStopping() {
+  return false;
+}
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/e874a31d/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
index e7d2e12..27268a4 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
@@ -53,6 +53,11 @@ public class AddColumnAction extends Action {
   columnDescriptor = new 
HColumnDescriptor(RandomStringUtils.randomAlphabetic(5));
 }
 
+// Don't try the modify if we're stopping
+if (context.isStopping()) {
+  return;
+}
+
 LOG.debug("Performing action: Adding " + columnDescriptor + " to " + 
tableName);
 
 tableDescriptor.addFamily(columnDescriptor);

http://git-wip-us.apache.org/repos/asf/hbase/blob/e874a31d/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/BatchRestartRsAction.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/BatchRestartRsAction.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/BatchRestartRsAction.java
index b6a5b50..ce66000 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/BatchRestartRsAction.java
+++ 

[35/50] [abbrv] hbase git commit: HBASE-14658 Allow loading a MonkeyFactory by class name

2015-10-23 Thread syuanjiang
HBASE-14658 Allow loading a MonkeyFactory by class name


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

Branch: refs/heads/hbase-12439
Commit: 2e2cbd0201a34b7a24eb0e4c1621f7d11c2f9c04
Parents: 9a5423f
Author: Elliott Clark 
Authored: Tue Oct 20 18:28:48 2015 -0700
Committer: Elliott Clark 
Committed: Thu Oct 22 08:54:12 2015 -0700

--
 .../hadoop/hbase/chaos/factories/MonkeyFactory.java | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2e2cbd02/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
index 12f57d9..e479975 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/MonkeyFactory.java
@@ -22,16 +22,20 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.IntegrationTestingUtility;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.chaos.monkies.ChaosMonkey;
 
 import com.google.common.collect.ImmutableMap;
+import org.apache.hadoop.hbase.util.ReflectionUtils;
 
 /**
  * Base class of the factory that will create a ChaosMonkey.
  */
 public abstract class MonkeyFactory {
+  private static final Log LOG = LogFactory.getLog(MonkeyFactory.class);
 
   protected TableName tableName;
   protected Set columnFamilies;
@@ -88,6 +92,16 @@ public abstract class MonkeyFactory {
 .build();
 
   public static MonkeyFactory getFactory(String factoryName) {
-return FACTORIES.get(factoryName);
+MonkeyFactory fact = FACTORIES.get(factoryName);
+if (fact == null) {
+  Class klass = null;
+  try {
+klass = Class.forName(factoryName);
+fact = (MonkeyFactory) ReflectionUtils.newInstance(klass);
+  } catch (ClassNotFoundException e) {
+LOG.error("Error trying to create " + factoryName + " could not load 
it by class name");
+  }
+}
+return fact;
   }
 }



[34/50] [abbrv] hbase git commit: HBASE-14603 addendum un-break site:stage target

2015-10-23 Thread syuanjiang
HBASE-14603 addendum un-break site:stage target


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

Branch: refs/heads/hbase-12439
Commit: 9a5423fc42ecb0e31835caf34c61523f6b452255
Parents: 098022e
Author: Misty Stanley-Jones 
Authored: Thu Oct 22 22:28:36 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Thu Oct 22 22:28:36 2015 +1000

--
 pom.xml | 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9a5423fc/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 7947aaf..5781db2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3007,4 +3007,14 @@
 
 
   
+  
+
+  hbase.apache.org
+  HBase Website at hbase.apache.org
+  
+  file:///tmp
+
+  
 



[06/50] [abbrv] hbase git commit: HBASE-14642 Disable flakey TestMultiParallel#testActiveThreadsCount

2015-10-23 Thread syuanjiang
HBASE-14642 Disable flakey TestMultiParallel#testActiveThreadsCount


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

Branch: refs/heads/hbase-12439
Commit: f1b6355fc54616c08480c0f1b0965a244252
Parents: 71b38d6
Author: stack 
Authored: Sun Oct 18 20:17:01 2015 -0700
Committer: stack 
Committed: Sun Oct 18 20:17:01 2015 -0700

--
 .../java/org/apache/hadoop/hbase/client/TestMultiParallel.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f1b6355f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
index 63b60bb..905a7db 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
@@ -49,6 +49,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -143,7 +144,7 @@ public class TestMultiParallel {
* @throws NoSuchFieldException
* @throws SecurityException
*/
-  @Test(timeout=30)
+  @Ignore ("Nice bug flakey... expected 5 but was 4..") @Test(timeout=30)
   public void testActiveThreadsCount() throws Exception {
 try (Connection connection = 
ConnectionFactory.createConnection(UTIL.getConfiguration())) {
   ThreadPoolExecutor executor = 
HTable.getDefaultExecutor(UTIL.getConfiguration());



hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/master eb4f9b8b3 -> b4ba615c7


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/master
Commit: b4ba615c70e89aa00ec0878d64e6e0f42e437df0
Parents: eb4f9b8
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Thu Oct 22 18:35:34 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 454 +++
 1 file changed, 454 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b4ba615c/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..09de871
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,454 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.AsyncRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {
+
+

hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 ba86d7150 -> 2b84cd5cf


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/branch-1.1
Commit: 2b84cd5cf0741b6531474ddc956a019d6f890cf4
Parents: ba86d71
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Fri Oct 23 11:05:24 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 454 +++
 1 file changed, 454 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2b84cd5c/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..a99df88
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,454 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.AsyncRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {

hbase git commit: HBASE-14535 Integration test for rpc connection concurrency / deadlock testing

2015-10-23 Thread enis
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 57dc5520f -> b3219d0d2


HBASE-14535 Integration test for rpc connection concurrency / deadlock testing


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

Branch: refs/heads/branch-1.2
Commit: b3219d0d292939ff030753e19c3ad286022cb448
Parents: 57dc552
Author: Enis Soztutar 
Authored: Thu Oct 22 18:35:34 2015 -0700
Committer: Enis Soztutar 
Committed: Fri Oct 23 11:04:47 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 454 +++
 1 file changed, 454 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b3219d0d/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
new file mode 100644
index 000..09de871
--- /dev/null
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java
@@ -0,0 +1,454 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.ipc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.codec.Codec;
+import org.apache.hadoop.hbase.ipc.AbstractRpcClient;
+import org.apache.hadoop.hbase.ipc.AsyncRpcClient;
+import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcClientImpl;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+import org.apache.hadoop.hbase.ipc.RpcServer;
+import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyRequestProto;
+import 
org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EmptyResponseProto;
+import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.hadoop.hbase.util.Threads;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import com.google.common.collect.Lists;
+import com.google.protobuf.BlockingService;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcController;
+import com.google.protobuf.ServiceException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+
+@Category(IntegrationTests.class)
+public class IntegrationTestRpcClient {
+
+  private static final Log LOG = 
LogFactory.getLog(IntegrationTestRpcClient.class);
+
+  private final Configuration conf;
+
+  private int numIterations = 10;
+
+  public IntegrationTestRpcClient() {
+conf = HBaseConfiguration.create();
+  }
+
+  static class TestRpcServer extends RpcServer {