hbase git commit: Add syuanjiang as committer

2015-08-20 Thread syuanjiang
Repository: hbase
Updated Branches:
  refs/heads/master 720f2a881 - 5dd8fefd7


Add syuanjiang as committer


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

Branch: refs/heads/master
Commit: 5dd8fefd75269e1f07c1451619a785cbbee11f8c
Parents: 720f2a8
Author: Stephen Yuan Jiang syuanjiang...@gmail.com
Authored: Thu Aug 20 14:16:35 2015 -0700
Committer: Stephen Yuan Jiang syuanjiang...@gmail.com
Committed: Thu Aug 20 14:16:35 2015 -0700

--
 pom.xml | 104 ---
 1 file changed, 56 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5dd8fefd/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5d8b862..a720edb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -191,6 +191,14 @@
   organizationUrlhttp://www.explorys.com/organizationUrl
 /developer
 developer
+  ideclark/id
+  nameElliott Clark/name
+  emailecl...@apache.org/email
+  timezone-8/timezone
+  organizationFacebook/organization
+  organizationUrlhttp://www.facebook.com/organizationUrl
+/developer
+developer
   idenis/id
   nameEnis Soztutar/name
   emaile...@apache.org/email
@@ -335,6 +343,14 @@
   organizationUrlhttp://www.xiaomi.com//organizationUrl
 /developer
 developer
+  idliyin/id
+  nameLiyin Tang/name
+  emailliyin.t...@fb.com/email
+  timezone-8/timezone
+  organizationFacebook/organization
+  organizationUrlhttp://www.facebook.com/organizationUrl
+/developer
+developer
   idmbautin/id
   nameMikhail Bautin/name
   emailmbau...@apache.org/email
@@ -343,6 +359,14 @@
   organizationUrlhttp://www.facebook.com/organizationUrl
 /developer
 developer
+  idmbertozzi/id
+  nameMatteo Bertozzi/name
+  emailmberto...@apache.org/email
+  timezone0/timezone
+  organizationCloudera/organization
+  organizationUrlhttp://www.cloudera.com/organizationUrl
+/developer
+developer
   idmisty/id
   nameMisty Stanley-Jones/name
   emailmi...@apache.org/email
@@ -359,6 +383,14 @@
   organizationUrlhttp://www.hortonworks.com/organizationUrl
 /developer
 developer
+  idnkeywal/id
+  nameNicolas Liochon/name
+  emailnkey...@apache.org/email
+  timezone+1/timezone
+  organizationScaled Risk/organization
+  organizationUrlhttp://www.scaledrisk.com/organizationUrl
+/developer
+developer
   idnspiegelberg/id
   nameNicolas Spiegelberg/name
   emailnspiegelb...@fb.com/email
@@ -375,6 +407,22 @@
   organizationUrlhttps://www.dropbox.com//organizationUrl
 /developer
 developer
+  idrajeshbabu/id
+  nameRajeshbabu Chintaguntla/name
+  emailrajeshb...@apache.org/email
+  timezone+5/timezone
+  organizationHortonworks/organization
+  organizationUrlhttp://www.hortonworks.com/organizationUrl
+/developer
+developer
+  idramkrishna/id
+  nameRamkrishna S Vasudevan/name
+  emailramkris...@apache.org/email
+  timezone+5/timezone
+  organizationIntel/organization
+  organizationUrlhttp://www.intel.in/organizationUrl
+/developer
+developer
   idrawson/id
   nameRyan Rawson/name
   emailraw...@apache.org/email
@@ -407,6 +455,14 @@
   organizationUrlhttp://www.cloudera.com//organizationUrl
 /developer
 developer
+  idsyuanjiang/id
+  nameStephen Yuan Jiang/name
+  emailsyuanji...@apache.org/email
+  timezone-8/timezone
+  organizationHortonworks/organization
+  organizationUrlhttp://www.hortonworks.com/organizationUrl
+/developer
+developer
   idtedyu/id
   nameTed Yu/name
   emailyuzhih...@gmail.com/email
@@ -423,54 +479,6 @@
   organizationUrlhttp://www.cloudera.com/organizationUrl
 /developer
 developer
-  idrajeshbabu/id
-  nameRajeshbabu Chintaguntla/name
-  emailrajeshb...@apache.org/email
-  timezone+5/timezone
-  organizationHortonworks/organization
-  organizationUrlhttp://www.hortonworks.com/organizationUrl
-/developer
-developer
-  idramkrishna/id
-  nameRamkrishna S Vasudevan/name
-  emailramkris...@apache.org/email
-  timezone+5/timezone
-  organizationIntel/organization
-  organizationUrlhttp://www.intel.in/organizationUrl
-/developer
-developer
-  idliyin/id
-  nameLiyin Tang/name
-  emailliyin.t...@fb.com/email
-  timezone-8/timezone
-  organizationFacebook/organization
-  organizationUrlhttp://www.facebook.com/organizationUrl

[09/17] hbase git commit: HBASE-14702 TestZKProcedureControllers.testZKCoordinatorControllerWithSingleMemberCohort is a flakey

2015-10-27 Thread syuanjiang
HBASE-14702 
TestZKProcedureControllers.testZKCoordinatorControllerWithSingleMemberCohort is 
a flakey


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

Branch: refs/heads/hbase-12439
Commit: ac746e09056192e4957766f06b4f94d7c5c34d18
Parents: 496d20c
Author: stack 
Authored: Mon Oct 26 22:35:22 2015 -0700
Committer: stack 
Committed: Mon Oct 26 22:35:22 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/ac746e09/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedureControllers.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedureControllers.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedureControllers.java
index a3e91ab..f639271 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedureControllers.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedureControllers.java
@@ -362,7 +362,8 @@ public class TestZKProcedureControllers {
   String operationName, byte[] data) {
 //verify(member, 
Mockito.times(cohortSize)).submitSubprocedure(Mockito.eq(operationName),
 //  (byte[]) Mockito.argThat(new ArrayEquals(data)));
-verify(member, 
Mockito.times(cohortSize)).submitSubprocedure(Mockito.any(Subprocedure.class));
+Mockito.verify(member,
+  
Mockito.atLeast(cohortSize)).submitSubprocedure(Mockito.any(Subprocedure.class));
 
   }
 



[02/17] hbase git commit: HBASE-14698 Set category timeouts on TestScanner and TestNamespaceAuditor

2015-10-27 Thread syuanjiang
HBASE-14698 Set category timeouts on TestScanner and TestNamespaceAuditor


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

Branch: refs/heads/hbase-12439
Commit: 0f6ec611e653eec03cd3d2c516cbfcb202090916
Parents: 4c04e80
Author: stack 
Authored: Mon Oct 26 12:55:36 2015 -0700
Committer: stack 
Committed: Mon Oct 26 13:05:58 2015 -0700

--
 .../hbase/io/encoding/TestDataBlockEncoders.java |  3 ---
 .../hbase/namespace/TestNamespaceAuditor.java| 19 ---
 .../hadoop/hbase/regionserver/TestScanner.java   |  5 +
 3 files changed, 17 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0f6ec611/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 2e9e973..9863fac 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
@@ -32,9 +32,6 @@ 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;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;

http://git-wip-us.apache.org/repos/asf/hbase/blob/0f6ec611/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
index 9912808..41a9713 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
@@ -37,6 +37,7 @@ 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.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
@@ -85,13 +86,17 @@ import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 
 import com.google.common.collect.Sets;
 
 @Category(MediumTests.class)
 public class TestNamespaceAuditor {
+  @Rule public final TestRule timeout = CategoryBasedTimeout.builder().
+  withTimeout(this.getClass()).withLookingForStuckThread(true).build();
   private static final Log LOG = LogFactory.getLog(TestNamespaceAuditor.class);
   private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
   private static HBaseAdmin ADMIN;
@@ -133,7 +138,7 @@ public class TestNamespaceAuditor {
   .getMasterQuotaManager().isQuotaEnabled());
   }
 
-  @Test(timeout = 6)
+  @Test
   public void testTableOperations() throws Exception {
 String nsp = prefix + "_np2";
 NamespaceDescriptor nspDesc =
@@ -480,7 +485,7 @@ public class TestNamespaceAuditor {
* namespace quota cache. Now correct the failure and recreate the table 
with same name.
* HBASE-13394
*/
-  @Test(timeout = 18)
+  @Test
   public void testRecreateTableWithSameNameAfterFirstTimeFailure() throws 
Exception {
 String nsp1 = prefix + "_testRecreateTable";
 NamespaceDescriptor nspDesc =
@@ -659,7 +664,7 @@ public class TestNamespaceAuditor {
 observer.tableDeletionLatch.await();
   }
 
-  @Test(expected = QuotaExceededException.class, timeout = 3)
+  @Test(expected = QuotaExceededException.class)
   public void testExceedTableQuotaInNamespace() throws Exception {
 String nsp = prefix + "_testExceedTableQuotaInNamespace";
 NamespaceDescriptor nspDesc =
@@ -676,7 +681,7 @@ public class TestNamespaceAuditor {
 ADMIN.createTable(tableDescTwo, Bytes.toBytes("AAA"), 
Bytes.toBytes("ZZZ"), 4);
   }
   
-  @Test(expected = 

[10/17] hbase git commit: HBASE-14257 Periodic flusher only handles hbase:meta, not other system tables. (Abhishek)

2015-10-27 Thread syuanjiang
HBASE-14257 Periodic flusher only handles hbase:meta, not other system tables. 
(Abhishek)


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

Branch: refs/heads/hbase-12439
Commit: 4269c7fe69baabbd813dcdf6ed0b3a57ea4b41de
Parents: ac746e0
Author: anoopsjohn 
Authored: Tue Oct 27 11:52:03 2015 +0530
Committer: anoopsjohn 
Committed: Tue Oct 27 11:52:03 2015 +0530

--
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java| 7 ---
 .../apache/hadoop/hbase/regionserver/TestDefaultMemStore.java | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4269c7fe/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 07924e6..0fcdaab 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -1307,7 +1307,8 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   "hbase.regionserver.optionalcacheflushinterval";
   /** Default interval for the memstore flush */
   public static final int DEFAULT_CACHE_FLUSH_INTERVAL = 360;
-  public static final int META_CACHE_FLUSH_INTERVAL = 30; // 5 minutes
+  /** Default interval for System tables memstore flush */
+  public static final int SYSTEM_CACHE_FLUSH_INTERVAL = 30; // 5 minutes
 
   /** Conf key to force a flush if there are already enough changes for one 
region in memstore */
   public static final String MEMSTORE_FLUSH_PER_CHANGES =
@@ -1995,9 +1996,9 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   return true;
 }
 long modifiedFlushCheckInterval = flushCheckInterval;
-if (getRegionInfo().isMetaRegion() &&
+if (getRegionInfo().isSystemTable() &&
 getRegionInfo().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
-  modifiedFlushCheckInterval = META_CACHE_FLUSH_INTERVAL;
+  modifiedFlushCheckInterval = SYSTEM_CACHE_FLUSH_INTERVAL;
 }
 if (modifiedFlushCheckInterval <= 0) { //disabled
   return false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/4269c7fe/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
index 882fd53..f1e20d1 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
@@ -944,10 +944,10 @@ public class TestDefaultMemStore extends TestCase {
 
   public void testShouldFlushMeta() throws Exception {
 // write an edit in the META and ensure the shouldFlush (that the periodic 
memstore
-// flusher invokes) returns true after META_CACHE_FLUSH_INTERVAL (even 
though
+// flusher invokes) returns true after SYSTEM_CACHE_FLUSH_INTERVAL (even 
though
 // the MEMSTORE_PERIODIC_FLUSH_INTERVAL is set to a higher value)
 Configuration conf = new Configuration();
-conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 
HRegion.META_CACHE_FLUSH_INTERVAL * 10);
+conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 
HRegion.SYSTEM_CACHE_FLUSH_INTERVAL * 10);
 HBaseTestingUtility hbaseUtility = 
HBaseTestingUtility.createLocalHTU(conf);
 Path testDir = hbaseUtility.getDataTestDir();
 EnvironmentEdgeForMemstoreTest edge = new EnvironmentEdgeForMemstoreTest();
@@ -969,7 +969,7 @@ public class TestDefaultMemStore extends TestCase {
 edge.setCurrentTimeMillis(1234 + 100);
 StringBuffer sb = new StringBuffer();
 assertTrue(meta.shouldFlush(sb) == false);
-edge.setCurrentTimeMillis(edge.currentTime() + 
HRegion.META_CACHE_FLUSH_INTERVAL + 1);
+edge.setCurrentTimeMillis(edge.currentTime() + 
HRegion.SYSTEM_CACHE_FLUSH_INTERVAL + 1);
 assertTrue(meta.shouldFlush(sb) == true);
   }
 



[13/17] hbase git commit: HBASE-14655 Addendum passes User to store#compact()

2015-10-27 Thread syuanjiang
HBASE-14655 Addendum passes User to store#compact()


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

Branch: refs/heads/hbase-12439
Commit: e04e7402cd5df5fc7001101ad50fc2dbf8de5c1e
Parents: f91546f
Author: tedyu 
Authored: Tue Oct 27 11:17:30 2015 -0700
Committer: tedyu 
Committed: Tue Oct 27 11:17:30 2015 -0700

--
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e04e7402/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 0fcdaab..19bcd33 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -1823,7 +1823,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   // We no longer need to cancel the request on the way out of this
   // method because Store#compact will clean up unconditionally
   requestNeedsCancellation = false;
-  store.compact(compaction, throughputController);
+  store.compact(compaction, throughputController, user);
 } catch (InterruptedIOException iioe) {
   String msg = "compaction interrupted";
   LOG.info(msg, iioe);



[14/17] hbase git commit: HBASE-14688 Cleanup MOB tests

2015-10-27 Thread syuanjiang
HBASE-14688 Cleanup MOB tests


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

Branch: refs/heads/hbase-12439
Commit: c91bfff5862fd38b3d301e3371d2f643d0c501ea
Parents: e04e740
Author: Matteo Bertozzi 
Authored: Tue Oct 27 10:28:07 2015 -0700
Committer: Matteo Bertozzi 
Committed: Tue Oct 27 11:37:39 2015 -0700

--
 .../hadoop/hbase/HBaseTestingUtility.java   |   7 +-
 .../apache/hadoop/hbase/mob/MobTestUtil.java|  42 +++--
 .../hadoop/hbase/mob/TestCachedMobFile.java |  31 ++--
 .../hbase/mob/TestDefaultMobStoreFlusher.java   | 181 ++-
 .../hbase/mob/TestExpiredMobFileCleaner.java|   8 +-
 .../hbase/mob/TestMobDataBlockEncoding.java |  19 +-
 .../apache/hadoop/hbase/mob/TestMobFile.java|  16 +-
 .../hbase/mob/compactions/TestMobCompactor.java |  28 +--
 .../TestPartitionedMobCompactor.java|  95 +++---
 .../hbase/regionserver/TestDeleteMobTable.java  | 155 +++-
 .../regionserver/TestMobStoreCompaction.java|  31 ++--
 .../hbase/regionserver/TestMobStoreScanner.java | 114 
 .../hadoop/hbase/util/BaseTestHBaseFsck.java|   5 +-
 13 files changed, 265 insertions(+), 467 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c91bfff5/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 ab7b51c..eb1494e 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
@@ -1845,7 +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.
@@ -2141,7 +2141,10 @@ public class HBaseTestingUtility extends 
HBaseCommonTestingUtility {
* Return the number of rows in the given table.
*/
   public int countRows(final Table table) throws IOException {
-Scan scan = new Scan();
+return countRows(table, new Scan());
+  }
+
+  public int countRows(final Table table, final Scan scan) throws IOException {
 ResultScanner results = table.getScanner(scan);
 int count = 0;
 for (@SuppressWarnings("unused") Result res : results) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/c91bfff5/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java
index bc3354b..3e0e2d9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java
@@ -19,11 +19,16 @@
 package org.apache.hadoop.hbase.mob;
 
 import java.io.IOException;
+import java.util.List;
 import java.util.Random;
 
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.KeyValue;
+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.regionserver.StoreFile;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.junit.Assert;
@@ -73,15 +78,30 @@ public class MobTestUtil {
   /**
* Compare two Cells only for their row family qualifier value
*/
-  public static void assertCellEquals(Cell firstKeyValue,
- Cell secondKeyValue) {
-   
Assert.assertEquals(Bytes.toString(CellUtil.cloneRow(firstKeyValue)),
-   Bytes.toString(CellUtil.cloneRow(secondKeyValue)));
-   
Assert.assertEquals(Bytes.toString(CellUtil.cloneFamily(firstKeyValue)),
-   Bytes.toString(CellUtil.cloneFamily(secondKeyValue)));
-   
Assert.assertEquals(Bytes.toString(CellUtil.cloneQualifier(firstKeyValue)),
-   Bytes.toString(CellUtil.cloneQualifier(secondKeyValue)));
-   
Assert.assertEquals(Bytes.toString(CellUtil.cloneValue(firstKeyValue)),
-   

[05/17] hbase git commit: HBASE-13318 RpcServer.getListenerAddress should handle when the accept channel is closed

2015-10-27 Thread syuanjiang
HBASE-13318 RpcServer.getListenerAddress should handle when the accept channel 
is closed


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

Branch: refs/heads/hbase-12439
Commit: efb82957da09ab06f5c887b3d62ad055bbba089f
Parents: 928dade
Author: Andrew Purtell 
Authored: Mon Oct 26 14:24:42 2015 -0700
Committer: Andrew Purtell 
Committed: Mon Oct 26 15:11:12 2015 -0700

--
 .../hbase/ipc/IntegrationTestRpcClient.java | 22 
 .../org/apache/hadoop/hbase/ipc/CallRunner.java | 11 ++
 .../org/apache/hadoop/hbase/ipc/RpcServer.java  | 17 ++-
 .../hbase/regionserver/RSRpcServices.java   |  6 +-
 .../hadoop/hbase/ipc/AbstractTestIPC.java   | 22 +++-
 .../apache/hadoop/hbase/ipc/TestAsyncIPC.java   |  9 
 .../apache/hadoop/hbase/ipc/TestDelayedRpc.java | 21 +--
 .../org/apache/hadoop/hbase/ipc/TestIPC.java|  5 -
 .../hadoop/hbase/ipc/TestProtoBufRpc.java   |  6 +-
 .../hbase/ipc/TestRpcHandlerException.java  |  7 +--
 .../TestRSKilledWhenInitializing.java   |  8 +--
 .../hadoop/hbase/security/TestSecureRPC.java|  9 +---
 .../security/token/TestTokenAuthentication.java |  6 +-
 13 files changed, 114 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/efb82957/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
index 09de871..c28f3e6 100644
--- 
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
@@ -168,9 +168,13 @@ public class IntegrationTestRpcClient {
 
 TestRpcServer rpcServer = new TestRpcServer(conf);
 rpcServer.start();
-rpcServers.put(rpcServer.getListenerAddress(), rpcServer);
+InetSocketAddress address = rpcServer.getListenerAddress();
+if (address == null) {
+  throw new IOException("Listener channel is closed");
+}
+rpcServers.put(address, rpcServer);
 serverList.add(rpcServer);
-LOG.info("Started server: " + rpcServer.getListenerAddress());
+LOG.info("Started server: " + address);
 return rpcServer;
   } finally {
 lock.writeLock().unlock();
@@ -187,7 +191,13 @@ public class IntegrationTestRpcClient {
 int size = rpcServers.size();
 int rand = random.nextInt(size);
 rpcServer = serverList.remove(rand);
-rpcServers.remove(rpcServer.getListenerAddress());
+InetSocketAddress address = rpcServer.getListenerAddress();
+if (address == null) {
+  // Throw exception here. We can't remove this instance from the 
server map because
+  // we no longer have access to its map key
+  throw new IOException("Listener channel is closed");
+}
+rpcServers.remove(address);
 
 if (rpcServer != null) {
   stopServer(rpcServer);
@@ -305,8 +315,12 @@ public class IntegrationTestRpcClient {
 TestRpcServer server = cluster.getRandomServer();
 try {
   User user = User.getCurrent();
+  InetSocketAddress address = server.getListenerAddress();
+  if (address == null) {
+throw new IOException("Listener channel is closed");
+  }
   ret = (EchoResponseProto)
-  rpcClient.callBlockingMethod(md, null, param, ret, user, 
server.getListenerAddress());
+  rpcClient.callBlockingMethod(md, null, param, ret, user, 
address);
 } catch (Exception e) {
   LOG.warn(e);
   continue; // expected in case connection is closing or closed

http://git-wip-us.apache.org/repos/asf/hbase/blob/efb82957/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
index 38b7c91..ede4b4e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
@@ -16,6 +16,7 @@ package org.apache.hadoop.hbase.ipc;
  * See the License for the specific language 

[12/17] hbase git commit: HBASE-14696 Support setting allowPartialResults in mapreduce Mappers

2015-10-27 Thread syuanjiang
HBASE-14696 Support setting allowPartialResults in mapreduce Mappers


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

Branch: refs/heads/hbase-12439
Commit: f91546f2e69a0452074d781c8df5723bab1fa393
Parents: a321da2
Author: tedyu 
Authored: Tue Oct 27 07:57:32 2015 -0700
Committer: tedyu 
Committed: Tue Oct 27 07:57:32 2015 -0700

--
 .../hadoop/hbase/protobuf/ProtobufUtil.java |   6 +
 .../hbase/protobuf/generated/ClientProtos.java  | 233 +--
 hbase-protocol/src/main/protobuf/Client.proto   |   1 +
 3 files changed, 169 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f91546f2/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
index 4426a15..15c5675 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
@@ -868,6 +868,9 @@ public final class ProtobufUtil {
 if (scan.isSmall()) {
   scanBuilder.setSmall(scan.isSmall());
 }
+if (scan.getAllowPartialResults()) {
+  scanBuilder.setAllowPartialResults(scan.getAllowPartialResults());
+}
 Boolean loadColumnFamiliesOnDemand = 
scan.getLoadColumnFamiliesOnDemandValue();
 if (loadColumnFamiliesOnDemand != null) {
   
scanBuilder.setLoadColumnFamiliesOnDemand(loadColumnFamiliesOnDemand.booleanValue());
@@ -992,6 +995,9 @@ public final class ProtobufUtil {
 if (proto.hasSmall()) {
   scan.setSmall(proto.getSmall());
 }
+if (proto.hasAllowPartialResults()) {
+  scan.setAllowPartialResults(proto.getAllowPartialResults());
+}
 for (NameBytesPair attribute: proto.getAttributeList()) {
   scan.setAttribute(attribute.getName(), 
attribute.getValue().toByteArray());
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/f91546f2/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
--
diff --git 
a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
 
b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
index c4b1eec..9c7ff54 100644
--- 
a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
+++ 
b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java
@@ -13682,6 +13682,16 @@ public final class ClientProtos {
  * optional uint32 caching = 17;
  */
 int getCaching();
+
+// optional bool allow_partial_results = 18;
+/**
+ * optional bool allow_partial_results = 18;
+ */
+boolean hasAllowPartialResults();
+/**
+ * optional bool allow_partial_results = 18;
+ */
+boolean getAllowPartialResults();
   }
   /**
* Protobuf type {@code hbase.pb.Scan}
@@ -13858,6 +13868,11 @@ public final class ClientProtos {
   caching_ = input.readUInt32();
   break;
 }
+case 144: {
+  bitField0_ |= 0x8000;
+  allowPartialResults_ = input.readBool();
+  break;
+}
   }
 }
   } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -14236,6 +14251,22 @@ public final class ClientProtos {
   return caching_;
 }
 
+// optional bool allow_partial_results = 18;
+public static final int ALLOW_PARTIAL_RESULTS_FIELD_NUMBER = 18;
+private boolean allowPartialResults_;
+/**
+ * optional bool allow_partial_results = 18;
+ */
+public boolean hasAllowPartialResults() {
+  return ((bitField0_ & 0x8000) == 0x8000);
+}
+/**
+ * optional bool allow_partial_results = 18;
+ */
+public boolean getAllowPartialResults() {
+  return allowPartialResults_;
+}
+
 private void initFields() {
   column_ = java.util.Collections.emptyList();
   attribute_ = java.util.Collections.emptyList();
@@ -14254,6 +14285,7 @@ public final class ClientProtos {
   reversed_ = false;
   consistency_ = 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Consistency.STRONG;
   caching_ = 0;
+  allowPartialResults_ = false;
 }
 private byte memoizedIsInitialized = -1;
 public final boolean isInitialized() {

[17/17] hbase git commit: HBASE-14674 Rpc handler / task monitoring seems to be broken after 0.98 (Heng Chen)

2015-10-27 Thread syuanjiang
HBASE-14674 Rpc handler / task monitoring seems to be broken after 0.98 (Heng 
Chen)


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

Branch: refs/heads/hbase-12439
Commit: d5d81d675ace2d87c4ac19562b6b0a29da3d8902
Parents: dfa0528
Author: Enis Soztutar 
Authored: Tue Oct 27 14:24:21 2015 -0700
Committer: Enis Soztutar 
Committed: Tue Oct 27 14:59:29 2015 -0700

--
 .../org/apache/hadoop/hbase/ipc/CallRunner.java  | 19 ---
 .../hadoop/hbase/ipc/FifoRpcScheduler.java   |  2 +-
 .../org/apache/hadoop/hbase/ipc/RpcExecutor.java |  3 +++
 .../org/apache/hadoop/hbase/ipc/RpcServer.java   | 16 +++-
 .../apache/hadoop/hbase/ipc/TestCallRunner.java  |  2 ++
 .../hadoop/hbase/ipc/TestSimpleRpcScheduler.java |  4 
 6 files changed, 29 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d5d81d67/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
index ede4b4e..5b52521 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
@@ -25,7 +25,6 @@ import org.apache.hadoop.hbase.CellScanner;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.ipc.RpcServer.Call;
 import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
-import org.apache.hadoop.hbase.monitoring.TaskMonitor;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.StringUtils;
@@ -59,20 +58,22 @@ public class CallRunner {
 this.rpcServer = rpcServer;
 // Add size of the call to queue size.
 this.rpcServer.addCallSize(call.getSize());
-this.status = getStatus();
   }
 
   public Call getCall() {
 return call;
   }
 
+  public void setStatus(MonitoredRPCHandler status) {
+this.status = status;
+  }
+
   /**
* Cleanup after ourselves... let go of references.
*/
   private void cleanup() {
 this.call = null;
 this.rpcServer = null;
-this.status = null;
   }
 
   public void run() {
@@ -160,16 +161,4 @@ public class CallRunner {
   cleanup();
 }
   }
-
-  MonitoredRPCHandler getStatus() {
-// It is ugly the way we park status up in RpcServer.  Let it be for now.  
TODO.
-MonitoredRPCHandler status = RpcServer.MONITORED_RPC.get();
-if (status != null) {
-  return status;
-}
-status = 
TaskMonitor.get().createRPCStatus(Thread.currentThread().getName());
-status.pause("Waiting for a call");
-RpcServer.MONITORED_RPC.set(status);
-return status;
-  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d5d81d67/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
index 8140c1c..621a8ef 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.hbase.ipc.CallRunner;
 
 /**
  * A very simple {@code }RpcScheduler} that serves incoming requests in order.
@@ -70,6 +69,7 @@ public class FifoRpcScheduler extends RpcScheduler {
 executor.submit(new Runnable() {
   @Override
   public void run() {
+task.setStatus(RpcServer.getStatus());
 task.run();
   }
 });

http://git-wip-us.apache.org/repos/asf/hbase/blob/d5d81d67/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
index 709429d..27750a7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.Abortable;
 

[04/17] hbase git commit: HBASE-14661 RegionServer link is not opening, in HBase Table page (Y. SREENIVASULU REDDY)

2015-10-27 Thread syuanjiang
HBASE-14661 RegionServer link is not opening, in HBase Table page (Y. 
SREENIVASULU REDDY)


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

Branch: refs/heads/hbase-12439
Commit: 928dade1da5d83df2fc3d9b84160da0eec4efee2
Parents: d0944f8
Author: stack 
Authored: Mon Oct 26 14:57:28 2015 -0700
Committer: stack 
Committed: Mon Oct 26 14:57:28 2015 -0700

--
 hbase-server/src/main/resources/hbase-webapps/master/table.jsp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/928dade1/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
--
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp 
b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 4d85eea..f132b2b 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -313,7 +313,7 @@ if ( fqtn != null ) {
 conf))) %>
   <%
   if (addr != null) {
-String url = "//" + addr.getHostname() + ":" + 
master.getRegionServerInfoPort(addr) + "/";
+String url = "//" + addr.getHostname() + ":" + 
master.getRegionServerInfoPort(addr) + "/rs-status";
   %>
   
  <%= addr.getHostname().toString() + ":" + 
addr.getPort() %>



[06/17] hbase git commit: HBASE-14283 Reverse scan doesn’t work with HFile inline index/bloom blocks

2015-10-27 Thread syuanjiang
HBASE-14283 Reverse scan doesn’t work with HFile inline index/bloom blocks

Signed-off-by: Andrew Purtell 


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

Branch: refs/heads/hbase-12439
Commit: 5c56e239c3af22e1232681cceaed7bd96480ed92
Parents: efb8295
Author: Ben Lau 
Authored: Wed Oct 7 16:46:16 2015 -0700
Committer: Andrew Purtell 
Committed: Mon Oct 26 15:12:21 2015 -0700

--
 .../hadoop/hbase/io/hfile/HFileReaderImpl.java  |   7 +-
 .../hfile/TestSeekBeforeWithInlineBlocks.java   | 189 +++
 2 files changed, 194 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5c56e239/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 5af72b6..49b6f5e 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
@@ -859,9 +859,12 @@ public class HFileReaderImpl implements HFile.Reader, 
Configurable {
 reader.returnBlock(seekToBlock);
 // It is important that we compute and pass onDiskSize to the block
 // reader so that it does not have to read the header separately to
-// figure out the size.
+// figure out the size.  Currently, we do not have a way to do this
+// correctly in the general case however.
+// TODO: See https://issues.apache.org/jira/browse/HBASE-14576
+int prevBlockSize = -1;
 seekToBlock = reader.readBlock(previousBlockOffset,
-seekToBlock.getOffset() - previousBlockOffset, cacheBlocks,
+prevBlockSize, cacheBlocks,
 pread, isCompaction, true, BlockType.DATA, 
getEffectiveDataBlockEncoding());
 // TODO shortcut: seek forward in this block to the last key of the
 // block.

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c56e239/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekBeforeWithInlineBlocks.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekBeforeWithInlineBlocks.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekBeforeWithInlineBlocks.java
new file mode 100644
index 000..c9af3d3
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekBeforeWithInlineBlocks.java
@@ -0,0 +1,189 @@
+/*
+ *
+ * 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.io.hfile;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Random;
+
+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.HBaseTestingUtility;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.fs.HFileSystem;
+import org.apache.hadoop.hbase.regionserver.BloomType;
+import org.apache.hadoop.hbase.regionserver.StoreFile;
+import org.apache.hadoop.hbase.testclassification.IOTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.BloomFilterFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.Test;
+import 

[11/17] hbase git commit: HBASE-14694 Scan copy constructor doesn't handle allowPartialResults

2015-10-27 Thread syuanjiang
HBASE-14694 Scan copy constructor doesn't handle allowPartialResults


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

Branch: refs/heads/hbase-12439
Commit: a321da2039a50cdb8e1b8588b4faa6f1689e2ab3
Parents: 4269c7f
Author: tedyu 
Authored: Tue Oct 27 07:51:04 2015 -0700
Committer: tedyu 
Committed: Tue Oct 27 07:51:04 2015 -0700

--
 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a321da20/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
index 9d46bc7..3e68158 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
@@ -230,6 +230,7 @@ public class Scan extends Query {
 reversed = scan.isReversed();
 asyncPrefetch = scan.isAsyncPrefetch();
 small = scan.isSmall();
+allowPartialResults = scan.getAllowPartialResults();
 TimeRange ctr = scan.getTimeRange();
 tr = new TimeRange(ctr.getMin(), ctr.getMax());
 Map> fams = scan.getFamilyMap();



[15/17] hbase git commit: HBASE-14680 Two configs for snapshot timeout and better defaults (Heng Chen)

2015-10-27 Thread syuanjiang
HBASE-14680 Two configs for snapshot timeout and better defaults (Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: 16ff57bea94645aae30ba9b6bf4375b2eec202f1
Parents: c91bfff
Author: Enis Soztutar 
Authored: Tue Oct 27 11:35:46 2015 -0700
Committer: Enis Soztutar 
Committed: Tue Oct 27 14:01:01 2015 -0700

--
 .../src/main/resources/hbase-default.xml| 14 ++
 .../snapshot/DisabledTableSnapshotHandler.java  | 29 
 .../hbase/master/snapshot/SnapshotManager.java  | 14 +++---
 .../snapshot/RegionServerSnapshotManager.java   |  4 +--
 .../snapshot/SnapshotDescriptionUtils.java  | 24 ++--
 5 files changed, 41 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/16ff57be/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..c64873f 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -1686,4 +1686,18 @@ possible configurations would overwhelm and obscure the 
important.
   The max number of threads used in MobCompactor.
 
   
+  
+hbase.snapshot.master.timeout.millis
+30
+
+   Timeout for master for the snapshot procedure execution
+
+   
+ 
+hbase.snapshot.region.timeout
+30
+
+   Timeout for regionservers to keep threads in snapshot request pool 
waiting
+
+   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/16ff57be/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/DisabledTableSnapshotHandler.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/DisabledTableSnapshotHandler.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/DisabledTableSnapshotHandler.java
index 1f2ed0a..5d59229 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/DisabledTableSnapshotHandler.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/DisabledTableSnapshotHandler.java
@@ -26,20 +26,16 @@ import java.util.concurrent.ThreadPoolExecutor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HConstants;
-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.HRegionInfo;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.RegionReplicaUtil;
 import org.apache.hadoop.hbase.errorhandling.ForeignException;
-import org.apache.hadoop.hbase.errorhandling.ForeignExceptionListener;
-import org.apache.hadoop.hbase.errorhandling.TimeoutExceptionInjector;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.mob.MobUtils;
 import 
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
-import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.SnapshotManifest;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSUtils;
@@ -56,7 +52,6 @@ import org.apache.zookeeper.KeeperException;
 @InterfaceStability.Evolving
 public class DisabledTableSnapshotHandler extends TakeSnapshotHandler {
   private static final Log LOG = 
LogFactory.getLog(DisabledTableSnapshotHandler.class);
-  private final TimeoutExceptionInjector timeoutInjector;
 
   /**
* @param snapshot descriptor of the snapshot to take
@@ -65,9 +60,6 @@ public class DisabledTableSnapshotHandler extends 
TakeSnapshotHandler {
   public DisabledTableSnapshotHandler(SnapshotDescription snapshot,
   final MasterServices masterServices) {
 super(snapshot, masterServices);
-
-// setup the timer
-timeoutInjector = getMasterTimerAndBindToMonitor(snapshot, conf, monitor);
   }
 
   @Override
@@ -81,8 +73,6 @@ public class DisabledTableSnapshotHandler extends 
TakeSnapshotHandler {
   public void snapshotRegions(List> 
regionsAndLocations)
   throws IOException, KeeperException {
 try {
-  timeoutInjector.start();
-
   // 1. get all the regions hosting this 

[03/17] hbase git commit: HBASE-14698 Set category timeouts on TestScanner and TestNamespaceAuditor; ADDENDUM

2015-10-27 Thread syuanjiang
  HBASE-14698 Set category timeouts on TestScanner and TestNamespaceAuditor; 
ADDENDUM


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

Branch: refs/heads/hbase-12439
Commit: d0944f8219c4258f948e7470419ae683cc4194db
Parents: 0f6ec61
Author: stack 
Authored: Mon Oct 26 13:28:41 2015 -0700
Committer: stack 
Committed: Mon Oct 26 13:28:41 2015 -0700

--
 .../apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d0944f82/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 9863fac..64c74e8 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
@@ -34,6 +34,9 @@ import java.util.Random;
 import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.KeyValueUtil;



[08/17] hbase git commit: HBASE-14678 Experiment: Temporarily disable balancer and a few others to see if root of crashed/timedout JVMs; ADDENDUM

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


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

Branch: refs/heads/hbase-12439
Commit: 496d20cfca5a30bc72a29e4ef893424964f9fa91
Parents: 2b86002
Author: stack 
Authored: Mon Oct 26 20:20:47 2015 -0700
Committer: stack 
Committed: Mon Oct 26 20:21:01 2015 -0700

--
 .../TestMobFlushSnapshotFromClient.java | 72 
 1 file changed, 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/496d20cf/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobFlushSnapshotFromClient.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobFlushSnapshotFromClient.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobFlushSnapshotFromClient.java
deleted file mode 100644
index 69f2cb3..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobFlushSnapshotFromClient.java
+++ /dev/null
@@ -1,72 +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.snapshot;
-
-import java.io.IOException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.Table;
-import org.apache.hadoop.hbase.mob.MobConstants;
-import org.apache.hadoop.hbase.testclassification.ClientTests;
-import org.apache.hadoop.hbase.testclassification.LargeTests;
-import org.junit.BeforeClass;
-import org.junit.experimental.categories.Category;
-
-/**
- * Test creating/using/deleting snapshots from the client
- * 
- * This is an end-to-end test for the snapshot utility
- *
- * TODO This is essentially a clone of TestSnapshotFromClient.  This is worth 
refactoring this
- * because there will be a few more flavors of snapshots that need to run 
these tests.
- */
-@Category({ClientTests.class, LargeTests.class})
-public class TestMobFlushSnapshotFromClient extends 
TestFlushSnapshotFromClient {
-  private static final Log LOG = 
LogFactory.getLog(TestFlushSnapshotFromClient.class);
-
-  @BeforeClass
-  public static void setupCluster() throws Exception {
-setupConf(UTIL.getConfiguration());
-UTIL.startMiniCluster(3);
-  }
-
-  protected static void setupConf(Configuration conf) {
-TestFlushSnapshotFromClient.setupConf(conf);
-UTIL.getConfiguration().setInt(MobConstants.MOB_FILE_CACHE_SIZE_KEY, 0);
-  }
-
-  @Override
-  protected void createTable() throws Exception {
-MobSnapshotTestingUtils.createMobTable(UTIL, TABLE_NAME, 1, TEST_FAM);
-  }
-
-  @Override
-  protected void verifyRowCount(final HBaseTestingUtility util, final 
TableName tableName,
-  long expectedRows) throws IOException {
-MobSnapshotTestingUtils.verifyMobRowCount(util, tableName, expectedRows);
-  }
-
-  @Override
-  protected int countRows(final Table table, final byte[]... families) throws 
IOException {
-return MobSnapshotTestingUtils.countMobRows(table, families);
-  }
-}



[01/17] hbase git commit: HBASE-14689 Addendum and unit test for HBASE-13471

2015-10-27 Thread syuanjiang
Repository: hbase
Updated Branches:
  refs/heads/hbase-12439 899857609 -> d5d81d675


HBASE-14689 Addendum and unit test for HBASE-13471


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

Branch: refs/heads/hbase-12439
Commit: 4c04e8065f205a89b84670a9865149237499dd86
Parents: 8998576
Author: Enis Soztutar 
Authored: Mon Oct 26 11:56:51 2015 -0700
Committer: Enis Soztutar 
Committed: Mon Oct 26 11:56:51 2015 -0700

--
 .../hadoop/hbase/regionserver/HRegion.java  | 14 ++---
 .../hadoop/hbase/regionserver/TestHRegion.java  | 56 +++-
 2 files changed, 62 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4c04e806/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 34738de..07924e6 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -2961,11 +2961,12 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 } catch (IOException ioe) {
   LOG.warn("Failed getting lock in batch put, row="
 + Bytes.toStringBinary(mutation.getRow()), ioe);
+  throw ioe;
 }
 if (rowLock == null) {
   // We failed to grab another lock
-  assert false: "Should never fail to get lock when blocking";
-  break; // stop acquiring more rows for this batch
+  throw new IOException("Failed getting lock in batch put, row=" +
+  Bytes.toStringBinary(mutation.getRow()));
 } else {
   acquiredRowLocks.add(rowLock);
 }
@@ -5055,6 +5056,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
* @param readLock is the lock reader or writer. True indicates that a 
non-exlcusive
* lock is requested
*/
+  @Override
   public RowLock getRowLock(byte[] row, boolean readLock) throws IOException {
 // Make sure the row is inside of this region before getting the lock for 
it.
 checkRow(row, "row lock");
@@ -6947,7 +6949,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
*/
   private static List carryForwardTags(final Cell cell, final List 
tags) {
 if (cell.getTagsLength() <= 0) return tags;
-List newTags = tags == null? new ArrayList(): /*Append 
Tags*/tags; 
+List newTags = tags == null? new ArrayList(): /*Append 
Tags*/tags;
 Iterator i =
 CellUtil.tagsIterator(cell.getTagsArray(), cell.getTagsOffset(), 
cell.getTagsLength());
 while (i.hasNext()) newTags.add(i.next());
@@ -7228,7 +7230,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 
   // They are subtley different in quiet a few ways. This came out only
   // after study. I am not sure that many of the differences are intentional.
-  // TODO: St.Ack 20150907 
+  // TODO: St.Ack 20150907
 
   @Override
   public Result increment(Increment mutation, long nonceGroup, long nonce)
@@ -7242,7 +7244,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 boolean writeToWAL = durability != Durability.SKIP_WAL;
 WALEdit walEdits = null;
 List allKVs = new ArrayList(mutation.size());
-
+
 Map tempMemstore = new HashMap();
 long size = 0;
 long txid = 0;
@@ -8045,7 +8047,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 WALKey key = new HLogKey(getRegionInfo().getEncodedNameAsBytes(),
   getRegionInfo().getTable(), WALKey.NO_SEQUENCE_ID, 0, null,
   HConstants.NO_NONCE, HConstants.NO_NONCE, getMVCC());
-
+
 // Call append but with an empty WALEdit.  The returned sequence id will 
not be associated
 // with any edit and we can be sure it went in after all outstanding 
appends.
 try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4c04e806/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
index ed45c2d..06517d7 100644
--- 

[07/17] hbase git commit: HBASE-14682 CM restore functionality for regionservers is broken

2015-10-27 Thread syuanjiang
HBASE-14682 CM restore functionality for regionservers is broken


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

Branch: refs/heads/hbase-12439
Commit: 2b860025216898bb34a8e77799dd20a9a638e9c5
Parents: 5c56e23
Author: Enis Soztutar 
Authored: Mon Oct 26 16:47:16 2015 -0700
Committer: Enis Soztutar 
Committed: Mon Oct 26 16:47:16 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/2b860025/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
index 07ca5ec..62f5c66 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
@@ -431,8 +431,8 @@ public class DistributedHBaseCluster extends HBaseCluster {
   protected boolean restoreRegionServers(ClusterStatus initial, ClusterStatus 
current) {
 Set toStart = new TreeSet(new 
ServerNameIgnoreStartCodeComparator());
 Set toKill = new TreeSet(new 
ServerNameIgnoreStartCodeComparator());
-toStart.addAll(initial.getBackupMasters());
-toKill.addAll(current.getBackupMasters());
+toStart.addAll(initial.getServers());
+toKill.addAll(current.getServers());
 
 for (ServerName server : current.getServers()) {
   toStart.remove(server);



[16/17] hbase git commit: HBASE-14705 Javadoc for KeyValue constructor is not correct (Jean-Marc Spaggiari)

2015-10-27 Thread syuanjiang
HBASE-14705 Javadoc for KeyValue constructor is not correct (Jean-Marc 
Spaggiari)


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

Branch: refs/heads/hbase-12439
Commit: dfa05284cfef985e806660de0a1415f0fa7c2211
Parents: 16ff57b
Author: Andrew Purtell 
Authored: Tue Oct 27 14:39:03 2015 -0700
Committer: Andrew Purtell 
Committed: Tue Oct 27 14:40:28 2015 -0700

--
 hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/dfa05284/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
index 7534e9d..933dd1d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
@@ -396,7 +396,8 @@ public class KeyValue implements Cell, HeapSize, Cloneable, 
SettableSequenceId,
   }
 
   /**
-   * Constructs KeyValue structure filled with null value.
+   * Constructs KeyValue structure as a put filled with specified values and
+   * LATEST_TIMESTAMP.
* @param row - row key (arbitrary byte array)
* @param family family name
* @param qualifier column qualifier



[3/8] hbase git commit: HBASE-14425 In Secure Zookeeper cluster superuser will not have sufficient permission if multiple values are configured in hbase.superuser (Pankaj Kumar)

2015-10-28 Thread syuanjiang
HBASE-14425 In Secure Zookeeper cluster superuser will not have sufficient 
permission if multiple values are configured in hbase.superuser (Pankaj Kumar)


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

Branch: refs/heads/hbase-12439
Commit: 0e6dd3257b1bebe3e12c84aace59dd9cf0dcac2b
Parents: 007e4df
Author: Enis Soztutar 
Authored: Tue Oct 27 16:56:20 2015 -0700
Committer: Enis Soztutar 
Committed: Tue Oct 27 16:56:20 2015 -0700

--
 .../apache/hadoop/hbase/zookeeper/ZKUtil.java   | 20 +++--
 .../hbase/zookeeper/ZooKeeperWatcher.java   | 45 +++-
 .../hadoop/hbase/zookeeper/TestZKUtil.java  | 24 ++-
 .../test/IntegrationTestZKAndFSPermissions.java |  3 +-
 4 files changed, 85 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0e6dd325/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
index 27c3bba..633525f 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
@@ -39,6 +39,7 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.AuthUtil;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.ServerName;
@@ -48,6 +49,7 @@ import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos;
 import 
org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
 import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos;
+import org.apache.hadoop.hbase.security.Superusers;
 import org.apache.hadoop.hbase.util.ByteStringer;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Threads;
@@ -1028,11 +1030,23 @@ public class ZKUtil {
   return Ids.OPEN_ACL_UNSAFE;
 }
 if (isSecureZooKeeper) {
-  String superUser = zkw.getConfiguration().get("hbase.superuser");
   ArrayList acls = new ArrayList();
   // add permission to hbase supper user
-  if (superUser != null) {
-acls.add(new ACL(Perms.ALL, new Id("auth", superUser)));
+  String[] superUsers = 
zkw.getConfiguration().getStrings(Superusers.SUPERUSER_CONF_KEY);
+  if (superUsers != null) {
+List groups = new ArrayList();
+for (String user : superUsers) {
+  if (user.startsWith(AuthUtil.GROUP_PREFIX)) {
+// TODO: Set node ACL for groups when ZK supports this feature
+groups.add(user);
+  } else {
+acls.add(new ACL(Perms.ALL, new Id("auth", user)));
+  }
+}
+if (!groups.isEmpty()) {
+  LOG.warn("Znode ACL setting for group " + groups
+  + " is skipped, Zookeeper doesn't support this feature 
presently.");
+}
   }
   // Certain znodes are accessed directly by the client,
   // so they must be readable by non-authenticated clients

http://git-wip-us.apache.org/repos/asf/hbase/blob/0e6dd325/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
index 220a679..f7a2175 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
@@ -31,10 +31,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Abortable;
+import org.apache.hadoop.hbase.AuthUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.security.Superusers;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.zookeeper.KeeperException;
 import 

[5/8] hbase git commit: HBASE-12769 Replication fails to delete all corresponding zk nodes when peer is removed (Jianwei Cui)

2015-10-28 Thread syuanjiang
HBASE-12769 Replication fails to delete all corresponding zk nodes when peer is 
removed (Jianwei Cui)


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

Branch: refs/heads/hbase-12439
Commit: 210c3dd93748b5de65301f2cca2342f36e169b78
Parents: e24d03b
Author: tedyu 
Authored: Tue Oct 27 19:40:40 2015 -0700
Committer: tedyu 
Committed: Tue Oct 27 19:40:40 2015 -0700

--
 .../client/replication/ReplicationAdmin.java|   7 +-
 .../hbase/replication/ReplicationFactory.java   |   7 +-
 .../replication/ReplicationPeersZKImpl.java |  25 +++-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java |  39 +-
 .../hbase/util/hbck/ReplicationChecker.java | 134 +++
 .../replication/TestReplicationAdmin.java   |  34 +
 .../hadoop/hbase/util/BaseTestHBaseFsck.java|   3 +-
 .../hadoop/hbase/util/TestHBaseFsckOneRS.java   |  59 +++-
 .../hadoop/hbase/util/hbck/HbckTestingUtil.java |  11 +-
 9 files changed, 303 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/210c3dd9/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
index b33e64d..8bd1267 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java
@@ -125,11 +125,12 @@ public class ReplicationAdmin implements Closeable {
 try {
   zkw = createZooKeeperWatcher();
   try {
-this.replicationPeers = ReplicationFactory.getReplicationPeers(zkw, 
conf, this.connection);
-this.replicationPeers.init();
 this.replicationQueuesClient =
 ReplicationFactory.getReplicationQueuesClient(zkw, conf, 
this.connection);
 this.replicationQueuesClient.init();
+this.replicationPeers = ReplicationFactory.getReplicationPeers(zkw, 
conf,
+  this.replicationQueuesClient, this.connection);
+this.replicationPeers.init();
   } catch (Exception exception) {
 if (zkw != null) {
   zkw.close();
@@ -187,7 +188,7 @@ public class ReplicationAdmin implements Closeable {
 this.replicationPeers.addPeer(id,
   new ReplicationPeerConfig().setClusterKey(clusterKey), tableCFs);
   }
-
+  
   /**
* Add a new remote slave cluster for replication.
* @param id a short name that identifies the cluster

http://git-wip-us.apache.org/repos/asf/hbase/blob/210c3dd9/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java
index f115a39..91e77ca 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java
@@ -42,7 +42,12 @@ public class ReplicationFactory {
 
   public static ReplicationPeers getReplicationPeers(final ZooKeeperWatcher 
zk, Configuration conf,
   Abortable abortable) {
-return new ReplicationPeersZKImpl(zk, conf, abortable);
+return getReplicationPeers(zk, conf, null, abortable);
+  }
+  
+  public static ReplicationPeers getReplicationPeers(final ZooKeeperWatcher 
zk, Configuration conf,
+  final ReplicationQueuesClient queuesClient, Abortable abortable) {
+return new ReplicationPeersZKImpl(zk, conf, queuesClient, abortable);
   }
 
   public static ReplicationTracker getReplicationTracker(ZooKeeperWatcher 
zookeeper,

http://git-wip-us.apache.org/repos/asf/hbase/blob/210c3dd9/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java
index a223531..1884469 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java
+++ 

[2/8] hbase git commit: HBASE-14709 Parent change breaks graceful_stop.sh on a cluster

2015-10-28 Thread syuanjiang
HBASE-14709 Parent change breaks graceful_stop.sh on a cluster


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

Branch: refs/heads/hbase-12439
Commit: 007e4dfa1384f9746174442a01f512a5744a83da
Parents: 939697b
Author: stack 
Authored: Tue Oct 27 16:42:39 2015 -0700
Committer: stack 
Committed: Tue Oct 27 16:42:49 2015 -0700

--
 bin/graceful_stop.sh | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/007e4dfa/bin/graceful_stop.sh
--
diff --git a/bin/graceful_stop.sh b/bin/graceful_stop.sh
index 98b27e3..5eea06c 100755
--- a/bin/graceful_stop.sh
+++ b/bin/graceful_stop.sh
@@ -84,7 +84,7 @@ fi
 hostname=$1
 filename="/tmp/$hostname"
 
-local=false
+local=
 localhostname=`/bin/hostname`
 
 if [ "$localhostname" == "$hostname" ]; then
@@ -103,7 +103,7 @@ log "Unloaded $hostname region(s)"
 hosts="/tmp/$(basename $0).$$.tmp"
 echo $hostname >> $hosts
 if [ "$thrift" != "" ]; then
-  log "Stopping thrift"
+  log "Stopping thrift server on $hostname"
   if [ "$local" ]; then
 "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop thrift
   else
@@ -111,28 +111,28 @@ if [ "$thrift" != "" ]; then
   fi
 fi
 if [ "$rest" != "" ]; then
-  log "Stopping rest"
+  log "Stopping rest server on $hostname"
   if [ "$local" ]; then
 "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop rest
   else
 "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop 
rest
   fi
 fi
-log "Stopping regionserver"
+log "Stopping regionserver on $hostname"
 if [ "$local" ]; then
   "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop regionserver
 else
   "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop 
regionserver
 fi
 if [ "$restart" != "" ]; then
-  log "Restarting regionserver"
+  log "Restarting regionserver on $hostname"
   if [ "$local" ]; then
 "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start regionserver
   else
 "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} start 
regionserver
   fi
   if [ "$thrift" != "" ]; then
-log "Restarting thrift"
+log "Restarting thrift server on $hostname"
 # -b 0.0.0.0 says listen on all interfaces rather than just default.
 if [ "$local" ]; then
   "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start thrift -b 0.0.0.0
@@ -141,7 +141,7 @@ if [ "$restart" != "" ]; then
 fi
   fi
   if [ "$rest" != "" ]; then
-log "Restarting rest"
+log "Restarting rest server on $hostname"
 if [ "$local" ]; then
   "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start rest
 else



[4/8] hbase git commit: HBASE-14695 Fix some easy HTML warnings and bad links

2015-10-28 Thread syuanjiang
HBASE-14695 Fix some easy HTML warnings and bad links


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

Branch: refs/heads/hbase-12439
Commit: e24d03b10c34cca4e51d037ae51fef4eca1666de
Parents: 0e6dd32
Author: Misty Stanley-Jones 
Authored: Mon Oct 26 10:11:10 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Wed Oct 28 12:12:40 2015 +1000

--
 .../apache/hadoop/hbase/client/package-info.java|  2 +-
 .../org/apache/hadoop/hbase/util/BloomFilter.java   |  2 +-
 .../org/apache/hadoop/hbase/util/FSMapRUtils.java   |  4 ++--
 pom.xml | 16 
 src/main/asciidoc/_chapters/ops_mgt.adoc|  3 ++-
 src/main/asciidoc/_chapters/performance.adoc|  2 +-
 src/main/site/site.xml  |  2 +-
 src/main/site/xdoc/index.xml|  8 
 8 files changed, 24 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e24d03b1/hbase-client/src/main/java/org/apache/hadoop/hbase/client/package-info.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/package-info.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/package-info.java
index cf28c91..dd85d3e 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/package-info.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/package-info.java
@@ -200,7 +200,7 @@ public class MyLittleHBaseClient {
 
 Related Documentation
 
-  http://hbase.org;>HBase Home Page
+  http://hbase.org/;>HBase Home Page
   http://hadoop.apache.org/;>Hadoop Home Page
 
   See also the section in the HBase Reference Guide where it discusses

http://git-wip-us.apache.org/repos/asf/hbase/blob/e24d03b1/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilter.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilter.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilter.java
index 197ff12..2062244 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilter.java
@@ -40,7 +40,7 @@ import org.apache.hadoop.hbase.nio.ByteBuff;
  * trade-off between the false positive rate and the size.
  *
  * 
- * Originally inspired by http://www.one-lab.org;>European Commission
+ * Originally inspired by http://www.one-lab.org/;>European Commission
  * One-Lab Project 034819.
  *
  * Bloom filters are very sensitive to the number of elements inserted into

http://git-wip-us.apache.org/repos/asf/hbase/blob/e24d03b1/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSMapRUtils.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSMapRUtils.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSMapRUtils.java
index d04c07d..5214cc5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSMapRUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSMapRUtils.java
@@ -29,12 +29,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 /**
- * http://www.mapr.com;>MapR implementation.
+ * http://www.mapr.com/;>MapR implementation.
  */
 @InterfaceAudience.Private
 public class FSMapRUtils extends FSUtils {
   private static final Log LOG = LogFactory.getLog(FSMapRUtils.class);
-  
+
   public void recoverFileLease(final FileSystem fs, final Path p,
   Configuration conf, CancelableProgressable reporter) throws IOException {
 LOG.info("Recovering file " + p.toString() +

http://git-wip-us.apache.org/repos/asf/hbase/blob/e24d03b1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index eab8eb2..5bcdbc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2804,8 +2804,12 @@
   devapidocs
   Developer API
   The full HBase API, including private and unstable 
APIs
-  **/generated/*
-  
org.apache.hadoop.hbase.generated.master:org.apache.hadoop.hbase.protobuf.generated:org.apache.hadoop.hbase.tmpl.common
+  
+**/generated/*
+**/protobuf/*
+**/*.scala
+  
+  

[8/8] hbase git commit: HBASE-14701 Fix flakey Failed tests: TestMobFlushSnapshotFromClient>TestFlushSnapshotFromClient.testSkipFlushTableSnapshot:199 null; DISABLING

2015-10-28 Thread syuanjiang
HBASE-14701 Fix flakey Failed tests: 
TestMobFlushSnapshotFromClient>TestFlushSnapshotFromClient.testSkipFlushTableSnapshot:199
 null; DISABLING


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

Branch: refs/heads/hbase-12439
Commit: 4b018d2a3988a70d98e2388d0013e63857c5e193
Parents: 51538c5
Author: stack 
Authored: Wed Oct 28 10:56:37 2015 -0700
Committer: stack 
Committed: Wed Oct 28 10:56:37 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/4b018d2a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
index fca9f16..b30bcc9 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
@@ -54,6 +54,7 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 
 /**
@@ -165,7 +166,7 @@ public class TestFlushSnapshotFromClient {
* Test snapshotting a table that is online without flushing
* @throws Exception
*/
-  @Test(timeout=3)
+  @Ignore ("Flakey test") @Test(timeout=3)
   public void testSkipFlushTableSnapshot() throws Exception {
 Admin admin = UTIL.getHBaseAdmin();
 // make sure we don't fail on listing snapshots



[6/8] hbase git commit: HBASE-14529 - Addendum to avoid SIGHUP call for WINDOWS OS

2015-10-28 Thread syuanjiang
HBASE-14529 - Addendum to avoid SIGHUP call for WINDOWS OS


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

Branch: refs/heads/hbase-12439
Commit: bae94ca9729bec2e0fe3556a31e29a2444737b1f
Parents: 210c3dd
Author: ramkrishna 
Authored: Wed Oct 28 11:52:20 2015 +0530
Committer: ramkrishna 
Committed: Wed Oct 28 11:52:20 2015 +0530

--
 .../hadoop/hbase/regionserver/HRegionServer.java | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bae94ca9/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 8a5e423..0234769 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -52,6 +52,7 @@ import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.servlet.http.HttpServlet;
 
+import org.apache.commons.lang.SystemUtils;
 import org.apache.commons.lang.math.RandomUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -606,12 +607,14 @@ public class HRegionServer extends HasThread implements
 this.walRoller = new LogRoller(this, this);
 this.choreService = new ChoreService(getServerName().toString());
 
-Signal.handle(new Signal("HUP"), new SignalHandler() {
-  public void handle(Signal signal) {
-getConfiguration().reloadConfiguration();
-configurationManager.notifyAllObservers(getConfiguration());
-  }
-});
+if (!SystemUtils.IS_OS_WINDOWS) {
+  Signal.handle(new Signal("HUP"), new SignalHandler() {
+public void handle(Signal signal) {
+  getConfiguration().reloadConfiguration();
+  configurationManager.notifyAllObservers(getConfiguration());
+}
+  });
+}
   }
 
   protected TableDescriptors getFsTableDescriptors() throws IOException {



[01/14] hbase git commit: HBASE-14343 Fix debug message in SimpleRegionNormalizer for small regions (Lars Francke)

2015-10-26 Thread syuanjiang
Repository: hbase
Updated Branches:
  refs/heads/hbase-12439 8b7796b0b -> 899857609


HBASE-14343 Fix debug message in SimpleRegionNormalizer for small regions (Lars 
Francke)


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

Branch: refs/heads/hbase-12439
Commit: 6875e6d4d4a2b57f49febbf7a10776bdf84b7d6b
Parents: 8b7796b
Author: Lars George 
Authored: Sat Oct 24 11:19:32 2015 +0200
Committer: Lars George 
Committed: Sat Oct 24 11:19:32 2015 +0200

--
 .../normalizer/SimpleRegionNormalizer.java  | 22 +++-
 1 file changed, 12 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6875e6d4/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
index 8971664..d843bd1 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
@@ -48,7 +48,9 @@ import java.util.List;
  */
 @InterfaceAudience.Private
 public class SimpleRegionNormalizer implements RegionNormalizer {
+
   private static final Log LOG = 
LogFactory.getLog(SimpleRegionNormalizer.class);
+  private static final int MIN_REGION_COUNT = 3;
   private MasterServices masterServices;
 
   /**
@@ -68,8 +70,7 @@ public class SimpleRegionNormalizer implements 
RegionNormalizer {
* @return normalization plan to execute
*/
   @Override
-  public NormalizationPlan computePlanForTable(TableName table)
-  throws HBaseIOException {
+  public NormalizationPlan computePlanForTable(TableName table) throws 
HBaseIOException {
 if (table == null || table.isSystemTable()) {
   LOG.debug("Normalization of table " + table + " isn't allowed");
   return EmptyNormalizationPlan.getInstance();
@@ -79,9 +80,10 @@ public class SimpleRegionNormalizer implements 
RegionNormalizer {
   getRegionsOfTable(table);
 
 //TODO: should we make min number of regions a config param?
-if (tableRegions == null || tableRegions.size() < 3) {
-  LOG.debug("Table " + table + " has " + tableRegions.size() + " regions, 
required min number"
-+ " of regions for normalizer to run is 3, not running normalizer");
+if (tableRegions == null || tableRegions.size() < MIN_REGION_COUNT) {
+  int nrRegions = tableRegions == null ? 0 : tableRegions.size();
+  LOG.debug("Table " + table + " has " + nrRegions + " regions, required 
min number"
++ " of regions for normalizer to run is " + MIN_REGION_COUNT + ", not 
running normalizer");
   return EmptyNormalizationPlan.getInstance();
 }
 
@@ -93,7 +95,6 @@ public class SimpleRegionNormalizer implements 
RegionNormalizer {
 
 // A is a smallest region, B is it's smallest neighbor
 Pair smallestRegion = new Pair<>();
-Pair smallestNeighborOfSmallestRegion;
 int smallestRegionIndex = 0;
 
 for (int i = 0; i < tableRegions.size(); i++) {
@@ -115,16 +116,17 @@ public class SimpleRegionNormalizer implements 
RegionNormalizer {
 
 // now get smallest neighbor of smallest region
 long leftNeighborSize = -1;
-long rightNeighborSize = -1;
 
 if (smallestRegionIndex > 0) {
   leftNeighborSize = getRegionSize(tableRegions.get(smallestRegionIndex - 
1));
 }
 
+long rightNeighborSize = -1;
 if (smallestRegionIndex < tableRegions.size() - 1) {
   rightNeighborSize = getRegionSize(tableRegions.get(smallestRegionIndex + 
1));
 }
 
+Pair smallestNeighborOfSmallestRegion;
 if (leftNeighborSize == -1) {
   smallestNeighborOfSmallestRegion =
 new Pair<>(tableRegions.get(smallestRegionIndex + 1), 
rightNeighborSize);
@@ -154,11 +156,11 @@ public class SimpleRegionNormalizer implements 
RegionNormalizer {
 + largestRegion.getSecond() + ", more than 2 times than avg size, 
splitting");
   return new SplitNormalizationPlan(largestRegion.getFirst(), null);
 } else {
-  if ((smallestRegion.getSecond() + 
smallestNeighborOfSmallestRegion.getSecond()
-  < avgRegionSize)) {
+  if (smallestRegion.getSecond() + 
smallestNeighborOfSmallestRegion.getSecond()
+  < avgRegionSize) {
 LOG.debug("Table " + table + ", smallest region 

[07/14] hbase git commit: HBASE-14676 HBaseTestCase clean out: Purge Incommon Interface and Table and Region implementations: ADDENDUM -- forgot to add file

2015-10-26 Thread syuanjiang
HBASE-14676 HBaseTestCase clean out: Purge Incommon Interface and Table and 
Region implementations: ADDENDUM -- forgot to add file


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

Branch: refs/heads/hbase-12439
Commit: 80a6fd01a170fd2e4798eaa44f6cd3e0c7b63d4c
Parents: 9925e9a
Author: stack 
Authored: Sat Oct 24 11:09:08 2015 -0700
Committer: stack 
Committed: Sat Oct 24 11:09:18 2015 -0700

--
 .../hbase/regionserver/RegionAsTable.java   | 324 +++
 1 file changed, 324 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/80a6fd01/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
new file mode 100644
index 000..f65bc5d
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
@@ -0,0 +1,324 @@
+/**
+ * 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.regionserver;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+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.Increment;
+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.Row;
+import org.apache.hadoop.hbase.client.RowMutations;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.coprocessor.Batch.Call;
+import org.apache.hadoop.hbase.client.coprocessor.Batch.Callback;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
+import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel;
+
+import com.google.protobuf.Descriptors.MethodDescriptor;
+import com.google.protobuf.Message;
+import com.google.protobuf.Service;
+import com.google.protobuf.ServiceException;
+
+/**
+ * An implementation of {@link Table} that sits directly on a Region; it 
decorates the passed in
+ * Region instance with the Table API. Some API is not implemented yet (throws
+ * {@link UnsupportedOperationException}) mostly because no need as yet or it 
necessitates copying
+ * a load of code local from RegionServer.
+ * 
+ * Use as an instance of a {@link Table} in-the-small -- no networking or 
servers
+ * necessary -- or to write a test that can run directly against the datastore 
and then
+ * over the network.
+ */
+public class RegionAsTable implements Table {
+  private final Region region;
+
+  /**
+   * @param region Region to decorate with Table API.
+   */
+  public RegionAsTable(final Region region) {
+this.region = region;
+  }
+
+  @Override
+  public TableName getName() {
+return this.region.getTableDesc().getTableName();
+  }
+
+  @Override
+  public Configuration getConfiguration() {
+throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public HTableDescriptor getTableDescriptor() throws IOException {
+return this.region.getTableDesc();
+  }
+
+  @Override
+  public boolean exists(Get get) throws IOException {
+if (!get.isCheckExistenceOnly()) throw new IllegalArgumentException();
+return get(get) != null;
+  }
+
+  

[12/14] hbase git commit: HBASE-14648 Reenable TestWALProcedureStoreOnHDFS#testWalRollOnLowReplication (Heng Chen)

2015-10-26 Thread syuanjiang
HBASE-14648 Reenable TestWALProcedureStoreOnHDFS#testWalRollOnLowReplication 
(Heng Chen)


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

Branch: refs/heads/hbase-12439
Commit: 46c646d6154d6a5291c308e065802248f4e4e7b9
Parents: 9597847
Author: stack 
Authored: Sat Oct 24 20:55:37 2015 -0700
Committer: stack 
Committed: Sat Oct 24 20:55:47 2015 -0700

--
 .../procedure/TestWALProcedureStoreOnHDFS.java  | 167 +--
 1 file changed, 79 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/46c646d6/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 b360966..2e80b69 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
@@ -66,7 +66,7 @@ public class TestWALProcedureStoreOnHDFS {
 }
   };
 
-  private static void setupConf(Configuration conf) {
+  private static void initConfig(Configuration conf) {
 conf.setInt("dfs.replication", 3);
 conf.setInt("dfs.namenode.replication.min", 3);
 
@@ -76,20 +76,16 @@ public class TestWALProcedureStoreOnHDFS {
 conf.setInt("hbase.procedure.store.wal.sync.failure.roll.max", 10);
   }
 
-  @Before
   public void setup() throws Exception {
-setupConf(UTIL.getConfiguration());
 MiniDFSCluster dfs = UTIL.startMiniDFSCluster(3);
 
 Path logDir = new Path(new Path(dfs.getFileSystem().getUri()), 
"/test-logs");
-store = ProcedureTestingUtility.createWalStore(
-  UTIL.getConfiguration(), dfs.getFileSystem(), logDir);
+store = ProcedureTestingUtility.createWalStore(UTIL.getConfiguration(), 
dfs.getFileSystem(), logDir);
 store.registerListener(stopProcedureListener);
 store.start(8);
 store.recoverLease();
   }
 
-  @After
   public void tearDown() throws Exception {
 store.stop(false);
 UTIL.getDFSCluster().getFileSystem().delete(store.getLogDir(), true);
@@ -103,107 +99,102 @@ public class TestWALProcedureStoreOnHDFS {
 
   @Test(timeout=6, expected=RuntimeException.class)
   public void testWalAbortOnLowReplication() throws Exception {
-assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
-
-LOG.info("Stop DataNode");
-UTIL.getDFSCluster().stopDataNode(0);
-assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
+initConfig(UTIL.getConfiguration());
+setup();
+try {
+  assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
 
-store.insert(new TestProcedure(1, -1), null);
-for (long i = 2; store.isRunning(); ++i) {
+  LOG.info("Stop DataNode");
+  UTIL.getDFSCluster().stopDataNode(0);
   assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
-  store.insert(new TestProcedure(i, -1), null);
-  Thread.sleep(100);
+
+  store.insert(new TestProcedure(1, -1), null);
+  for (long i = 2; store.isRunning(); ++i) {
+assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
+store.insert(new TestProcedure(i, -1), null);
+Thread.sleep(100);
+  }
+  assertFalse(store.isRunning());
+  fail("The store.insert() should throw an exeption");
+} finally {
+  tearDown();
 }
-assertFalse(store.isRunning());
-fail("The store.insert() should throw an exeption");
   }
 
   @Test(timeout=6)
   public void testWalAbortOnLowReplicationWithQueuedWriters() throws Exception 
{
-assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
-store.registerListener(new ProcedureStore.ProcedureStoreListener() {
-  @Override
-  public void postSync() {
-Threads.sleepWithoutInterrupt(2000);
-  }
+initConfig(UTIL.getConfiguration());
+setup();
+try {
+  assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
+  store.registerListener(new ProcedureStore.ProcedureStoreListener() {
+@Override
+public void postSync() {
+  Threads.sleepWithoutInterrupt(2000);
+}
 
-  @Override
-  public void abortProcess() {}
-});
-
-final AtomicInteger reCount = new AtomicInteger(0);
-Thread[] thread = new Thread[store.getNumThreads() * 2 + 1];
-for (int i = 0; i < thread.length; ++i) {
-   

[05/14] hbase git commit: HBASE-14676 HBaseTestCase clean out: Purge Incommon Interface and Table and Region implementations

2015-10-26 Thread syuanjiang
HBASE-14676 HBaseTestCase clean out: Purge Incommon Interface and Table and 
Region implementations


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

Branch: refs/heads/hbase-12439
Commit: 604ff56ef3c74770a1f0480eebe2d9a45649e1b9
Parents: caae3b2
Author: stack 
Authored: Sat Oct 24 10:20:40 2015 -0700
Committer: stack 
Committed: Sat Oct 24 10:20:52 2015 -0700

--
 .../org/apache/hadoop/hbase/HBaseTestCase.java  | 244 +--
 .../apache/hadoop/hbase/TestMultiVersions.java  |  15 +-
 .../apache/hadoop/hbase/TimestampTestBase.java  | 122 +-
 .../hbase/regionserver/TestCompaction.java  |  15 +-
 .../hbase/regionserver/TestMajorCompaction.java |  12 +-
 .../hbase/regionserver/TestMinorCompaction.java |   4 +-
 .../regionserver/TestMobStoreCompaction.java|  16 +-
 .../hadoop/hbase/regionserver/TestScanner.java  | 154 ++--
 8 files changed, 178 insertions(+), 404 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/604ff56e/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
index 597573a..1fb096d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
@@ -19,35 +19,29 @@
 package org.apache.hadoop.hbase;
 
 import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
 import java.util.NavigableMap;
 
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
 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.client.Delete;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Get;
-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;
-import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.RegionAsTable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSTableDescriptors;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
 /**
  * Abstract HBase test class.  Initializes a few things that can come in handly
  * like an HBaseConfiguration and filesystem.
@@ -239,7 +233,7 @@ public abstract class HBaseTestCase extends TestCase {
 if (startKeyBytes == null || startKeyBytes.length == 0) {
   startKeyBytes = START_KEY_BYTES;
 }
-return addContent(new HRegionIncommon(r), Bytes.toString(columnFamily), 
Bytes.toString(column),
+return addContent(new RegionAsTable(r), Bytes.toString(columnFamily), 
Bytes.toString(column),
   startKeyBytes, endKey, -1);
   }
 
@@ -251,18 +245,15 @@ public abstract class HBaseTestCase extends TestCase {
* Add content to region r on the passed column
* column.
* Adds data of the from 'aaa', 'aab', etc where key and value are the same.
-   * @param updater  An instance of {@link Incommon}.
-   * @param columnFamily
-   * @param writeToWAL
* @throws IOException
* @return count of what we added.
*/
-  public static long addContent(final Incommon updater,
+  public static long addContent(final Table updater,
   final String columnFamily) throws IOException {
 return addContent(updater, columnFamily, START_KEY_BYTES, null);
   }
 
-  public static long addContent(final Incommon updater, final String family,
+  public static long addContent(final Table updater, final String family,
   final String column) throws IOException {
 return addContent(updater, family, column, START_KEY_BYTES, null);
   }
@@ -271,21 +262,16 @@ public abstract class HBaseTestCase extends TestCase {
* Add content to region r on the passed column
* column.
* Adds data of the from 'aaa', 'aab', etc where key and value are the same.
-   * @param updater  An instance of {@link 

[13/14] hbase git commit: HBASE-13867: Add endpoint coprocessor guide to HBase book.

2015-10-26 Thread syuanjiang
HBASE-13867: Add endpoint coprocessor guide to HBase book.


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

Branch: refs/heads/hbase-12439
Commit: 8a2cef3315516501627c7a30bdcf989b12a32303
Parents: 46c646d
Author: g-bhardwaj 
Authored: Sun Oct 25 17:29:35 2015 +0530
Committer: Misty Stanley-Jones 
Committed: Mon Oct 26 09:06:06 2015 +1000

--
 src/main/asciidoc/_chapters/cp.adoc | 901 ++-
 1 file changed, 755 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8a2cef33/src/main/asciidoc/_chapters/cp.adoc
--
diff --git a/src/main/asciidoc/_chapters/cp.adoc 
b/src/main/asciidoc/_chapters/cp.adoc
index a99e903..06930d1 100644
--- a/src/main/asciidoc/_chapters/cp.adoc
+++ b/src/main/asciidoc/_chapters/cp.adoc
@@ -27,203 +27,812 @@
 :icons: font
 :experimental:
 
-HBase coprocessors are modeled after the coprocessors which are part of 
Google's BigTable (http://www.scribd.com/doc/21631448/Dean-Keynote-Ladis2009, 
pages 66-67.). Coprocessors function in a similar way to Linux kernel modules.
-They provide a way to run server-level code against locally-stored data.
-The functionality they provide is very powerful, but also carries great risk 
and can have adverse effects on the system, at the level of the operating 
system.
-The information in this chapter is primarily sourced and heavily reused from 
Mingjie Lai's blog post at 
https://blogs.apache.org/hbase/entry/coprocessor_introduction.
+HBase Coprocessors are modeled after the Coprocessors which are part of 
Google's BigTable
+(http://research.google.com/people/jeff/SOCC2010-keynote-slides.pdf pages 
41-42.). +
+Coprocessor is a framework that provides an easy way to run your custom code 
directly on
+Region Server.
+The information in this chapter is primarily sourced and heavily reused from:
+
+. Mingjie Lai's blog post
+link:https://blogs.apache.org/hbase/entry/coprocessor_introduction[Coprocessor 
Introduction].
+. Gaurav Bhardwaj's blog post
+link:http://www.3pillarglobal.com/insights/hbase-coprocessors[The How To Of 
HBase Coprocessors].
+
 
-Coprocessors are not designed to be used by end users of HBase, but by HBase 
developers who need to add specialized functionality to HBase.
-One example of the use of coprocessors is pluggable compaction and scan 
policies, which are provided as coprocessors in 
link:https://issues.apache.org/jira/browse/HBASE-6427[HBASE-6427].
 
 == Coprocessor Framework
 
-The implementation of HBase coprocessors diverges from the BigTable 
implementation.
-The HBase framework provides a library and runtime environment for executing 
user code within the HBase region server and master processes.
+When working with any data store (like RDBMS or HBase) you fetch the data (in 
case of RDBMS you
+might use SQL query and in case of HBase you use either Get or Scan). To fetch 
only relevant data
+you filter it (for RDBMS you put conditions in 'WHERE' predicate and in HBase 
you use
+link:http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/Filter.html[Filter]).
+After fetching the desired data, you perform your business computation on the 
data.
+This scenario is close to ideal for "small data", where few thousand rows and 
a bunch of columns
+are returned from the data store. Now imagine a scenario where there are 
billions of rows and
+millions of columns and you want to perform some computation which requires 
all the data, like
+calculating average or sum. Even if you are interested in just few columns, 
you still have to
+fetch all the rows. There are a few drawbacks in this approach as described 
below:
+
+. In this approach the data transfer (from data store to client side) will 
become the bottleneck,
+and the time required to complete the operation is limited by the rate at 
which data transfer
+takes place.
+. It's not always possible to hold so much data in memory and perform 
computation.
+. Bandwidth is one of the most precious resources in any data center. 
Operations like this may
+saturate your data center’s bandwidth and will severely impact the 
performance of your cluster.
+. Your client code is becoming thick as you are maintaining the code for 
calculating average or
+summation on client side. Not a major drawback when talking of severe issues 
like
+performance/bandwidth but still worth giving consideration.
+
+In a scenario like this it's better to move the computation (i.e. user's 
custom code) to the data
+itself (Region Server). Coprocessor helps you achieve this but 

[03/14] hbase git commit: Revert "HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests (Heng Chen)"

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

This reverts commit ef7f8467af52cd1d6563ad5b1f6624be6872a165.


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

Branch: refs/heads/hbase-12439
Commit: f9efeaad1d5396e7cfca461ddeaa5931dc473f5f
Parents: 418c442
Author: stack 
Authored: Sat Oct 24 10:00:27 2015 -0700
Committer: stack 
Committed: Sat Oct 24 10:00:27 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, 63 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f9efeaad/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 1975c59..8498341 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,7 +34,6 @@ 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;
@@ -81,7 +80,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 };
@@ -89,10 +88,12 @@ 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();
   }
 
@@ -343,8 +344,7 @@ public class TestTableInputFormat {
   }
 
   void testInputFormat(Class clazz) throws IOException {
-Configuration conf = UTIL.getConfiguration();
-final JobConf job = new JobConf(conf);
+final JobConf job = MapreduceTestingShim.getJobConf(mrCluster);
 job.setInputFormat(clazz);
 job.setOutputFormat(NullOutputFormat.class);
 job.setMapperClass(ExampleVerifier.class);

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

[08/14] 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; ADDENDUM added Test

2015-10-26 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; 
ADDENDUM added TestSnapshotCloneIndependence to removed set of dodgy tests


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

Branch: refs/heads/hbase-12439
Commit: df36aef23c5a4593a3160eb3937c54baf27991d1
Parents: 80a6fd0
Author: stack 
Authored: Sat Oct 24 14:26:39 2015 -0700
Committer: stack 
Committed: Sat Oct 24 14:26:39 2015 -0700

--
 .../client/TestSnapshotCloneIndependence.java   | 481 ---
 1 file changed, 481 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/df36aef2/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
deleted file mode 100644
index 5f20790..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
+++ /dev/null
@@ -1,481 +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.client;
-
-import java.io.IOException;
-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.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.TableName;
-import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
-import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy;
-import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;
-import org.apache.hadoop.hbase.testclassification.ClientTests;
-import org.apache.hadoop.hbase.testclassification.LargeTests;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.After;
-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.Ignore;
-import org.junit.experimental.categories.Category;
-
-/**
- * Test to verify that the cloned table is independent of the table from which 
it was cloned
- */
-@Category({LargeTests.class, ClientTests.class})
-public class TestSnapshotCloneIndependence {
-  private static final Log LOG = 
LogFactory.getLog(TestSnapshotCloneIndependence.class);
-
-  protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
-
-  protected static final int NUM_RS = 2;
-  private static final String STRING_TABLE_NAME = "test";
-  private static final String TEST_FAM_STR = "fam";
-  protected static final byte[] TEST_FAM = Bytes.toBytes(TEST_FAM_STR);
-  protected static final TableName TABLE_NAME = 
TableName.valueOf(STRING_TABLE_NAME);
-  private static final int CLEANER_INTERVAL = 100;
-
-  /**
-   * Setup the config for the cluster and start it
-   * @throws Exception on fOailure
-   */
-  @BeforeClass
-  public static void setupCluster() throws Exception {
-setupConf(UTIL.getConfiguration());
-UTIL.startMiniCluster(NUM_RS);
-  }
- 
-  static void setupConf(Configuration conf) {
-// Up the handlers; this test needs more than usual.
-conf.setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, 15);
-// enable snapshot support
-conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
-// disable the ui
-

[11/14] hbase git commit: HBASE-14624 BucketCache.freeBlock is too expensive

2015-10-26 Thread syuanjiang
HBASE-14624 BucketCache.freeBlock is too expensive


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

Branch: refs/heads/hbase-12439
Commit: 95978477f8565defb3c4792f901e833abf63f768
Parents: f8528f6
Author: tedyu 
Authored: Sat Oct 24 18:45:21 2015 -0700
Committer: tedyu 
Committed: Sat Oct 24 18:45:21 2015 -0700

--
 .../hbase/io/hfile/bucket/BucketAllocator.java  | 36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/95978477/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
index faa8724..1e8cb7d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
@@ -21,11 +21,10 @@
 package org.apache.hadoop.hbase.io.hfile.bucket;
 
 import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.commons.collections.map.LinkedMap;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -173,22 +172,22 @@ public final class BucketAllocator {
   final class BucketSizeInfo {
 // Free bucket means it has space to allocate a block;
 // Completely free bucket means it has no block.
-private List bucketList, freeBuckets, completelyFreeBuckets;
+private LinkedMap bucketList, freeBuckets, completelyFreeBuckets;
 private int sizeIndex;
 
 BucketSizeInfo(int sizeIndex) {
-  bucketList = new LinkedList();
-  freeBuckets = new LinkedList();
-  completelyFreeBuckets = new LinkedList();
+  bucketList = new LinkedMap();
+  freeBuckets = new LinkedMap();
+  completelyFreeBuckets = new LinkedMap();
   this.sizeIndex = sizeIndex;
 }
 
 public synchronized void instantiateBucket(Bucket b) {
   assert b.isUninstantiated() || b.isCompletelyFree();
   b.reconfigure(sizeIndex, bucketSizes, bucketCapacity);
-  bucketList.add(b);
-  freeBuckets.add(b);
-  completelyFreeBuckets.add(b);
+  bucketList.put(b, b);
+  freeBuckets.put(b, b);
+  completelyFreeBuckets.put(b, b);
 }
 
 public int sizeIndex() {
@@ -201,8 +200,10 @@ public final class BucketAllocator {
  */
 public long allocateBlock() {
   Bucket b = null;
-  if (freeBuckets.size() > 0) // Use up an existing one first...
-b = freeBuckets.get(freeBuckets.size() - 1);
+  if (freeBuckets.size() > 0) {
+// Use up an existing one first...
+b = (Bucket) freeBuckets.lastKey();
+  }
   if (b == null) {
 b = grabGlobalCompletelyFreeBucket();
 if (b != null) instantiateBucket(b);
@@ -227,7 +228,7 @@ public final class BucketAllocator {
   }
 
   if (completelyFreeBuckets.size() > 0) {
-b = completelyFreeBuckets.get(0);
+b = (Bucket) completelyFreeBuckets.firstKey();
 removeBucket(b);
   }
   return b;
@@ -241,17 +242,18 @@ public final class BucketAllocator {
 }
 
 public void freeBlock(Bucket b, long offset) {
-  assert bucketList.contains(b);
+  assert bucketList.containsKey(b);
   // else we shouldn't have anything to free...
-  assert (!completelyFreeBuckets.contains(b));
+  assert (!completelyFreeBuckets.containsKey(b));
   b.free(offset);
-  if (!freeBuckets.contains(b)) freeBuckets.add(b);
-  if (b.isCompletelyFree()) completelyFreeBuckets.add(b);
+  if (!freeBuckets.containsKey(b)) freeBuckets.put(b, b);
+  if (b.isCompletelyFree()) completelyFreeBuckets.put(b, b);
 }
 
 public synchronized IndexStatistics statistics() {
   long free = 0, used = 0;
-  for (Bucket b : bucketList) {
+  for (Object obj : bucketList.keySet()) {
+Bucket b = (Bucket) obj;
 free += b.freeCount();
 used += b.usedCount();
   }



[02/14] hbase git commit: HBASE-14670 Remove deprecated HBaseTestCase from TestBlocksRead

2015-10-26 Thread syuanjiang
HBASE-14670 Remove deprecated HBaseTestCase from TestBlocksRead


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

Branch: refs/heads/hbase-12439
Commit: 418c4422f7fc99ce58bd10c20090f34211da3b13
Parents: 6875e6d
Author: Jonathan M Hsieh 
Authored: Sat Oct 24 05:35:00 2015 -0700
Committer: Jonathan M Hsieh 
Committed: Sat Oct 24 05:35:00 2015 -0700

--
 .../hbase/regionserver/TestBlocksRead.java  | 58 
 1 file changed, 22 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/418c4422/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java
index c4b26b9..900d4ff 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java
@@ -26,11 +26,10 @@ 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.Path;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -48,44 +47,35 @@ import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
-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 junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 @Category({RegionServerTests.class, MediumTests.class})
-public class TestBlocksRead extends HBaseTestCase {
+public class TestBlocksRead  {
   private static final Log LOG = LogFactory.getLog(TestBlocksRead.class);
+  @Rule public TestName testName = new TestName();
+
   static final BloomType[] BLOOM_TYPE = new BloomType[] { BloomType.ROWCOL,
   BloomType.ROW, BloomType.NONE };
 
   private static BlockCache blockCache;
-
-  private HBaseConfiguration getConf() {
-HBaseConfiguration conf = new HBaseConfiguration();
-
-// disable compactions in this test.
-conf.setInt("hbase.hstore.compactionThreshold", 1);
-return conf;
-  }
-
   Region region = null;
-  private HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
+  private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
   private final String DIR = 
TEST_UTIL.getDataTestDir("TestBlocksRead").toString();
+  private Configuration conf = TEST_UTIL.getConfiguration();
 
-  /**
-   * @see org.apache.hadoop.hbase.HBaseTestCase#setUp()
-   */
-  @SuppressWarnings("deprecation")
-  @Before
-  protected void setUp() throws Exception {
-super.setUp();
+  @BeforeClass
+  public static void setUp() throws Exception {
+// disable compactions in this test.
+TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 
1);
   }
 
-  @SuppressWarnings("deprecation")
-  @After
-  protected void tearDown() throws Exception {
-super.tearDown();
+  @AfterClass
+  public static void tearDown() throws Exception {
 EnvironmentEdgeManagerTestHelper.reset();
   }
 
@@ -99,7 +89,7 @@ public class TestBlocksRead extends HBaseTestCase {
* @return created and initialized region.
*/
   private Region initHRegion(byte[] tableName, String callingMethod,
-  HBaseConfiguration conf, String family) throws IOException {
+  Configuration conf, String family) throws IOException {
 HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(tableName));
 HColumnDescriptor familyDesc;
 for (int i = 0; i < BLOOM_TYPE.length; i++) {
@@ -223,8 +213,7 @@ public class TestBlocksRead extends HBaseTestCase {
 byte[] TABLE = Bytes.toBytes("testBlocksRead");
 String FAMILY = "cf1";
 Cell kvs[];
-HBaseConfiguration conf = getConf();
-this.region = initHRegion(TABLE, getName(), conf, FAMILY);
+this.region = initHRegion(TABLE, testName.getMethodName(), conf, FAMILY);
 
   

[06/14] hbase git commit: HBASE-14690 Fix css so there's no left/right scroll bar

2015-10-26 Thread syuanjiang
HBASE-14690 Fix css so there's no left/right scroll bar


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

Branch: refs/heads/hbase-12439
Commit: 9925e9a182b4d6802d3587b65de9d3c6f98cd963
Parents: 604ff56
Author: Elliott Clark 
Authored: Sat Oct 24 10:14:18 2015 -0700
Committer: Elliott Clark 
Committed: Sat Oct 24 10:27:12 2015 -0700

--
 .../src/main/resources/hbase-webapps/static/css/hbase.css | 1 +
 .../src/main/resources/hbase-webapps/static/css/hbase.css | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9925e9a1/hbase-server/src/main/resources/hbase-webapps/static/css/hbase.css
--
diff --git a/hbase-server/src/main/resources/hbase-webapps/static/css/hbase.css 
b/hbase-server/src/main/resources/hbase-webapps/static/css/hbase.css
index f3bd9e9..03d8ff4 100644
--- a/hbase-server/src/main/resources/hbase-webapps/static/css/hbase.css
+++ b/hbase-server/src/main/resources/hbase-webapps/static/css/hbase.css
@@ -20,6 +20,7 @@
 body { padding-top: 50px; }
 html .content {
   margin-left: 2.0em;
+  margin-right: 2.0em;
 }
 .navbar-brand img {
   margin-top: -7px;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9925e9a1/hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css
--
diff --git a/hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css 
b/hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css
index 4b36c80..03d8ff4 100644
--- a/hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css
+++ b/hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css
@@ -19,7 +19,8 @@
 /* General styling */
 body { padding-top: 50px; }
 html .content {
-  margin-left: 1.0em;
+  margin-left: 2.0em;
+  margin-right: 2.0em;
 }
 .navbar-brand img {
   margin-top: -7px;



[14/14] hbase git commit: HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests; REAPPLY

2015-10-26 Thread syuanjiang
HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests; REAPPLY


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

Branch: refs/heads/hbase-12439
Commit: 899857609c7c2c2b0fd3fa72d3bd585cb2703e0a
Parents: 8a2cef3
Author: stack 
Authored: Mon Oct 26 08:40:19 2015 -0700
Committer: stack 
Committed: Mon Oct 26 08:40:32 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 --
 23 files changed, 4 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/89985760/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/89985760/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java
index 628bb96..daa6e71 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java
+++ 

[04/14] hbase git commit: HBASE-14683 Fix Batching in buffered mutator is awful when adding lists of mutations.

2015-10-26 Thread syuanjiang
HBASE-14683 Fix Batching in buffered mutator is awful when adding lists of 
mutations.

Summary: Send the list of mutations to AsyncProcess only after done adding the 
list otherwise there's a lot of contention

Test Plan: UnitTests.

Differential Revision: https://reviews.facebook.net/D49251


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

Branch: refs/heads/hbase-12439
Commit: caae3b2e5fe889d57dc69964e76faffdc16ff7ae
Parents: f9efeaa
Author: Elliott Clark 
Authored: Thu Oct 22 20:24:48 2015 -0700
Committer: Elliott Clark 
Committed: Sat Oct 24 10:05:39 2015 -0700

--
 .../hbase/client/BufferedMutatorImpl.java   | 46 
 .../master/cleaner/TestSnapshotFromMaster.java  | 15 ---
 2 files changed, 25 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/caae3b2e/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
index 0b222b1..5341d47 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
@@ -27,6 +27,7 @@ import com.google.common.annotations.VisibleForTesting;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
@@ -98,48 +99,35 @@ public class BufferedMutatorImpl implements BufferedMutator 
{
   @Override
   public synchronized void mutate(Mutation m) throws InterruptedIOException,
   RetriesExhaustedWithDetailsException {
-doMutate(m);
+mutate(Arrays.asList(m));
   }
 
   @Override
   public synchronized void mutate(List ms) throws 
InterruptedIOException,
   RetriesExhaustedWithDetailsException {
-for (Mutation m : ms) {
-  doMutate(m);
-}
-  }
-
-  /**
-   * Add the put to the buffer. If the buffer is already too large, sends the 
buffer to the
-   * cluster.
-   *
-   * @throws RetriesExhaustedWithDetailsException if there is an error on the 
cluster.
-   * @throws InterruptedIOException if we were interrupted.
-   */
-  private void doMutate(Mutation m) throws InterruptedIOException,
-  RetriesExhaustedWithDetailsException {
 if (closed) {
   throw new IllegalStateException("Cannot put when the BufferedMutator is 
closed.");
 }
-if (!(m instanceof Put) && !(m instanceof Delete)) {
-  throw new IllegalArgumentException("Pass a Delete or a Put");
-}
 
-// This behavior is highly non-intuitive... it does not protect us against
-// 94-incompatible behavior, which is a timing issue because hasError, the 
below code
-// and setter of hasError are not synchronized. Perhaps it should be 
removed.
-if (ap.hasError()) {
-  writeAsyncBuffer.add(m);
-  backgroundFlushCommits(true);
+for (Mutation m : ms) {
+  if (m instanceof Put) {
+validatePut((Put) m);
+  }
+currentWriteBufferSize += m.heapSize();
 }
 
-if (m instanceof Put) {
-  validatePut((Put) m);
-}
+  // This behavior is highly non-intuitive... it does not protect us 
against
+  // 94-incompatible behavior, which is a timing issue because hasError, 
the below code
+  // and setter of hasError are not synchronized. Perhaps it should be 
removed.
+  if (ap.hasError()) {
+writeAsyncBuffer.addAll(ms);
+backgroundFlushCommits(true);
+  } else {
+writeAsyncBuffer.addAll(ms);
+  }
 
-currentWriteBufferSize += m.heapSize();
-writeAsyncBuffer.add(m);
 
+// Now try and queue what needs to be queued.
 while (currentWriteBufferSize > writeBufferSize) {
   backgroundFlushCommits(false);
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/caae3b2e/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
index e00134a..687b6ae 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
+++ 

[09/14] hbase git commit: HBASE-14266 RegionServers have a lock contention of Configuration.getProps

2015-10-26 Thread syuanjiang
HBASE-14266 RegionServers have a lock contention of Configuration.getProps


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

Branch: refs/heads/hbase-12439
Commit: 996866d3ae66b28aa6d25b69db7646f9847e9b21
Parents: df36aef
Author: stack 
Authored: Sat Oct 24 14:43:53 2015 -0700
Committer: stack 
Committed: Sat Oct 24 14:43:53 2015 -0700

--
 .../apache/hadoop/hbase/HBaseConfiguration.java |   3 +-
 .../example/ZooKeeperScanPolicyObserver.java|   2 +-
 .../compactions/PartitionedMobCompactor.java|   2 +-
 .../hadoop/hbase/regionserver/HStore.java   |   2 +-
 .../hadoop/hbase/regionserver/ScanInfo.java |  67 +-
 .../hadoop/hbase/regionserver/StoreScanner.java | 226 +--
 .../TestPartitionedMobCompactor.java|   2 +-
 .../regionserver/NoOpScanPolicyObserver.java|   4 +-
 .../hbase/regionserver/TestCompaction.java  |   2 +-
 .../TestDefaultCompactSelection.java|   2 +-
 .../hbase/regionserver/TestDefaultMemStore.java |   8 +-
 .../hbase/regionserver/TestMajorCompaction.java |   2 +-
 .../regionserver/TestMobStoreCompaction.java|   3 +-
 .../hbase/regionserver/TestQueryMatcher.java|  16 +-
 .../regionserver/TestReversibleScanners.java|   2 +-
 .../hbase/regionserver/TestStoreScanner.java|  11 +-
 .../hbase/regionserver/TestStripeCompactor.java |   2 +-
 .../hbase/util/TestCoprocessorScanPolicy.java   |  12 +-
 18 files changed, 201 insertions(+), 167 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/996866d3/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
index 1be66a1..5a6a168 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
@@ -36,11 +36,10 @@ import org.apache.hadoop.hbase.util.VersionInfo;
 @InterfaceAudience.Public
 @InterfaceStability.Stable
 public class HBaseConfiguration extends Configuration {
-
   private static final Log LOG = LogFactory.getLog(HBaseConfiguration.class);
 
   /**
-   * Instantinating HBaseConfiguration() is deprecated. Please use
+   * Instantiating HBaseConfiguration() is deprecated. Please use
* HBaseConfiguration#create() to construct a plain Configuration
* @deprecated Please use create() instead.
*/

http://git-wip-us.apache.org/repos/asf/hbase/blob/996866d3/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
--
diff --git 
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
 
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
index a65b27d..420799f 100644
--- 
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
+++ 
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
@@ -188,7 +188,7 @@ public class ZooKeeperScanPolicyObserver extends 
BaseRegionObserver {
 }
 long ttl = Math.max(EnvironmentEdgeManager.currentTime() -
 Bytes.toLong(data), oldSI.getTtl());
-return new ScanInfo(store.getFamily(), ttl,
+return new ScanInfo(oldSI.getConfiguration(), store.getFamily(), ttl,
 oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/996866d3/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
index e0ae481..dabedfd 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
@@ -551,7 +551,7 @@ public class PartitionedMobCompactor extends MobCompactor {
 Scan scan = new Scan();
 scan.setMaxVersions(column.getMaxVersions());
 long ttl = HStore.determineTTLFromFamily(column);
-ScanInfo scanInfo = new 

[10/14] 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; ADDENDUM added Test

2015-10-26 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; ADDENDUM added TestMobSnapshotCloneIndependence to removed set of dodgy 
tests


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

Branch: refs/heads/hbase-12439
Commit: f8528f66ec253fbb3c08d2c3352dd73d9832a43b
Parents: 996866d
Author: stack 
Authored: Sat Oct 24 17:42:16 2015 -0700
Committer: stack 
Committed: Sat Oct 24 17:42:16 2015 -0700

--
 .../TestMobSnapshotCloneIndependence.java   | 69 
 1 file changed, 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f8528f66/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobSnapshotCloneIndependence.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobSnapshotCloneIndependence.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobSnapshotCloneIndependence.java
deleted file mode 100644
index dcf20e5..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobSnapshotCloneIndependence.java
+++ /dev/null
@@ -1,69 +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.client;
-
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.mob.MobConstants;
-import org.apache.hadoop.hbase.snapshot.MobSnapshotTestingUtils;
-import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;
-import org.apache.hadoop.hbase.testclassification.LargeTests;
-import org.junit.BeforeClass;
-import org.junit.experimental.categories.Category;
-
-/**
- * Test to verify that the cloned table is independent of the table from which 
it was cloned
- */
-@Category(LargeTests.class)
-public class TestMobSnapshotCloneIndependence extends 
TestSnapshotCloneIndependence {
-  private static final Log LOG = 
LogFactory.getLog(TestMobSnapshotCloneIndependence.class);
-
-  /**
-   * Setup the config for the cluster and start it
-   * @throws Exception on failure
-   */
-  @BeforeClass
-  public static void setupCluster() throws Exception {
-setupConf(UTIL.getConfiguration());
-UTIL.startMiniCluster(NUM_RS);
-  }
-
-  protected static void setupConf(Configuration conf) {
-TestSnapshotCloneIndependence.setupConf(conf);
-conf.setInt(MobConstants.MOB_FILE_CACHE_SIZE_KEY, 0);
-  }
-
-  @Override
-  protected Table createTable(final TableName table, byte[] family) throws 
Exception {
-return MobSnapshotTestingUtils.createMobTable(UTIL, table, family);
-  }
-
-  @Override
-  public void loadData(final Table table, byte[]... families) throws Exception 
{
-SnapshotTestingUtils.loadData(UTIL, table.getName(), 1000, families);
-  }
-
-  @Override
-  protected int countRows(final Table table, final byte[]... families) throws 
Exception {
-return MobSnapshotTestingUtils.countMobRows(table, families);
-  }
-}
\ No newline at end of file



[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);
   }



[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);
+  

[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());



[16/22] hbase git commit: HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM -- remove zombie detection from test-patch.sh and rely on script instead

2015-11-10 Thread syuanjiang
HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM -- remove 
zombie detection from test-patch.sh and rely on script instead


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

Branch: refs/heads/hbase-12439
Commit: 0af651bde5dfd53303e1ffe78deccaf7b665c138
Parents: 4c2e0d9
Author: stack 
Authored: Mon Nov 9 07:12:27 2015 -1000
Committer: stack 
Committed: Mon Nov 9 07:12:27 2015 -1000

--
 dev-support/test-patch.sh  | 31 +--
 dev-support/zombie-detector.sh |  5 -
 2 files changed, 5 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0af651bd/dev-support/test-patch.sh
--
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 4ad37ab..c6ea897 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -833,12 +833,6 @@ checkLineLengths () {
   return 0
 }
 
-zombieCount() {
-  # HBase tests have been flagged with an innocuous '-Dhbase.test' just so 
they can
-  # be identified as hbase in a process listing.
-  echo `jps -v | grep surefirebooter | grep -e '-Dhbase.test' | wc -l`
-}
-
 ###
 ### Run the tests
 runTests () {
@@ -875,31 +869,8 @@ runTests () {
   # NOTE The below code has been copied and pasted up into jenkins as an 
post-build task.
   # Make sure to update it too if you change the below (Or extract below into 
script to checkout
   # to run post-build)
+  export JIRA_COMMENT
   $BASEDIR/dev-support/zombie-detector.sh ${BUILD_ID}
-  ZOMBIE_TESTS_COUNT=`zombieCount`
-  if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
-# It seems sometimes the tests are not dying immediately. Let's give them 
30s
-echo "Suspicious java process found - waiting 30s to see if there are just 
slow to stop"
-sleep 30
-ZOMBIE_TESTS_COUNT=`zombieCount`
-if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
-  echo "There appear to be $ZOMBIE_TESTS_COUNT zombie tests, they should 
have been killed by surefire but survived"
-  jps -v | grep surefirebooter | grep -e '-Dhbase.test'
-  echo " BEGIN zombies jstack extract"
-  # HBase tests have been flagged with an innocuous '-Dhbase.test' just so 
they can be identified as hbase in a process listing.
-  ZB_STACK=`jps -v | grep surefirebooter | grep -e '-Dhbase.test' | cut -d 
' ' -f 1 | xargs -n 1 jstack | grep ".test" | grep "\.java"`
-  echo " END  zombies jstack extract"
-  JIRA_COMMENT="$JIRA_COMMENT
-
-  {color:red}-1 core zombie tests{color}.  There are possible 
${ZOMBIE_TESTS_COUNT} zombie test(s): ${ZB_STACK}"
-  BAD=1
-else
-  echo "We're ok: there is no zombie test, but some tests took some time 
to stop"
-fi
-  else
-echo "We're ok: there is no zombie test"
-  fi
-  return $BAD
 }
 
 ###

http://git-wip-us.apache.org/repos/asf/hbase/blob/0af651bd/dev-support/zombie-detector.sh
--
diff --git a/dev-support/zombie-detector.sh b/dev-support/zombie-detector.sh
index 59a73f1..a7856eb 100755
--- a/dev-support/zombie-detector.sh
+++ b/dev-support/zombie-detector.sh
@@ -103,7 +103,8 @@ zombies () {
   ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"|wc -l|xargs`
   if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
 wait=30
-echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es); 
waiting ${wait}s to see if just slow to stop"
+echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es) 
listed below; waiting ${wait}s to see if just slow to stop"
+echo ${ZOMBIES}
 sleep ${wait}
 PIDS=`echo "${ZOMBIES}"|${AWK} '{print $1}'`
 ZOMBIE_TESTS_COUNT=0
@@ -130,6 +131,8 @@ zombies () {
   exit 1
 else
   echo "`date` We're ok: there is no zombie test"
+  JIRA_COMMENT="$JIRA_COMMENT
+{color:green}+1 core zombie tests -- no zombies!{color}."
 fi
   fi
 }



[07/22] hbase git commit: HBASE-14767 - Remove deprecated functions from HBaseAdmin Deprecated in HBASE-12083 (1.0.0, 2.0.0, 0.99.2) - HBaseAdmin(Configuration)

2015-11-10 Thread syuanjiang
http://git-wip-us.apache.org/repos/asf/hbase/blob/08963189/src/main/asciidoc/_chapters/external_apis.adoc
--
diff --git a/src/main/asciidoc/_chapters/external_apis.adoc 
b/src/main/asciidoc/_chapters/external_apis.adoc
index 188b10b..44603f0 100644
--- a/src/main/asciidoc/_chapters/external_apis.adoc
+++ b/src/main/asciidoc/_chapters/external_apis.adoc
@@ -675,12 +675,13 @@ This example lists HBase tables, creates a new table, and 
adds a row to it.
 [source, scala]
 
 import org.apache.hadoop.hbase.HBaseConfiguration
-import org.apache.hadoop.hbase.client.{HBaseAdmin,HTable,Put,Get}
+import 
org.apache.hadoop.hbase.client.{Connection,ConnectionFactory,HBaseAdmin,HTable,Put,Get}
 import org.apache.hadoop.hbase.util.Bytes
 
 
 val conf = new HBaseConfiguration()
-val admin = new HBaseAdmin(conf)
+val connection = ConnectionFactory.createConnection(conf);
+val admin = connection.getAdmin();
 
 // list the tables
 val listtables=admin.listTables()



[11/22] hbase git commit: HBASE-14781 Turn per cf flushing on for ITBLL by default

2015-11-10 Thread syuanjiang
HBASE-14781 Turn per cf flushing on for ITBLL by default


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

Branch: refs/heads/hbase-12439
Commit: 114423776562c3c22d58749e42e3ebbf8110a924
Parents: 0edd51d
Author: Elliott Clark 
Authored: Fri Nov 6 12:11:47 2015 -0800
Committer: Elliott Clark 
Committed: Sat Nov 7 11:50:13 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/11442377/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
index 69ad028..c864580 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
@@ -403,8 +403,7 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 if (this.numNodes < this.wrap) {
   this.wrap = this.numNodes;
 }
-this.multipleUnevenColumnFamilies =
-
context.getConfiguration().getBoolean(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY, 
false);
+this.multipleUnevenColumnFamilies = 
isMultiUnevenColumnFamilies(context.getConfiguration());
   }
 
   protected void instantiateHTable() throws IOException {
@@ -610,11 +609,6 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
   job.setOutputFormatClass(NullOutputFormat.class);
 
   job.getConfiguration().setBoolean("mapreduce.map.speculative", false);
-  String multipleUnevenColumnFamiliesStr = 
System.getProperty(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY);
-  if (multipleUnevenColumnFamiliesStr != null) {
-job.getConfiguration().setBoolean(MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,
-  Boolean.parseBoolean(multipleUnevenColumnFamiliesStr));
-  }
   TableMapReduceUtil.addDependencyJars(job);
   TableMapReduceUtil.addDependencyJars(job.getConfiguration(), 
AbstractHBaseTool.class);
   TableMapReduceUtil.initCredentials(job);
@@ -829,9 +823,7 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
   protected void setup(
   Mapper.Context context)
   throws IOException, InterruptedException {
-this.multipleUnevenColumnFamilies =
-
context.getConfiguration().getBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,
-  false);
+this.multipleUnevenColumnFamilies = 
isMultiUnevenColumnFamilies(context.getConfiguration());
   }
 
   @Override
@@ -1100,10 +1092,9 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
   scan.addColumn(FAMILY_NAME, COLUMN_PREV);
   scan.setCaching(1);
   scan.setCacheBlocks(false);
-  if (isMultiUnevenColumnFamilies()) {
+  if (isMultiUnevenColumnFamilies(getConf())) {
 scan.addColumn(BIG_FAMILY_NAME, BIG_FAMILY_NAME);
 scan.addColumn(TINY_FAMILY_NAME, TINY_FAMILY_NAME);
-
job.getConfiguration().setBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY, 
true);
   }
 
   TableMapReduceUtil.initTableMapperJob(getTableName(getConf()).getName(), 
scan,
@@ -1585,16 +1576,15 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 }
   }
 
-  private static boolean isMultiUnevenColumnFamilies() {
-return Boolean.TRUE.toString().equalsIgnoreCase(
-  System.getProperty(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY));
+  private static boolean isMultiUnevenColumnFamilies(Configuration conf) {
+return conf.getBoolean(Generator.MULTIPLE_UNEVEN_COLUMNFAMILIES_KEY,true);
   }
 
   @Test
   public void testContinuousIngest() throws IOException, Exception {
 //Loop 

 Configuration conf = getTestingUtil(getConf()).getConfiguration();
-if (isMultiUnevenColumnFamilies()) {
+if (isMultiUnevenColumnFamilies(getConf())) {
   // make sure per CF flush is on
   conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, 
FlushLargeStoresPolicy.class.getName());
 }
@@ -1692,7 +1682,7 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 
   @Override
   protected Set getColumnFamilies() {
-if (isMultiUnevenColumnFamilies()) {
+if 

[08/22] hbase git commit: HBASE-14767 - Remove deprecated functions from HBaseAdmin Deprecated in HBASE-12083 (1.0.0, 2.0.0, 0.99.2) - HBaseAdmin(Configuration)

2015-11-10 Thread syuanjiang
HBASE-14767 - Remove deprecated functions from HBaseAdmin Deprecated in 
HBASE-12083 (1.0.0, 2.0.0, 0.99.2) - HBaseAdmin(Configuration)

  Deprecated in HBASE-10479 (0.99.0, hbase-10070)
  - HBaseAdmin(Connection)

  Deprecated in HBASE-11826 (0.99.0, 1.0.0, 2.0.0)
  - flush()
  - compact()
  - majorCompact()
  - split()
  - getCompactionState()

- Changes many declarations from HBaseAdmin to Admin
(Apekshit)

Signed-off-by: stack 


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

Branch: refs/heads/hbase-12439
Commit: 08963189a298504e4e4ae70a1a139112a2eba59e
Parents: 9cce912
Author: Apekshit(Appy) Sharma 
Authored: Wed Nov 4 21:32:18 2015 -0800
Committer: stack 
Committed: Fri Nov 6 16:23:55 2015 -1000

--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  | 233 ---
 .../hadoop/hbase/mob/ExpiredMobFileCleaner.java |  11 +-
 .../hadoop/hbase/mob/mapreduce/Sweeper.java |  11 +-
 .../hadoop/hbase/HBaseTestingUtility.java   |  22 +-
 .../apache/hadoop/hbase/TestAcidGuarantees.java |   4 +-
 .../org/apache/hadoop/hbase/TestIOFencing.java  |   4 +-
 .../apache/hadoop/hbase/client/TestAdmin1.java  |   2 +-
 .../apache/hadoop/hbase/client/TestAdmin2.java  |  10 +-
 .../hadoop/hbase/client/TestFromClientSide.java |  35 ++-
 .../hbase/client/TestFromClientSide3.java   |  31 ++-
 .../hadoop/hbase/filter/TestFilterWrapper.java  |   4 +-
 .../hbase/io/encoding/TestChangingEncoding.java |   2 +-
 .../encoding/TestLoadAndSwitchEncodeOnDisk.java |   4 +-
 .../master/TestAssignmentManagerOnCluster.java  |   3 +-
 .../hbase/master/TestMasterStatusServlet.java   |  12 +-
 .../master/handler/TestEnableTableHandler.java  |  22 +-
 .../hbase/mob/TestMobDataBlockEncoding.java |   8 +-
 .../hbase/namespace/TestNamespaceAuditor.java   |   4 +-
 .../hbase/regionserver/TestCompactionState.java |  14 +-
 .../hbase/regionserver/TestMobStoreScanner.java |   4 +-
 .../regionserver/TestRegionServerMetrics.java   |   4 +-
 .../regionserver/TestRemoveRegionMetrics.java   |   4 +-
 .../regionserver/TestScannerWithBulkload.java   |   9 +-
 .../TestSplitTransactionOnCluster.java  |  29 ++-
 .../regionserver/TestSplitWalDataLoss.java  |   4 +-
 .../TestCompactionWithThroughputController.java |   4 +-
 .../replication/TestReplicationSmallTests.java  |   9 +-
 ...sibilityLabelReplicationWithExpAsString.java |   6 +-
 .../TestVisibilityLabelsReplication.java|   6 +-
 .../hadoop/hbase/util/BaseTestHBaseFsck.java|   6 +-
 .../hadoop/hbase/util/TestHBaseFsckTwoRS.java   |   2 +-
 .../util/hbck/OfflineMetaRebuildTestCore.java   |  16 --
 hbase-shell/src/main/ruby/hbase/admin.rb|  77 +++---
 .../hadoop/hbase/thrift/ThriftServerRunner.java |  25 +-
 src/main/asciidoc/_chapters/cp.adoc |  10 +-
 src/main/asciidoc/_chapters/external_apis.adoc  |   5 +-
 36 files changed, 210 insertions(+), 446 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/08963189/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 82bfee7..ba369c0 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -210,52 +210,17 @@ public class HBaseAdmin implements Admin {
   private final int retryLongerMultiplier;
   private final int syncWaitTimeout;
   private boolean aborted;
-  private boolean cleanupConnectionOnClose = false; // close the connection in 
close()
-  private boolean closed = false;
   private int operationTimeout;
 
   private RpcRetryingCallerFactory rpcCallerFactory;
 
   private NonceGenerator ng;
 
-  /**
-   * Constructor.
-   * See {@link #HBaseAdmin(Connection connection)}
-   *
-   * @param c Configuration object. Copied internally.
-   * @deprecated Constructing HBaseAdmin objects manually has been deprecated.
-   * Use {@link Connection#getAdmin()} to obtain an instance of {@link Admin} 
instead.
-   */
-  @Deprecated
-  public HBaseAdmin(Configuration c)
-  throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
-this(ConnectionFactory.createConnection(new Configuration(c)));
-this.cleanupConnectionOnClose = true;
-  }
-
   @Override
   public int getOperationTimeout() {
 return operationTimeout;
   }
 
-
-  /**
-   * Constructor for externally managed Connections.
-   * 

[09/22] hbase git commit: HBASE-14772 Improve zombie detector; be more discerning

2015-11-10 Thread syuanjiang
HBASE-14772 Improve zombie detector; be more discerning


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

Branch: refs/heads/hbase-12439
Commit: bea2f7feacd1a34d27ee17c201aaeacc32e8cdaf
Parents: 0896318
Author: stack 
Authored: Fri Nov 6 16:39:15 2015 -1000
Committer: stack 
Committed: Fri Nov 6 16:39:15 2015 -1000

--
 dev-support/zombie-detector.sh | 151 
 pom.xml|  11 ++-
 2 files changed, 159 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bea2f7fe/dev-support/zombie-detector.sh
--
diff --git a/dev-support/zombie-detector.sh b/dev-support/zombie-detector.sh
new file mode 100644
index 000..57c1374
--- /dev/null
+++ b/dev-support/zombie-detector.sh
@@ -0,0 +1,151 @@
+#!/usr/bin/env bash
+# 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.
+
+# Looks for any running zombies left over from old build runs.
+# Will report and try to do stack trace on stale processes so can
+# figure how they are hung.
+
+# TODO: format output to suit context -- test-patch, jenkins or dev env
+
+#set -x
+# REMOVE
+printenv
+
+### Setup some variables.  
+bindir=$(dirname $0)
+
+# This key is set by our surefire configuration up in the main pom.xml
+# This key needs to match the key we set up there.
+HBASE_BUILD_ID_KEY="hbase.build.id="
+JENKINS=false
+
+PS=${PS:-ps}
+AWK=${AWK:-awk}
+WGET=${WGET:-wget}
+GREP=${GREP:-grep}
+JIRACLI=${JIRA:-jira}
+
+###
+printUsage() {
+  echo "Usage: $0 [options]" BUILD_ID
+  echo
+  echo "Where:"
+  echo "  BUILD_ID is build id to look for in process listing"
+  echo
+  echo "Options:"
+  echo "--ps-cmd= The 'ps' command to use (default 'ps')"
+  echo "--awk-cmd=The 'awk' command to use (default 'awk')"
+  echo "--grep-cmd=   The 'grep' command to use (default 'grep')"
+  echo
+  echo "Jenkins-only options:"
+  echo "--jenkins  Run by Jenkins (runs tests and posts results to 
JIRA)"
+  echo "--wget-cmd=   The 'wget' command to use (default 'wget')"
+  echo "--jira-cmd=   The 'jira' command to use (default 'jira')"
+}
+
+###
+parseArgs() {
+  for i in $*
+  do
+case $i in
+--jenkins)
+  JENKINS=true
+  ;;
+--ps-cmd=*)
+  PS=${i#*=}
+  ;;
+--awk-cmd=*)
+  AWK=${i#*=}
+  ;;
+--wget-cmd=*)
+  WGET=${i#*=}
+  ;;
+--grep-cmd=*)
+  GREP=${i#*=}
+  ;;
+--jira-cmd=*)
+  JIRACLI=${i#*=}
+  ;;
+*)
+  BUILD_ID=$i
+  ;;
+esac
+  done
+  if [ -z "$BUILD_ID" ]; then
+printUsage
+exit 1
+  fi
+  if [[ $JENKINS == "true" ]] ; then
+echo "Running in Jenkins mode"
+  else
+echo "Running in developer mode"
+JENKINS=false
+  fi
+}
+
+### Return list of the processes found with passed build id.
+find_processes () {
+  jps -v | grep surefirebooter | grep -e "${HBASE_BUILD_TAG}"
+}
+
+### Look for zombies
+zombies () {
+  ZOMBIES=`find_processes`
+  # xargs trims white space before and after the count
+  ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"|wc -l|xargs`
+  if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
+wait=15
+echo "Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es); waiting 
${wait}s to see if just slow to stop"
+sleep ${wait}
+PIDS=`echo "${ZOMBIES}"|${AWK} '{print $1}'`
+ZOMBIE_TESTS_COUNT=0
+for pid in $PIDS
+do
+  # Test our zombie still running (and that it still an hbase build item)
+  PS_OUTPUT=`ps -p $pid | tail +2 | grep -e "${HBASE_BUILD_TAG}"`
+  if [[ ! -z "${PS_OUTPUT}" ]]
+  then
+echo "Zombie: $PS_OUTPUT"
+let "ZOMBIE_TESTS_COUNT+=1"
+PS_STACK=`jstack $pid | 

[01/22] hbase git commit: HBASE-14765 Remove snappy profile

2015-11-10 Thread syuanjiang
Repository: hbase
Updated Branches:
  refs/heads/hbase-12439 050ebe850 -> 112900d04


HBASE-14765 Remove snappy profile


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

Branch: refs/heads/hbase-12439
Commit: 86da57f498c68703979dcd7ecc4b0ef2ce03723d
Parents: 050ebe8
Author: Elliott Clark 
Authored: Wed Nov 4 15:38:10 2015 -0800
Committer: Elliott Clark 
Committed: Thu Nov 5 10:20:40 2015 -0800

--
 hbase-common/pom.xml   |  5 -
 hbase-server/pom.xml   | 16 
 hbase-shell/pom.xml| 17 -
 pom.xml|  1 -
 src/main/asciidoc/_chapters/developer.adoc |  6 --
 5 files changed, 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/86da57f4/hbase-common/pom.xml
--
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index a3a1526..390b5b4 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -74,11 +74,6 @@
   
 
-
-
-  
-  
-
   
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/86da57f4/hbase-server/pom.xml
--
diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml
index 9b4d383..94f0b72 100644
--- a/hbase-server/pom.xml
+++ b/hbase-server/pom.xml
@@ -613,22 +613,6 @@
 
 
 
-  hadoop-snappy
-  
-false
-
-  snappy
-
-  
-  
-
-  org.apache.hadoop
-  hadoop-snappy
-  ${hadoop-snappy.version}
-
-  
-
-
   native
   
 false

http://git-wip-us.apache.org/repos/asf/hbase/blob/86da57f4/hbase-shell/pom.xml
--
diff --git a/hbase-shell/pom.xml b/hbase-shell/pom.xml
index 0cd670a..cef3e59 100644
--- a/hbase-shell/pom.xml
+++ b/hbase-shell/pom.xml
@@ -266,23 +266,6 @@
 true
   
 
-
-
-  hadoop-snappy
-  
-false
-
-  snappy
-
-  
-  
-
-  org.apache.hadoop
-  hadoop-snappy
-  ${hadoop-snappy.version}
-
-  
-
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/86da57f4/pom.xml
--
diff --git a/pom.xml b/pom.xml
index e306f01..1a064cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1189,7 +1189,6 @@
 0.9.2
 3.4.6
 1.7.7
-0.0.1-SNAPSHOT
 4.0.3
 2.4.1
 1.3.3

http://git-wip-us.apache.org/repos/asf/hbase/blob/86da57f4/src/main/asciidoc/_chapters/developer.adoc
--
diff --git a/src/main/asciidoc/_chapters/developer.adoc 
b/src/main/asciidoc/_chapters/developer.adoc
index d1172ae..3cfc02f 100644
--- a/src/main/asciidoc/_chapters/developer.adoc
+++ b/src/main/asciidoc/_chapters/developer.adoc
@@ -419,12 +419,6 @@ Its not an error.
 It is link:http://jira.codehaus.org/browse/MSITE-286[officially
 ugly] though.
 
-[[build.snappy]]
- Building in snappy compression support
-
-Pass `-Psnappy` to trigger the `hadoop-snappy` maven profile for building 
Google Snappy native libraries into HBase.
-See also <>
-
 [[releasing]]
 == Releasing Apache HBase
 



[12/22] hbase git commit: HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM set execute perms on the script

2015-11-10 Thread syuanjiang
 HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM set execute 
perms on the script


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

Branch: refs/heads/hbase-12439
Commit: 305ecaf224340b0f6e248d4fdabf0b53e1cd3b03
Parents: 1144237
Author: stack 
Authored: Sat Nov 7 14:59:20 2015 -1000
Committer: stack 
Committed: Sat Nov 7 15:00:08 2015 -1000

--
 dev-support/zombie-detector.sh | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/305ecaf2/dev-support/zombie-detector.sh
--
diff --git a/dev-support/zombie-detector.sh b/dev-support/zombie-detector.sh
old mode 100644
new mode 100755



[22/22] hbase git commit: HBASE-14785 Addendum: Add an in-project Maven repo

2015-11-10 Thread syuanjiang
HBASE-14785 Addendum: Add an in-project Maven repo


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

Branch: refs/heads/hbase-12439
Commit: 112900d0425a8157b89041f0e353ebf5cc259c69
Parents: 9805222
Author: Misty Stanley-Jones 
Authored: Tue Nov 10 08:40:15 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Tue Nov 10 15:17:07 2015 +1000

--
 pom.xml |   7 +
 src/main/site/resources/css/site.css|   1 -
 .../1.5-HBASE/maven-fluido-skin-1.5-HBASE.jar   | Bin 0 -> 344936 bytes
 .../1.5-HBASE/maven-fluido-skin-1.5-HBASE.pom   | 718 +++
 .../maven-fluido-skin/maven-metadata-local.xml  |  12 +
 5 files changed, 737 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/112900d0/pom.xml
--
diff --git a/pom.xml b/pom.xml
index b9505e6..e2871ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2998,4 +2998,11 @@
   file:///tmp
 
   
+  
+
+project.local
+project
+file:${project.basedir}/src/main/site/resources/repo
+
+
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/112900d0/src/main/site/resources/css/site.css
--
diff --git a/src/main/site/resources/css/site.css 
b/src/main/site/resources/css/site.css
index 5017ca5..ba6d55e 100644
--- a/src/main/site/resources/css/site.css
+++ b/src/main/site/resources/css/site.css
@@ -55,7 +55,6 @@ div#search-form.navbar-search.pull-right {
   position: initial;
 }
 li#publishDate.pull-right {
-  margin-top: -23px;
   list-style: none;
 }
 .container,

http://git-wip-us.apache.org/repos/asf/hbase/blob/112900d0/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.jar
--
diff --git 
a/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.jar
 
b/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.jar
new file mode 100644
index 000..5b93209
Binary files /dev/null and 
b/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.jar
 differ

http://git-wip-us.apache.org/repos/asf/hbase/blob/112900d0/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.pom
--
diff --git 
a/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.pom
 
b/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.pom
new file mode 100644
index 000..d12092b
--- /dev/null
+++ 
b/src/main/site/resources/repo/org/apache/maven/skins/maven-fluido-skin/1.5-HBASE/maven-fluido-skin-1.5-HBASE.pom
@@ -0,0 +1,718 @@
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  
+org.apache.maven.skins
+maven-skins
+10
+../maven-skins/pom.xml
+  
+
+  maven-fluido-skin
+  1.5-HBASE
+
+  Apache Maven Fluido Skin
+  The Apache Maven Fluido Skin is an Apache Maven site skin
+built on top of Twitter's bootstrap.
+  2011
+
+  
+
scm:svn:http://svn.apache.org/repos/asf/maven/skins/trunk/maven-fluido-skin/
+
scm:svn:https://svn.apache.org/repos/asf/maven/skins/trunk/maven-fluido-skin/
+
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/
+  
+  
+jira
+https://issues.apache.org/jira/browse/MSKINS/component/12326474
+  
+  
+
+  apache.website
+  
scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/components/${maven.site.path}
+
+  
+
+  
+
+
+  Bruno P. Kinoshita
+  brunodepaulak AT yahoo DOT com DOT br
+
+
+  Carlos Villaronga
+  cvillaronga AT gmail DOT com
+
+
+  Christian Grobmeier
+  grobmeier AT apache DOT org
+
+
+  Conny Kreyssel
+  dev AT kreyssel DOT org
+
+
+  Michael Koch
+  tensberg AT gmx DOT net
+
+
+  Emmanuel Hugonnet
+  emmanuel DOT hugonnet AT gmail DOT com
+
+
+  Ivan Habunek
+  ihabunek AT apache DOT org
+
+
+  Eric Barboni
+
+
+  Michael Osipov
+  michaelo AT 

[03/22] hbase git commit: HBASE-14755 Fix some broken links and HTML problems

2015-11-10 Thread syuanjiang
HBASE-14755 Fix some broken links and HTML problems


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

Branch: refs/heads/hbase-12439
Commit: bfa36891901b96b95d82f5307642c35fd2b9f534
Parents: 68b9488
Author: Misty Stanley-Jones 
Authored: Wed Nov 4 08:31:24 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Fri Nov 6 11:11:30 2015 +1000

--
 .../hbase/mapreduce/HRegionPartitioner.java |   2 +-
 pom.xml |  27 ++--
 .../_chapters/appendix_hfile_format.adoc| 154 +--
 src/main/asciidoc/_chapters/architecture.adoc   |  36 +++--
 src/main/asciidoc/_chapters/cp.adoc |   3 +-
 src/main/asciidoc/_chapters/datamodel.adoc  |   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  12 +-
 src/main/asciidoc/_chapters/performance.adoc|   3 +-
 src/main/asciidoc/_chapters/security.adoc   |   5 +-
 src/main/site/xdoc/poweredbyhbase.xml   |   2 +-
 10 files changed, 132 insertions(+), 114 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bfa36891/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
index 24ca8e6..4c75b56 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
@@ -44,7 +44,7 @@ import org.apache.hadoop.mapreduce.Partitioner;
  * This class is not suitable as partitioner creating hfiles
  * for incremental bulk loads as region spread will likely change between time 
of
  * hfile creation and load time. See {@link LoadIncrementalHFiles}
- * and http://hbase.apache.org/docs/current/bulk-loads.html;>Bulk 
Load.
+ * and http://hbase.apache.org/book.html#arch.bulk.load;>Bulk 
Load.
  *
  * @param   The type of the key.
  * @param   The type of the value.

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfa36891/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 1a064cb..2d35610 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2754,6 +2754,9 @@
   
${project.reporting.outputDirectory}/devapidocs
   
${project.reporting.outputDirectory}/testdevapidocs
   ${project.reporting.outputDirectory}/xref
+  
+**/generated/*
+  
 
   
 
@@ -2767,7 +2770,6 @@
 devapi
 
   aggregate
-  test-aggregate
 
 
   devapidocs
@@ -2778,7 +2780,8 @@
 **/protobuf/*
 **/*.scala
   
-  
*.generated.master:*.generated:org.apache.hadoop.hbase.tmpl.common:com.google.protobuf:org.apache.hadoop.hbase.spark
+  
org.apache.hadoop.hbase.tmpl.common:com.google.protobuf:org.apache.hadoop.hbase.spark:org.apache.hadoop.hbase.generated*
+  private 
   true
   true
   2
@@ -2814,13 +2817,14 @@
 
   testdevapidocs
   Developer API
-  The full HBase API, including private and unstable 
APIs
+  The full HBase API test code, including private and 
unstable APIs
   
 **/generated/*
 **/protobuf/*
 **/*.scala
   
-  
*.generated.master:*.generated:org.apache.hadoop.hbase.tmpl.common:com.google.protobuf:org.apache.hadoop.hbase.spark
+  
org.apache.hadoop.hbase.tmpl.common:com.google.protobuf:org.apache.hadoop.hbase.spark:org.apache.hadoop.hbase.generated*
+  private 
   true
   true
   2
@@ -2869,7 +2873,7 @@
   User API
   The HBase Application Programmer's API
   
-

[19/22] hbase git commit: HBASE-14693 Add client-side metrics for received pushback signals

2015-11-10 Thread syuanjiang
HBASE-14693 Add client-side metrics for received pushback signals

Signed-off-by: Andrew Purtell 


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

Branch: refs/heads/hbase-12439
Commit: 086bacd12d1c32a6c1c6736091334185be144a04
Parents: 44367f5
Author: chenheng 
Authored: Thu Nov 5 16:12:41 2015 +0800
Committer: Andrew Purtell 
Committed: Mon Nov 9 18:03:30 2015 -0800

--
 .../hadoop/hbase/client/AsyncProcess.java   |  17 +++
 .../hadoop/hbase/client/MetricsConnection.java  | 106 +++
 .../hadoop/hbase/client/TestClientPushback.java |  20 +++-
 3 files changed, 141 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/086bacd1/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
index 7c7fc3e..f1fa3eb 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
@@ -1009,6 +1009,9 @@ class AsyncProcess {
 int numAttempt) {
   // no stats to manage, just do the standard action
   if (AsyncProcess.this.connection.getStatisticsTracker() == null) {
+if (connection.getConnectionMetrics() != null) {
+  connection.getConnectionMetrics().incrNormalRunners();
+}
 return 
Collections.singletonList(Trace.wrap("AsyncProcess.sendMultiAction",
 new SingleServerRequestRunnable(multiAction, numAttempt, server, 
callsInProgress)));
   }
@@ -1039,6 +1042,14 @@ class AsyncProcess {
   runner.setRunner(runnable);
   traceText = "AsyncProcess.clientBackoff.sendMultiAction";
   runnable = runner;
+  if (connection.getConnectionMetrics() != null) {
+connection.getConnectionMetrics().incrDelayRunners();
+
connection.getConnectionMetrics().updateDelayInterval(runner.getSleepTime());
+  }
+} else {
+  if (connection.getConnectionMetrics() != null) {
+connection.getConnectionMetrics().incrNormalRunners();
+  }
 }
 runnable = Trace.wrap(traceText, runnable);
 toReturn.add(runnable);
@@ -1267,6 +1278,12 @@ class AsyncProcess {
   ++failed;
 }
   } else {
+
+if (AsyncProcess.this.connection.getConnectionMetrics() != null) {
+  AsyncProcess.this.connection.getConnectionMetrics().
+  updateServerStats(server, regionName, result);
+}
+
 // update the stats about the region, if its a user table. We 
don't want to slow down
 // updates to meta tables, especially from internal updates 
(master, etc).
 if (AsyncProcess.this.connection.getStatisticsTracker() != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/086bacd1/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
index f34fb8a..3863c37 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
@@ -26,12 +26,16 @@ import com.yammer.metrics.core.MetricsRegistry;
 import com.yammer.metrics.core.Timer;
 import com.yammer.metrics.reporting.JmxReporter;
 import com.yammer.metrics.util.RatioGauge;
+import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutateRequest;
 import 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutationProto.MutationType;
+import org.apache.hadoop.hbase.util.Bytes;
 
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -54,6 +58,8 @@ public class MetricsConnection {
   private 

[02/22] hbase git commit: HBASE-14773 Fix HBase shell tests are skipped when skipping server tests.

2015-11-10 Thread syuanjiang
HBASE-14773 Fix HBase shell tests are skipped when skipping server tests.


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

Branch: refs/heads/hbase-12439
Commit: 68b94886a5cc0d8db26c49616669c244f9cae916
Parents: 86da57f
Author: Elliott Clark 
Authored: Thu Nov 5 15:30:41 2015 -0800
Committer: Elliott Clark 
Committed: Thu Nov 5 16:27:14 2015 -0800

--
 hbase-shell/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/68b94886/hbase-shell/pom.xml
--
diff --git a/hbase-shell/pom.xml b/hbase-shell/pom.xml
index cef3e59..f80858b 100644
--- a/hbase-shell/pom.xml
+++ b/hbase-shell/pom.xml
@@ -255,10 +255,10 @@
   
 
 
-  skipServerTests
+  skipShellTests
   
 
-  skipServerTests
+  skipShellTests
 
   
   



[05/22] hbase git commit: HBASE-14463 Severe performance downgrade when parallel reading a single key from BucketCache (Yu Li)

2015-11-10 Thread syuanjiang
HBASE-14463 Severe performance downgrade when parallel reading a single key 
from BucketCache (Yu Li)


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

Branch: refs/heads/hbase-12439
Commit: 263a0adf79105b9dc166e21c3f5159ade6e2d0a7
Parents: 6ec4a96
Author: tedyu 
Authored: Fri Nov 6 13:12:10 2015 -0800
Committer: tedyu 
Committed: Fri Nov 6 13:12:10 2015 -0800

--
 .../hbase/io/hfile/bucket/BucketCache.java  |  52 +++-
 .../hadoop/hbase/util/IdReadWriteLock.java  |  91 +
 .../hadoop/hbase/io/hfile/CacheTestUtils.java   |  19 ++-
 .../hbase/io/hfile/bucket/TestBucketCache.java  |   9 +-
 .../hadoop/hbase/util/TestIdReadWriteLock.java  | 127 +++
 5 files changed, 258 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/263a0adf/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 5eb6f8f..718e92a 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -47,6 +47,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -68,7 +69,7 @@ import org.apache.hadoop.hbase.nio.ByteBuff;
 import org.apache.hadoop.hbase.util.ConcurrentIndex;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.HasThread;
-import org.apache.hadoop.hbase.util.IdLock;
+import org.apache.hadoop.hbase.util.IdReadWriteLock;
 import org.apache.hadoop.util.StringUtils;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -180,14 +181,11 @@ public class BucketCache implements BlockCache, HeapSize {
   private volatile long ioErrorStartTime = -1;
 
   /**
-   * A "sparse lock" implementation allowing to lock on a particular block
-   * identified by offset. The purpose of this is to avoid freeing the block
-   * which is being read.
-   *
-   * TODO:We could extend the IdLock to IdReadWriteLock for better.
+   * A ReentrantReadWriteLock to lock on a particular block identified by 
offset.
+   * The purpose of this is to avoid freeing the block which is being read.
*/
   @VisibleForTesting
-  final IdLock offsetLock = new IdLock();
+  final IdReadWriteLock offsetLock = new IdReadWriteLock();
 
   private final ConcurrentIndex blocksByHFile =
   new ConcurrentIndex(new 
Comparator() {
@@ -412,9 +410,9 @@ public class BucketCache implements BlockCache, HeapSize {
 BucketEntry bucketEntry = backingMap.get(key);
 if (bucketEntry != null) {
   long start = System.nanoTime();
-  IdLock.Entry lockEntry = null;
+  ReentrantReadWriteLock lock = offsetLock.getLock(bucketEntry.offset());
   try {
-lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
+lock.readLock().lock();
 // We can not read here even if backingMap does contain the given key 
because its offset
 // maybe changed. If we lock BlockCacheKey instead of offset, then we 
can only check
 // existence here.
@@ -442,9 +440,7 @@ public class BucketCache implements BlockCache, HeapSize {
 LOG.error("Failed reading block " + key + " from bucket cache", ioex);
 checkIOErrorIsTolerated();
   } finally {
-if (lockEntry != null) {
-  offsetLock.releaseLockEntry(lockEntry);
-}
+lock.readLock().unlock();
   }
 }
 if (!repeat && updateCacheMetrics) {
@@ -484,21 +480,16 @@ public class BucketCache implements BlockCache, HeapSize {
 return false;
   }
 }
-IdLock.Entry lockEntry = null;
+ReentrantReadWriteLock lock = offsetLock.getLock(bucketEntry.offset());
 try {
-  lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
+  lock.writeLock().lock();
   if (backingMap.remove(cacheKey, bucketEntry)) {
 blockEvicted(cacheKey, bucketEntry, removedBlock == null);
   } else {
 return false;
   }
-} catch (IOException ie) {
-  LOG.warn("Failed 

[21/22] hbase git commit: HBASE-14785 Hamburger menu for mobile site

2015-11-10 Thread syuanjiang
HBASE-14785 Hamburger menu for mobile site

This requires use of a custom maven-fluido-skin JAR, also attached to the JIRA

More CSS fix-ups


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

Branch: refs/heads/hbase-12439
Commit: 9805b00377f94e35f1d9e9255d8da8ce67d8
Parents: 32de06f
Author: Misty Stanley-Jones 
Authored: Mon Nov 9 08:45:09 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Tue Nov 10 15:17:00 2015 +1000

--
 src/main/site/resources/css/site.css | 66 ++-
 src/main/site/site.xml   | 12 +++---
 2 files changed, 27 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9805/src/main/site/resources/css/site.css
--
diff --git a/src/main/site/resources/css/site.css 
b/src/main/site/resources/css/site.css
index 32ab564..5017ca5 100644
--- a/src/main/site/resources/css/site.css
+++ b/src/main/site/resources/css/site.css
@@ -47,9 +47,12 @@ footer {
 footer .row, footer p, footer .pull-right {
   margin: 5px;
 }
-form#search-form.navbar-search.pull-right {
-  width: 150px;
-  margin-right: 33px;
+div#search-form.navbar-search.pull-right {
+  width: 290px;
+  margin-right: 0;
+  margin-top: -5px;
+  margin-left: 0;
+  position: initial;
 }
 li#publishDate.pull-right {
   margin-top: -23px;
@@ -61,9 +64,7 @@ li#publishDate.pull-right {
 .navbar-fixed-bottom .container,
 .navbar-inner {
   width: 100%;
-  margin: 2px;
 }
-
 /* Change the color and effect when clicking in menus */
 .dropdown-menu>li>a:hover,
 .dropdown-menu>li>a:focus,
@@ -75,48 +76,21 @@ li#publishDate.pull-right {
   font-weight: bolder;
 }
 
-/* On small screens, put the search form on its own line */
-@media only screen and (max-width: 767px) {
-  body {
-width: 100%;
-font-size: 120%;
-  }
-  div#topbar,
-  div#banner,
-  div#breadcrumbs,
-  div#bodyColumn,
-  footer {
-width: 98%;
-margin-left: 5px;
-margin-right: 5px;
-clear: both;
-margin-bottom: 2px;
-  }
-  div#banner {
-margin-top: 90px;
-  }
-  form#search-form.navbar-search.pull-right, .pull-right {
-width: 95%;
-margin: 2px;
-float: left;
-clear: both;
-  }
-  li#publishDate.pull-right {
-display: block;
-width: 95%;
-float: left;
-margin-top: 5px;
-list-style: none;
-  }
+.dropdown-backdrop {
+  position: static;
 }
 
-// Make the font size even bigger on high-DPI small-screen devices
-// such as iphone 6 and 6+ but not iPad (768 px)
-only screen and (max-width: 767px) and (-webkit-min-device-pixel-ratio : 1.5),
-only screen and (max-width: 767px) and (min-device-pixel-ratio : 1.5) {
-  body {
-font-size: 140%;
+@media only screen and (max-width: 977px) {
+  /* Without this rule, drop-down divs are a fixed height
+   * the first time they are expanded */
+  .collapse.in {
+height: auto;
+overflow: visible;
+  }
+  div#search-form.navbar-search.pull-right {
+padding: 0;
+margin-left: ;
+width: 100%;
+clear: both;
   }
 }
-
-

http://git-wip-us.apache.org/repos/asf/hbase/blob/9805/src/main/site/site.xml
--
diff --git a/src/main/site/site.xml b/src/main/site/site.xml
index cf878be..48a2dbc 100644
--- a/src/main/site/site.xml
+++ b/src/main/site/site.xml
@@ -25,14 +25,15 @@
   
 org.apache.maven.skins
 maven-fluido-skin
-1.4
+1.5-HBASE
   
   
 
   true
-  width: 98%;
   false
-  
+  
+000385458301414556862:sq1bb0xugjg
+  
   false
   true
   »
@@ -53,9 +54,10 @@
   
 
   
-  
+  https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap-responsive.min.css"/>
+  https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css"/>
   
-  
+  https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js";>
 
 
   



[10/22] hbase git commit: HBASE-14774 Raise the font size on high-DPI small-screen devices like iPhone 6+

2015-11-10 Thread syuanjiang
HBASE-14774 Raise the font size on high-DPI small-screen devices like iPhone 6+


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

Branch: refs/heads/hbase-12439
Commit: 0edd51d2e26caf00ed29a3118c9da23f50977e27
Parents: bea2f7f
Author: Misty Stanley-Jones 
Authored: Fri Nov 6 10:00:33 2015 +1000
Committer: Misty Stanley-Jones 
Committed: Sat Nov 7 15:37:47 2015 +1000

--
 src/main/site/resources/css/site.css | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0edd51d2/src/main/site/resources/css/site.css
--
diff --git a/src/main/site/resources/css/site.css 
b/src/main/site/resources/css/site.css
index b1493fc..32ab564 100644
--- a/src/main/site/resources/css/site.css
+++ b/src/main/site/resources/css/site.css
@@ -76,7 +76,7 @@ li#publishDate.pull-right {
 }
 
 /* On small screens, put the search form on its own line */
-@media only screen and (max-width: 800px) {
+@media only screen and (max-width: 767px) {
   body {
 width: 100%;
 font-size: 120%;
@@ -110,5 +110,13 @@ li#publishDate.pull-right {
   }
 }
 
+// Make the font size even bigger on high-DPI small-screen devices
+// such as iphone 6 and 6+ but not iPad (768 px)
+only screen and (max-width: 767px) and (-webkit-min-device-pixel-ratio : 1.5),
+only screen and (max-width: 767px) and (min-device-pixel-ratio : 1.5) {
+  body {
+font-size: 140%;
+  }
+}
 
 



  1   2   3   4   5   6   7   8   9   10   >