hbase git commit: HBASE-16976 Use standard directory for building class files for hbase-protocol-shaded

2016-11-01 Thread busbey
Repository: hbase
Updated Branches:
  refs/heads/master 6b957b69a -> c93c194e5


HBASE-16976 Use standard directory for building class files for 
hbase-protocol-shaded

Signed-off-by: Michael Stack 
Signed-off-by: Sean Busbey 


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

Branch: refs/heads/master
Commit: c93c194e5a0fee53f9a0bf16f1bb9c03a86879d8
Parents: 6b957b6
Author: Josh Elser 
Authored: Mon Oct 31 14:53:58 2016 -0400
Committer: Sean Busbey 
Committed: Tue Nov 1 23:51:58 2016 -0500

--
 hbase-protocol-shaded/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c93c194e/hbase-protocol-shaded/pom.xml
--
diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml
index 87750fa..4626abb 100644
--- a/hbase-protocol-shaded/pom.xml
+++ b/hbase-protocol-shaded/pom.xml
@@ -35,7 +35,7 @@
-->
 3.1.0
 
-${basedir}/target
+${project.build.directory}/classes
 
 src/main/java
   



hbase git commit: HBASE-16960 RegionServer hang when aborting

2016-11-01 Thread liyu
Repository: hbase
Updated Branches:
  refs/heads/master 4bd85f98f -> 6b957b69a


HBASE-16960 RegionServer hang when aborting

Signed-off-by: Yu Li 


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

Branch: refs/heads/master
Commit: 6b957b69a7e0b1a01385a2b7be42dd995784dd06
Parents: 4bd85f9
Author: binlijin 
Authored: Wed Nov 2 11:57:17 2016 +0800
Committer: Yu Li 
Committed: Wed Nov 2 11:59:51 2016 +0800

--
 .../hbase/regionserver/wal/AbstractFSWAL.java   |  19 +-
 .../hadoop/hbase/regionserver/wal/FSHLog.java   |   6 +
 .../hbase/regionserver/wal/SyncFuture.java  |  12 +-
 .../hbase/regionserver/TestWALLockup.java   | 295 ++-
 .../hbase/regionserver/wal/TestSyncFuture.java  |  49 +++
 5 files changed, 376 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6b957b69/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
index c1e8019..0ef0cf7 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
@@ -19,8 +19,6 @@ package org.apache.hadoop.hbase.regionserver.wal;
 
 import static 
org.apache.hadoop.hbase.wal.AbstractFSWALProvider.WAL_FILE_NAME_DELIMITER;
 
-import com.google.common.annotations.VisibleForTesting;
-
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.lang.management.ManagementFactory;
@@ -55,6 +53,7 @@ import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.exceptions.TimeoutIOException;
 import org.apache.hadoop.hbase.io.util.HeapMemorySizeUtil;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.DrainBarrier;
@@ -71,6 +70,8 @@ import org.apache.htrace.Span;
 import org.apache.htrace.Trace;
 import org.apache.htrace.TraceScope;
 
+import com.google.common.annotations.VisibleForTesting;
+
 /**
  * Implementation of {@link WAL} to go against {@link FileSystem}; i.e. keep 
WALs in HDFS. Only one
  * WAL is ever being written at a time. When a WAL hits a configured maximum 
size, it is rolled.
@@ -104,6 +105,8 @@ public abstract class AbstractFSWAL implements WAL {
 
   protected static final int DEFAULT_SLOW_SYNC_TIME_MS = 100; // in ms
 
+  private static final int DEFAULT_WAL_SYNC_TIMEOUT_MS = 5 * 60 * 1000; // in 
ms, 5min
+
   /**
* file system instance
*/
@@ -162,6 +165,8 @@ public abstract class AbstractFSWAL implements WAL {
 
   protected final int slowSyncNs;
 
+  private final long walSyncTimeout;
+
   // If > than this size, roll the log.
   protected final long logrollsize;
 
@@ -381,6 +386,8 @@ public abstract class AbstractFSWAL implements WAL {
 + walFileSuffix + ", logDir=" + this.walDir + ", archiveDir=" + 
this.walArchiveDir);
 this.slowSyncNs =
 100 * conf.getInt("hbase.regionserver.hlog.slowsync.ms", 
DEFAULT_SLOW_SYNC_TIME_MS);
+this.walSyncTimeout = conf.getLong("hbase.regionserver.hlog.sync.timeout",
+DEFAULT_WAL_SYNC_TIMEOUT_MS);
 int maxHandlersCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT, 
200);
 // Presize our map of SyncFutures by handler objects.
 this.syncFuturesByHandler = new ConcurrentHashMap(maxHandlersCount);
@@ -659,8 +666,14 @@ public abstract class AbstractFSWAL implements WAL {
   protected Span blockOnSync(final SyncFuture syncFuture) throws IOException {
 // Now we have published the ringbuffer, halt the current thread until we 
get an answer back.
 try {
-  syncFuture.get();
+  syncFuture.get(walSyncTimeout);
   return syncFuture.getSpan();
+} catch (TimeoutIOException tioe) {
+  // SyncFuture reuse by thread, if TimeoutIOException happens, ringbuffer
+  // still refer to it, so if this thread use it next time may get a wrong
+  // result.
+  this.syncFuturesByHandler.remove(Thread.currentThread());
+  throw tioe;
 } catch (InterruptedException ie) {
   LOG.warn("Interrupted", ie);
   throw convertInterruptedExceptionToIOException(ie);

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b957b69/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
--

hbase git commit: HBASE-16931 Setting cell's seqId to zero in compaction flow might cause RS down.

2016-11-01 Thread liyu
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 5587256ef -> 84481361b


HBASE-16931 Setting cell's seqId to zero in compaction flow might cause RS down.

Signed-off-by: Yu Li 


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

Branch: refs/heads/branch-1.3
Commit: 84481361b618f9f8ca12a6671eac2bb6ba894ea1
Parents: 5587256
Author: binlijin 
Authored: Mon Oct 24 23:31:14 2016 +0800
Committer: Yu Li 
Committed: Wed Nov 2 11:00:53 2016 +0800

--
 .../regionserver/compactions/Compactor.java | 17 +++-
 .../hbase/regionserver/TestCompaction.java  | 83 +++-
 2 files changed, 94 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/84481361/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 c6fc0c6..b6d145d 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
@@ -26,8 +26,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import com.google.common.io.Closeables;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -58,6 +56,8 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
 
+import com.google.common.io.Closeables;
+
 /**
  * A compactor is a compaction algorithm associated a given policy. Base class 
also contains
  * reusable parts for implementing compactors (what is common and what isn't 
is evolving).
@@ -75,7 +75,7 @@ public abstract class Compactor {
   protected final Compression.Algorithm compactionCompression;
 
   /** specify how many days to keep MVCC values during major compaction **/ 
-  protected final int keepSeqIdPeriod;
+  protected int keepSeqIdPeriod;
 
   //TODO: depending on Store is not good but, realistically, all compactors 
currently do.
   Compactor(final Configuration conf, final Store store) {
@@ -435,9 +435,16 @@ public abstract class Compactor {
   now = EnvironmentEdgeManager.currentTime();
 }
 // output to writer:
+Cell lastCleanCell = null;
+long lastCleanCellSeqId = 0;
 for (Cell c : cells) {
   if (cleanSeqId && c.getSequenceId() <= smallestReadPoint) {
+lastCleanCell = c;
+lastCleanCellSeqId = c.getSequenceId();
 CellUtil.setSequenceId(c, 0);
+  } else {
+lastCleanCell = null;
+lastCleanCellSeqId = 0;
   }
   writer.append(c);
   int len = KeyValueUtil.length(c);
@@ -459,6 +466,10 @@ public abstract class Compactor {
 }
   }
 }
+if (lastCleanCell != null) {
+  // HBASE-16931, set back sequence id to avoid affecting scan order 
unexpectedly
+  CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);
+}
 // Log the progress of long running compactions every minute if
 // logging at DEBUG level
 if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/84481361/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index da0bf42..6b1382f 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -50,10 +50,9 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon;
 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.security.User;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.client.Delete;

[4/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/branch-1.2
Commit: 8b7053fb392b621f62bfe2c4d47a7d03945d44bd
Parents: 9fcd0c8
Author: Andrew Purtell 
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:10:00 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8b7053fb/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index d511734..62b6306 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -181,8 +181,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -191,6 +194,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -243,9 +247,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -254,6 +266,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



[2/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/branch-1
Commit: 961b95217136c6fa41892eec693576ad3da113f9
Parents: 6113f9a
Author: Andrew Purtell 
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:09:17 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/961b9521/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 12aaa45..9cdf087 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -183,8 +183,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -193,6 +196,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -245,9 +249,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -256,6 +268,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



[6/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/0.98
Commit: 5f9cd8633bdb2381395635f1bb9d28a0e67fc91c
Parents: 4e12c55
Author: Andrew Purtell 
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:10:16 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5f9cd863/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index e2af220..306d9cb 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -180,8 +180,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -190,6 +193,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -242,9 +246,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -253,6 +265,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



[5/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/branch-1.1
Commit: f22e0bb69e1d058f164a9a2a0160497d97040892
Parents: e1d8dcf
Author: Andrew Purtell 
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:10:06 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f22e0bb6/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 29e96bb..0ddb097 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -181,8 +181,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -191,6 +194,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -243,9 +247,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -254,6 +266,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



[1/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
Repository: hbase
Updated Branches:
  refs/heads/0.98 4e12c5529 -> 5f9cd8633
  refs/heads/branch-1 6113f9a34 -> 961b95217
  refs/heads/branch-1.1 e1d8dcfe6 -> f22e0bb69
  refs/heads/branch-1.2 9fcd0c8d4 -> 8b7053fb3
  refs/heads/branch-1.3 e14d7cc31 -> 5587256ef
  refs/heads/master c12c6ffae -> 4bd85f98f


HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/master
Commit: 4bd85f98fef23bb71a47a7560bff42fd54cd7cf2
Parents: c12c6ff
Author: Andrew Purtell 
Authored: Tue Nov 1 19:08:38 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:08:38 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4bd85f98/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 7cae0bc..ade738e 100644
--- 
a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -184,8 +184,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -194,6 +197,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -246,9 +250,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -257,6 +269,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



[3/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)

2016-11-01 Thread apurtell
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


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

Branch: refs/heads/branch-1.3
Commit: 5587256ef4a09a21f239c3800fe99f3502c2c579
Parents: e14d7cc
Author: Andrew Purtell 
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Nov 1 19:09:52 2016 -0700

--
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5587256e/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 12aaa45..9cdf087 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -183,8 +183,11 @@ public class TestRowProcessorEndpoint {
 Get get = new Get(ROW);
 LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
 int finalCounter = incrementCounter(table);
-assertEquals(numThreads + 1, finalCounter);
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -193,6 +196,7 @@ public class TestRowProcessorEndpoint {
   try {
 incrementCounter(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }
@@ -245,9 +249,17 @@ public class TestRowProcessorEndpoint {
   stringifyKvs(table.get(new Get(ROW)).listCells()));
 LOG.debug("row2 keyvalues:" +
   stringifyKvs(table.get(new Get(ROW2)).listCells()));
-assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-assertEquals(0, failures.get());
+int failureNumber = failures.get();
+if (failureNumber > 0) {
+  LOG.debug("We failed " + failureNumber + " times during test");
+}
+if (!swapped) {
+  assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+} else {
+  assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+  assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+}
   }
 
   class SwapRowsRunner implements Runnable {
@@ -256,6 +268,7 @@ public class TestRowProcessorEndpoint {
   try {
 swapRows(table);
   } catch (Throwable e) {
+failures.incrementAndGet();
 e.printStackTrace();
   }
 }



hbase git commit: HBASE-16978 Disable backup by default (Vladimir Rodionov)

2016-11-01 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 3d2256428 -> cd41083dc


HBASE-16978 Disable backup by default (Vladimir Rodionov)


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

Branch: refs/heads/HBASE-7912
Commit: cd41083dc47f1ebfa45e15f3786e1970c30b331d
Parents: 3d22564
Author: tedyu 
Authored: Tue Nov 1 15:40:40 2016 -0700
Committer: tedyu 
Committed: Tue Nov 1 15:40:40 2016 -0700

--
 .../hadoop/hbase/backup/BackupDriver.java   |   9 +
 .../hbase/backup/BackupRestoreConstants.java|   2 +-
 .../hadoop/hbase/backup/RestoreDriver.java  |  11 +-
 .../hadoop/hbase/backup/impl/BackupManager.java |  57 +++---
 .../hadoop/hbase/HBaseTestingUtility.java   |   1 -
 .../org/apache/hadoop/hbase/TestNamespace.java  |   3 +-
 .../hadoop/hbase/backup/TestBackupBase.java |  23 +--
 .../hbase/backup/TestBackupCommandLineTool.java | 179 ++-
 .../hbase/backup/TestBackupSystemTable.java |  27 +--
 .../hbase/client/TestMetaWithReplicas.java  |   4 +-
 .../hbase/coprocessor/TestClassLoading.java |  49 +++--
 ...TestMasterCoprocessorExceptionWithAbort.java |   2 +
 ...estMasterCoprocessorExceptionWithRemove.java |   2 +
 .../master/TestDistributedLogSplitting.java |   7 +-
 .../hadoop/hbase/master/TestMasterFailover.java |   5 +-
 .../TestMasterOperationsForRegionReplicas.java  |   6 +-
 .../TestMasterRestartAfterDisablingTable.java   |   2 +
 .../hadoop/hbase/master/TestRestartCluster.java |   3 +
 .../hadoop/hbase/master/TestRollingRestart.java |   2 +
 .../regionserver/TestRegionServerMetrics.java   |  44 -
 .../security/access/TestTablePermissions.java   |  10 +-
 .../visibility/TestVisibilityLabelsWithACL.java |  15 +-
 .../hadoop/hbase/util/TestHBaseFsckOneRS.java   |  66 ---
 .../util/hbck/OfflineMetaRebuildTestCore.java   |   3 +-
 24 files changed, 313 insertions(+), 219 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cd41083d/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java
index 07f39b6..099e418 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java
@@ -27,6 +27,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.backup.impl.BackupCommands;
+import org.apache.hadoop.hbase.backup.impl.BackupManager;
 import org.apache.hadoop.hbase.backup.util.LogUtils;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
@@ -54,6 +55,14 @@ public class BackupDriver extends AbstractHBaseTool 
implements BackupRestoreCons
 
   private int parseAndRun(String[] args) throws IOException {
 
+// Check if backup is enabled
+if (!BackupManager.isBackupEnabled(getConf())) {
+  System.err.println("Backup is not enabled. To enable backup, "+
+  "set \'hbase.backup.enabled'=true and restart "+
+  "the cluster");
+  return -1;
+}
+
 String cmd = null;
 String[] remainArgs = null;
 if (args == null || args.length == 0) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/cd41083d/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java
index 5c869f6..eff45cc 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java
@@ -79,7 +79,7 @@ public interface BackupRestoreConstants {
* Backup/Restore constants
*/
   public final static String BACKUP_ENABLE_KEY = "hbase.backup.enable";
-  public final static boolean BACKUP_ENABLE_DEFAULT = true;
+  public final static boolean BACKUP_ENABLE_DEFAULT = false;
   public final static String BACKUP_SYSTEM_TTL_KEY = "hbase.backup.system.ttl";
   public final static int BACKUP_SYSTEM_TTL_DEFAULT = HConstants.FOREVER;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/cd41083d/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/Re

hbase git commit: HBASE-16765 Amend: Make SteppingSplitPolicy the default.

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/master b7293bf5a -> c12c6ffae


HBASE-16765 Amend: Make SteppingSplitPolicy the default.


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

Branch: refs/heads/master
Commit: c12c6ffaec11ff3b702f371df4f3f7c905e07a5c
Parents: b7293bf
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:34:07 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:34:07 2016 -0700

--
 hbase-common/src/main/resources/hbase-default.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c12c6ffa/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 4f769cb..bdbe239 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -312,7 +312,7 @@ possible configurations would overwhelm and obscure the 
important.
   
   
 hbase.regionserver.region.split.policy
-
org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy
+org.apache.hadoop.hbase.regionserver.SteppingSplitPolicy
 
   A split policy determines when a region should be split. The various 
other split policies that
   are available currently are BusyRegionSplitPolicy, 
ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy,



[1/2] hbase git commit: Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables."

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 4a40b2e57 -> e1d8dcfe6


Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions 
for small tables."

This reverts commit 4a40b2e5751702dcde7ab5c58ded54ac79af6178.


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

Branch: refs/heads/branch-1.1
Commit: 9213d7194ede5b723bc817a9bb634679ee3ce5c1
Parents: 4a40b2e
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:16:22 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:16:22 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 2 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9213d719/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 71b3b36..2503658 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -43,7 +43,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy
 extends ConstantSizeRegionSplitPolicy {
   static final Log LOG =
 LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  protected long initialSize;
+  private long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -93,7 +93,7 @@ extends ConstantSizeRegionSplitPolicy {
   }
 
   /**
-   * @return Region max size or count of regions cubed * flushsize * 2, 
which ever is
+   * @return Region max size or count of regions squared * flushsize, 
which ever is
* smaller; guard against there being zero regions on this server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/9213d719/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
deleted file mode 100644
index 4f3e0f2..000
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
+++ /dev/null
@@ -1,32 +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.regionserver;
-
-public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
-  /**
-   * @return flushSize * 2 if there's exactly one region of the table in 
question
-   * found on this regionserver. Otherwise max file size.
-   * This allows a table to spread quickly across servers, while avoiding 
creating
-   * too many regions.
-   */
-  protected long getSizeToCheck(final int tableRegionsCount) {
-return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
-  }
-
-
-}



[2/2] hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/branch-1.1
Commit: e1d8dcfe6b2656947a755149678ff329a7d691ab
Parents: 9213d71
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:17:00 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:17:00 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e1d8dcfe/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 2503658..71b3b36 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -43,7 +43,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy
 extends ConstantSizeRegionSplitPolicy {
   static final Log LOG =
 LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -93,7 +93,7 @@ extends ConstantSizeRegionSplitPolicy {
   }
 
   /**
-   * @return Region max size or count of regions squared * flushsize, 
which ever is
+   * @return Region max size or count of regions cubed * flushsize * 2, 
which ever is
* smaller; guard against there being zero regions on this server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/e1d8dcfe/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



[2/2] hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/branch-1.2
Commit: 9fcd0c8d4772847f276b9f9152a831a96973e45f
Parents: e5349d5
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:15:45 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:15:45 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9fcd0c8d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 7144cb8..ff68110 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * flushsize},
+   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/9fcd0c8d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



[1/2] hbase git commit: Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables."

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 2447d87b5 -> 9fcd0c8d4


Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions 
for small tables."

This reverts commit 2447d87b56ad087dcf92c1245a34d26ffe59a4bc.


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

Branch: refs/heads/branch-1.2
Commit: e5349d589c000e395e12340e003aa9e2153afea6
Parents: 2447d87
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:15:13 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:15:13 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 2 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e5349d58/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index ff68110..7144cb8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  protected long initialSize;
+  private long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
+   * @return Region max size or {@code count of regions cubed * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/e5349d58/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
deleted file mode 100644
index 4f3e0f2..000
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
+++ /dev/null
@@ -1,32 +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.regionserver;
-
-public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
-  /**
-   * @return flushSize * 2 if there's exactly one region of the table in 
question
-   * found on this regionserver. Otherwise max file size.
-   * This allows a table to spread quickly across servers, while avoiding 
creating
-   * too many regions.
-   */
-  protected long getSizeToCheck(final int tableRegionsCount) {
-return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
-  }
-
-
-}



[1/2] hbase git commit: Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables."

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 e1eb914f2 -> e14d7cc31


Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions 
for small tables."

This reverts commit e1eb914f21305ea0e2e8a784a187efd11d0d8ca0.


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

Branch: refs/heads/branch-1.3
Commit: bd2c03dc7df600fe481ba7f2fed958deb18f5291
Parents: e1eb914
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:13:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:13:32 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 2 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bd2c03dc/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index ff68110..7144cb8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  protected long initialSize;
+  private long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
+   * @return Region max size or {@code count of regions cubed * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd2c03dc/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
deleted file mode 100644
index 4f3e0f2..000
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
+++ /dev/null
@@ -1,32 +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.regionserver;
-
-public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
-  /**
-   * @return flushSize * 2 if there's exactly one region of the table in 
question
-   * found on this regionserver. Otherwise max file size.
-   * This allows a table to spread quickly across servers, while avoiding 
creating
-   * too many regions.
-   */
-  protected long getSizeToCheck(final int tableRegionsCount) {
-return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
-  }
-
-
-}



[2/2] hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/branch-1.3
Commit: e14d7cc31b20b4dc6f025952b265b4593636df7e
Parents: bd2c03d
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:14:03 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:14:03 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e14d7cc3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 7144cb8..ff68110 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * flushsize},
+   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/e14d7cc3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



[1/2] hbase git commit: Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables."

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/master 791052c50 -> b7293bf5a


Revert "New SteppingRegionSplitPolicy, avoid too aggressive spread of regions 
for small tables."

This reverts commit 791052c50a902bda35aed30d6421fb09538119fd.


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

Branch: refs/heads/master
Commit: 1c07d1d59187910dd74cfd62137754cb477bc98a
Parents: 791052c
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:11:31 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:11:31 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 2 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1c07d1d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index ff68110..7144cb8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  protected long initialSize;
+  private long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
+   * @return Region max size or {@code count of regions cubed * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/1c07d1d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
deleted file mode 100644
index 4f3e0f2..000
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
+++ /dev/null
@@ -1,32 +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.regionserver;
-
-public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
-  /**
-   * @return flushSize * 2 if there's exactly one region of the table in 
question
-   * found on this regionserver. Otherwise max file size.
-   * This allows a table to spread quickly across servers, while avoiding 
creating
-   * too many regions.
-   */
-  protected long getSizeToCheck(final int tableRegionsCount) {
-return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
-  }
-
-
-}



[2/2] hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/master
Commit: b7293bf5ad7263b2d835c565f59fe1ccb38d23c7
Parents: 1c07d1d
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:12:21 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:12:21 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b7293bf5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 7144cb8..ff68110 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * flushsize},
+   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b7293bf5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/0.98 202405233 -> 4e12c5529


HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/0.98
Commit: 4e12c552950dc09d49a24012e9ccb44046ea323b
Parents: 2024052
Author: Lars Hofhansl 
Authored: Tue Nov 1 13:09:52 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:09:52 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4e12c552/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 7fbb73f..79b740c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -43,7 +43,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy
 extends ConstantSizeRegionSplitPolicy {
   static final Log LOG =
 LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -93,7 +93,7 @@ extends ConstantSizeRegionSplitPolicy {
   }
 
   /**
-   * @return Region max size or count of regions squared * flushsize, 
which ever is
+   * @return Region max size or count of regions cubed * flushsize * 2, 
which ever is
* smaller; guard against there being zero regions on this server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4e12c552/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



hbase git commit: HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of regions for small tables.

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/branch-1 5fdddae55 -> 6113f9a34


HBASE-16765 New SteppingRegionSplitPolicy, avoid too aggressive spread of 
regions for small tables.


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

Branch: refs/heads/branch-1
Commit: 6113f9a34f58a9a37d5611477e32a594f8fd68a9
Parents: 5fdddae
Author: Lars Hofhansl 
Authored: Tue Nov 1 12:21:27 2016 -0700
Committer: Lars Hofhansl 
Committed: Tue Nov 1 13:07:12 2016 -0700

--
 ...IncreasingToUpperBoundRegionSplitPolicy.java |  4 +--
 .../hbase/regionserver/SteppingSplitPolicy.java | 32 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6113f9a3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
index 7144cb8..ff68110 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java
@@ -45,7 +45,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 public class IncreasingToUpperBoundRegionSplitPolicy extends 
ConstantSizeRegionSplitPolicy {
 
   private static final Log LOG = 
LogFactory.getLog(IncreasingToUpperBoundRegionSplitPolicy.class);
-  private long initialSize;
+  protected long initialSize;
 
   @Override
   protected void configureForRegion(HRegion region) {
@@ -116,7 +116,7 @@ public class IncreasingToUpperBoundRegionSplitPolicy 
extends ConstantSizeRegionS
   }
 
   /**
-   * @return Region max size or {@code count of regions cubed * flushsize},
+   * @return Region max size or {@code count of regions cubed * 2 * flushsize},
* which ever is smaller; guard against there being zero regions on this 
server.
*/
   protected long getSizeToCheck(final int tableRegionsCount) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/6113f9a3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
new file mode 100644
index 000..4f3e0f2
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SteppingSplitPolicy.java
@@ -0,0 +1,32 @@
+/**
+ * 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;
+
+public class SteppingSplitPolicy extends 
IncreasingToUpperBoundRegionSplitPolicy {
+  /**
+   * @return flushSize * 2 if there's exactly one region of the table in 
question
+   * found on this regionserver. Otherwise max file size.
+   * This allows a table to spread quickly across servers, while avoiding 
creating
+   * too many regions.
+   */
+  protected long getSizeToCheck(final int tableRegionsCount) {
+return tableRegionsCount == 1  ? this.initialSize : 
getDesiredMaxFileSize();
+  }
+
+
+}



[28/50] hbase git commit: HBASE-13963 Do not leak jdk.tools dependency from hbase-annotations

2016-11-01 Thread larsh
HBASE-13963 Do not leak jdk.tools dependency from hbase-annotations

Signed-off-by: Sean Busbey 

Conflicts:
hbase-common/pom.xml


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

Branch: refs/heads/branch-1.0
Commit: 7947de62853794354dc423c72d1496081af0ef16
Parents: c4c50a5
Author: Gábor Lipták 
Authored: Wed Jun 24 22:10:13 2015 -0400
Committer: Sean Busbey 
Committed: Tue Mar 8 10:11:14 2016 -0800

--
 hbase-client/pom.xml | 6 ++
 hbase-common/pom.xml | 6 ++
 hbase-examples/pom.xml   | 6 ++
 hbase-hadoop2-compat/pom.xml | 6 ++
 hbase-protocol/pom.xml   | 6 ++
 hbase-rest/pom.xml   | 6 ++
 hbase-testing-util/pom.xml   | 6 ++
 7 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-client/pom.xml
--
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index 770b60c..bce9030 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -109,6 +109,12 @@
 
   org.apache.hbase
   hbase-annotations
+  
+
+  jdk.tools
+  jdk.tools
+
+  
 
 
   org.apache.hbase

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-common/pom.xml
--
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index 260b268..746ad93 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -225,6 +225,12 @@
 
   org.apache.hbase
   hbase-annotations
+  
+
+  jdk.tools
+  jdk.tools
+
+  
 
 
   org.apache.hbase

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-examples/pom.xml
--
diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml
index 24af59e..426b6ed 100644
--- a/hbase-examples/pom.xml
+++ b/hbase-examples/pom.xml
@@ -264,6 +264,12 @@ if we can combine these profiles somehow -->
  
  org.apache.hadoop
  hadoop-annotations
+ 
+   
+ jdk.tools
+ jdk.tools
+   
+ 
  
  
  org.apache.hadoop

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-hadoop2-compat/pom.xml
--
diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml
index 5198e5e..6f7c859 100644
--- a/hbase-hadoop2-compat/pom.xml
+++ b/hbase-hadoop2-compat/pom.xml
@@ -143,6 +143,12 @@ limitations under the License.
 
   org.apache.hbase
   hbase-annotations
+  
+
+  jdk.tools
+  jdk.tools
+
+  
 
 
   org.apache.hbase

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-protocol/pom.xml
--
diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml
index b805a96..eb8ec96 100644
--- a/hbase-protocol/pom.xml
+++ b/hbase-protocol/pom.xml
@@ -110,6 +110,12 @@
   
 org.apache.hbase
 hbase-annotations
+
+  
+jdk.tools
+jdk.tools
+  
+
   
   
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-rest/pom.xml
--
diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml
index e75d215..ea60655 100644
--- a/hbase-rest/pom.xml
+++ b/hbase-rest/pom.xml
@@ -189,6 +189,12 @@
 
   org.apache.hbase
   hbase-annotations
+  
+
+  jdk.tools
+  jdk.tools
+
+  
 
 
   org.apache.hbase

http://git-wip-us.apache.org/repos/asf/hbase/blob/7947de62/hbase-testing-util/pom.xml
--
diff --git a/hbase-testing-util/pom.xml b/hbase-testing-util/pom.xml
index e7249d4..2fdbdaf 100644
--- a/hbase-testing-util/pom.xml
+++ b/hbase-testing-util/pom.xml
@@ -59,6 +59,12 @@
 hbase-annotations
 test-jar
 compile
+
+
+jdk.tools
+jdk.tools
+
+
 
 
 org.apache.hbase



[12/50] hbase git commit: HBASE-15019 Replication stuck when HDFS is restarted.

2016-11-01 Thread larsh
HBASE-15019 Replication stuck when HDFS is restarted.


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

Branch: refs/heads/branch-1.0
Commit: 9c42beaa3423e1476aa87e56f59168ed5ce0f461
Parents: ed2dbda
Author: Matteo Bertozzi 
Authored: Thu Jan 21 00:05:57 2016 -0600
Committer: Matteo Bertozzi 
Committed: Thu Jan 28 09:49:54 2016 -0800

--
 .../regionserver/ReplicationSource.java | 30 +++--
 .../hbase/util/LeaseNotRecoveredException.java  | 47 
 .../org/apache/hadoop/hbase/wal/WALFactory.java |  5 ++-
 3 files changed, 78 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9c42beaa/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index f3734b2..c542502 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -53,8 +53,11 @@ import 
org.apache.hadoop.hbase.replication.ReplicationQueueInfo;
 import org.apache.hadoop.hbase.replication.ReplicationQueues;
 import org.apache.hadoop.hbase.replication.SystemTableWALEntryFilter;
 import org.apache.hadoop.hbase.replication.WALEntryFilter;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.CancelableProgressable;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSUtils;
+import org.apache.hadoop.hbase.util.LeaseNotRecoveredException;
 import org.apache.hadoop.hbase.util.Threads;
 
 import com.google.common.collect.Lists;
@@ -587,6 +590,11 @@ public class ReplicationSource extends Thread
   // TODO What happens the log is missing in both places?
 }
   }
+} catch (LeaseNotRecoveredException lnre) {
+  // HBASE-15019 the WAL was not closed due to some hiccup.
+  LOG.warn(peerClusterZnode + " Try to recover the WAL lease " + 
currentPath, lnre);
+  recoverLease(conf, currentPath);
+  this.reader = null;
 } catch (IOException ioe) {
   if (ioe instanceof EOFException && isCurrentLogEmpty()) return true;
   LOG.warn(this.peerClusterZnode + " Got: ", ioe);
@@ -606,6 +614,22 @@ public class ReplicationSource extends Thread
 return true;
   }
 
+  private void recoverLease(final Configuration conf, final Path path) {
+try {
+  final FileSystem dfs = FSUtils.getCurrentFileSystem(conf);
+  FSUtils fsUtils = FSUtils.getInstance(dfs, conf);
+  fsUtils.recoverFileLease(dfs, path, conf, new CancelableProgressable() {
+@Override
+public boolean progress() {
+  LOG.debug("recover WAL lease: " + path);
+  return isActive();
+}
+  });
+} catch (IOException e) {
+  LOG.warn("unable to recover lease for WAL: " + path, e);
+}
+  }
+
   /*
* Checks whether the current log file is empty, and it is not a recovered 
queue. This is to
* handle scenario when in an idle cluster, there is no entry in the current 
log and we keep on
@@ -857,9 +881,9 @@ public class ReplicationSource extends Thread
  * @param p path to split
  * @return start time
  */
-private long getTS(Path p) {
-  String[] parts = p.getName().split("\\.");
-  return Long.parseLong(parts[parts.length-1]);
+private static long getTS(Path p) {
+  int tsIndex = p.getName().lastIndexOf('.') + 1;
+  return Long.parseLong(p.getName().substring(tsIndex));
 }
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9c42beaa/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LeaseNotRecoveredException.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LeaseNotRecoveredException.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LeaseNotRecoveredException.java
new file mode 100644
index 000..ca769b8
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LeaseNotRecoveredException.java
@@ -0,0 +1,47 @@
+/**
+ *
+ * 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 fi

[11/50] hbase git commit: HBASE-15153 Apply checkFamilies addendum on increment to 1.1 and 1.0

2016-11-01 Thread larsh
HBASE-15153 Apply checkFamilies addendum on increment to 1.1 and 1.0


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

Branch: refs/heads/branch-1.0
Commit: ed2dbda596480753b3e9eedd025d962c3a2cd968
Parents: 24002e2
Author: stack 
Authored: Fri Jan 22 09:44:39 2016 -0800
Committer: stack 
Committed: Fri Jan 22 09:45:11 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/ed2dbda5/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 4b8f3b6..0c5dfe7 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
@@ -5836,6 +5836,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
 checkReadOnly();
 checkResources();
 checkRow(increment.getRow(), "increment");
+checkFamilies(increment.getFamilyCellMap().keySet());
 startRegionOperation(Operation.INCREMENT);
 this.writeRequestsCount.increment();
 try {
@@ -5850,7 +5851,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   // wait on mvcc to complete before returning to the client. We also 
reorder the write so that
   // the update of memstore happens AFTER sync returns; i.e. the write 
pipeline does less
   // zigzagging now.
-  // 
+  //
   // See the comment on INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY
   // for the constraints that apply when you take this code path; it is 
correct but only if
   // Increments are used mutating an Increment Cell; mixing concurrent 
Put+Delete and Increment



[03/50] hbase git commit: HBASE-15083 Gets from Multiactions are not counted in metrics for gets

2016-11-01 Thread larsh
HBASE-15083 Gets from Multiactions are not counted in metrics for gets


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

Branch: refs/heads/branch-1.0
Commit: 556741b9ea031edadd982e098ee36ee88dd0df62
Parents: f4fa859
Author: chenheng 
Authored: Tue Jan 12 14:32:55 2016 +0800
Committer: chenheng 
Committed: Tue Jan 12 14:32:55 2016 +0800

--
 .../apache/hadoop/hbase/regionserver/RSRpcServices.java | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/556741b9/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 9c6de0f..2af42fe 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
@@ -541,8 +541,16 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   try {
 Result r = null;
 if (action.hasGet()) {
-  Get get = ProtobufUtil.toGet(action.getGet());
-  r = region.get(get);
+  long before = EnvironmentEdgeManager.currentTime();
+  try {
+Get get = ProtobufUtil.toGet(action.getGet());
+r = region.get(get);
+  } finally {
+if (regionServer.metricsRegionServer != null) {
+  regionServer.metricsRegionServer.updateGet(
+EnvironmentEdgeManager.currentTime() - before);
+}
+  }
 } else if (action.hasServiceCall()) {
   resultOrExceptionBuilder = ResultOrException.newBuilder();
   try {



[17/50] hbase git commit: HBASE-15213 Fix increment performance regression caused by HBASE-8763 on branch-1.0 (Junegunn Choi)

2016-11-01 Thread larsh
HBASE-15213 Fix increment performance regression caused by HBASE-8763 on 
branch-1.0 (Junegunn Choi)

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/6c555d36
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6c555d36
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6c555d36

Branch: refs/heads/branch-1.0
Commit: 6c555d36cd9928e44281b3280e57dd5f98b63fc8
Parents: 30eb2fb
Author: stack 
Authored: Fri Feb 5 13:28:16 2016 -0800
Committer: stack 
Committed: Fri Feb 5 18:03:28 2016 -0800

--
 .../MultiVersionConsistencyControl.java | 31 +---
 1 file changed, 20 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6c555d36/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConsistencyControl.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConsistencyControl.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConsistencyControl.java
index fffd7c0..8b9f41b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConsistencyControl.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConsistencyControl.java
@@ -19,7 +19,7 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import java.io.IOException;
-import java.util.LinkedList;
+import java.util.LinkedHashSet;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -39,8 +39,8 @@ public class MultiVersionConsistencyControl {
   private final Object readWaiters = new Object();
 
   // This is the pending queue of writes.
-  private final LinkedList writeQueue =
-  new LinkedList();
+  private final LinkedHashSet writeQueue =
+  new LinkedHashSet();
 
   /**
* Default constructor. Initializes the memstoreRead/Write points to 0.
@@ -100,7 +100,14 @@ public class MultiVersionConsistencyControl {
* @return WriteEntry a WriteEntry instance with the passed in curSeqNum
*/
   public WriteEntry beginMemstoreInsertWithSeqNum(long curSeqNum) {
+return beginMemstoreInsertWithSeqNum(curSeqNum, false);
+  }
+
+  private WriteEntry beginMemstoreInsertWithSeqNum(long curSeqNum, boolean 
complete) {
 WriteEntry e = new WriteEntry(curSeqNum);
+if (complete) {
+  e.markCompleted();
+}
 synchronized (writeQueue) {
   writeQueue.add(e);
   return e;
@@ -153,11 +160,11 @@ public class MultiVersionConsistencyControl {
   e.markCompleted();
 
   while (!writeQueue.isEmpty()) {
-WriteEntry queueFirst = writeQueue.getFirst();
+WriteEntry queueFirst = writeQueue.iterator().next();
 if (queueFirst.isCompleted()) {
   // Using Max because Edit complete in WAL sync order not arriving 
order
   nextReadValue = Math.max(nextReadValue, queueFirst.getWriteNumber());
-  writeQueue.removeFirst();
+  writeQueue.remove(queueFirst);
 } else {
   break;
 }
@@ -199,27 +206,31 @@ public class MultiVersionConsistencyControl {
* Wait for all previous MVCC transactions complete
*/
   public void waitForPreviousTransactionsComplete() {
-WriteEntry w = beginMemstoreInsert();
+WriteEntry w = beginMemstoreInsertWithSeqNum(NO_WRITE_NUMBER, true);
 waitForPreviousTransactionsComplete(w);
   }
 
   public void waitForPreviousTransactionsComplete(WriteEntry waitedEntry) {
 boolean interrupted = false;
 WriteEntry w = waitedEntry;
+w.markCompleted();
 
 try {
   WriteEntry firstEntry = null;
   do {
 synchronized (writeQueue) {
-  // writeQueue won't be empty at this point, the following is just a 
safety check
   if (writeQueue.isEmpty()) {
 break;
   }
-  firstEntry = writeQueue.getFirst();
+  firstEntry = writeQueue.iterator().next();
   if (firstEntry == w) {
 // all previous in-flight transactions are done
 break;
   }
+  // WriteEntry already was removed from the queue by another handler
+  if (!writeQueue.contains(w)) {
+break;
+  }
   try {
 writeQueue.wait(0);
   } catch (InterruptedException ie) {
@@ -231,9 +242,7 @@ public class MultiVersionConsistencyControl {
 }
   } while (firstEntry != null);
 } finally {
-  if (w != null) {
-advanceMemstore(w);
-  }
+  advanceMemstore(w);
 }
 if (interrupted) {
   Thread.currentThread().interrupt();



[50/50] hbase git commit: HBASE-16562 ITBLL should fail to start if misconfigured

2016-11-01 Thread larsh
HBASE-16562 ITBLL should fail to start if misconfigured


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

Branch: refs/heads/branch-1.0
Commit: a55842a0a86040545eff6692317191acb84032ae
Parents: fba13a6
Author: chenheng 
Authored: Tue Sep 6 11:02:18 2016 +0800
Committer: chenheng 
Committed: Wed Sep 7 16:04:18 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/a55842a0/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 99be272..b0c5371 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
@@ -239,6 +239,11 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 
 private static final Log LOG = LogFactory.getLog(Generator.class);
 
+public static final String USAGE =  "Usage : " + 
Generator.class.getSimpleName() +
+"[ 
 \n" +
+"where  should be a multiple of width*wrap 
multiplier, " +
+"25M by default \n";
+
 static class GeneratorInputFormat extends 
InputFormat {
   static class GeneratorInputSplit extends InputSplit implements Writable {
 @Override
@@ -461,21 +466,20 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 @Override
 public int run(String[] args) throws Exception {
   if (args.length < 3) {
-System.out.println("Usage : " + Generator.class.getSimpleName() +
-"[ 
]");
-System.out.println("   where  should be a multiple 
of " +
-" width*wrap multiplier, 25M by default");
-return 0;
+System.err.println(USAGE);
+return 1;
   }
 
   int numMappers = Integer.parseInt(args[0]);
   long numNodes = Long.parseLong(args[1]);
   Path tmpOutput = new Path(args[2]);
   Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
-  Integer wrapMuplitplier = (args.length < 5) ? null : 
Integer.parseInt(args[4]);
-  return run(numMappers, numNodes, tmpOutput, width, wrapMuplitplier);
+  Integer wrapMultiplier = (args.length < 5) ? null : 
Integer.parseInt(args[4]);
+  return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier);
 }
 
+
+
 protected void createSchema() throws IOException {
   Configuration conf = getConf();
   Admin admin = new HBaseAdmin(conf);
@@ -575,12 +579,22 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 }
 
 public int run(int numMappers, long numNodes, Path tmpOutput,
-Integer width, Integer wrapMuplitplier) throws Exception {
-  int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, 
width, wrapMuplitplier);
+Integer width, Integer wrapMultiplier) throws Exception {
+  long wrap = (long)width*wrapMultiplier;
+  if (wrap < numNodes && numNodes % wrap != 0) {
+/**
+ *  numNodes should be a multiple of width*wrapMultiplier.
+ *  If numNodes less than wrap, wrap will be set to be equal with 
numNodes,
+ *  See {@link GeneratorMapper#setup(Mapper.Context)}
+ * */
+System.err.println(USAGE);
+return 1;
+  }
+  int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, 
width, wrapMultiplier);
   if (ret > 0) {
 return ret;
   }
-  return runGenerator(numMappers, numNodes, tmpOutput, width, 
wrapMuplitplier);
+  return runGenerator(numMappers, numNodes, tmpOutput, width, 
wrapMultiplier);
 }
   }
 



[14/50] hbase git commit: HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname

2016-11-01 Thread larsh
HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname

Conflicts:

hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java


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

Branch: refs/heads/branch-1.0
Commit: b43442c58a1a66f1c17f889c081fea159caaebf5
Parents: 5c2022f
Author: Andrew Purtell 
Authored: Mon Feb 1 09:48:16 2016 -0800
Committer: Andrew Purtell 
Committed: Wed Feb 3 16:19:23 2016 -0800

--
 .../hbase/zookeeper/ZooKeeperWatcher.java   | 79 ++--
 .../java/org/apache/hadoop/hbase/AuthUtil.java  |  5 ++
 2 files changed, 78 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b43442c5/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 7b591f8..983153f 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
@@ -24,12 +24,15 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 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.ZooKeeperConnectionException;
 import org.apache.hadoop.security.UserGroupInformation;
@@ -126,6 +129,9 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
 
   private final Exception constructorCaller;
 
+  /* A pattern that matches a Kerberos name, borrowed from Hadoop's 
KerberosName */
+  private static final Pattern NAME_PATTERN = 
Pattern.compile("([^/@]*)(/([^/@]*))?@([^/@]*)");
+
   /**
* Instantiate a ZooKeeper connection and watcher.
* @param identifier string that is passed to RecoverableZookeeper to be 
used as
@@ -218,6 +224,7 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
*/
   public void checkAndSetZNodeAcls() {
 if (!ZKUtil.isSecureZooKeeper(getConfiguration())) {
+  LOG.info("not a secure deployment, proceeding");
   return;
 }
 
@@ -262,13 +269,23 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
* @throws IOException
*/
   private boolean isBaseZnodeAclSetup(List acls) throws IOException {
-String superUser = conf.get("hbase.superuser");
+if (LOG.isDebugEnabled()) {
+  LOG.debug("Checking znode ACLs");
+}
+String superUser = conf.get(AuthUtil.SUPERUSER_CONF_KEY);
+// Check whether ACL set for all superusers
+if (superUser != null && !checkACLForSuperUsers(new String[] { superUser 
}, acls)) {
+  return false;
+}
 
 // this assumes that current authenticated user is the same as zookeeper 
client user
 // configured via JAAS
 String hbaseUser = 
UserGroupInformation.getCurrentUser().getShortUserName();
 
 if (acls.isEmpty()) {
+  if (LOG.isDebugEnabled()) {
+LOG.debug("ACL is empty");
+  }
   return false;
 }
 
@@ -279,23 +296,73 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
   // and one for the hbase user
   if (Ids.ANYONE_ID_UNSAFE.equals(id)) {
 if (perms != Perms.READ) {
+  if (LOG.isDebugEnabled()) {
+LOG.debug(String.format("permissions for '%s' are not correct: 
have %0x, want %0x",
+  id, perms, Perms.READ));
+  }
   return false;
 }
-  } else if (superUser != null && new Id("sasl", superUser).equals(id)) {
-if (perms != Perms.ALL) {
-  return false;
+  } else if ("sasl".equals(id.getScheme())) {
+String name = id.getId();
+// If ZooKeeper recorded the Kerberos full name in the ACL, use only 
the shortname
+Matcher match = NAME_PATTERN.matcher(name);
+if (match.matches()) {
+  name = match.group(1);
 }
-  } else if (new Id("sasl", hbaseUser).equals(id)) {
-if (perms != Perms.ALL) {
+if (name.equals(hbaseUser)) {
+  if (perms != Perms.A

[16/50] hbase git commit: HBASE-15218 On RS crash and replay of WAL, loosing all Tags in Cells (Anoop Sam John)

2016-11-01 Thread larsh
HBASE-15218 On RS crash and replay of WAL, loosing all Tags in Cells (Anoop Sam 
John)


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

Branch: refs/heads/branch-1.0
Commit: 30eb2fb265759f8df8fd6729a3cd137d841631f1
Parents: 7f42fcd
Author: stack 
Authored: Fri Feb 5 10:09:13 2016 -0800
Committer: stack 
Committed: Fri Feb 5 10:10:26 2016 -0800

--
 .../regionserver/wal/SecureWALCellCodec.java|  6 +++---
 .../hbase/regionserver/wal/WALCellCodec.java|  4 ++--
 ...ibilityLabelsWithDefaultVisLabelService.java | 22 
 3 files changed, 27 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/30eb2fb2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureWALCellCodec.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureWALCellCodec.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureWALCellCodec.java
index 69181e5..603496f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureWALCellCodec.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureWALCellCodec.java
@@ -30,7 +30,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.codec.KeyValueCodec;
+import org.apache.hadoop.hbase.codec.KeyValueCodecWithTags;
 import org.apache.hadoop.hbase.io.crypto.Decryptor;
 import org.apache.hadoop.hbase.io.crypto.Encryption;
 import org.apache.hadoop.hbase.io.crypto.Encryptor;
@@ -60,7 +60,7 @@ public class SecureWALCellCodec extends WALCellCodec {
 this.decryptor = decryptor;
   }
 
-  static class EncryptedKvDecoder extends KeyValueCodec.KeyValueDecoder {
+  static class EncryptedKvDecoder extends 
KeyValueCodecWithTags.KeyValueDecoder {
 
 private Decryptor decryptor;
 private byte[] iv;
@@ -142,7 +142,7 @@ public class SecureWALCellCodec extends WALCellCodec {
 
   }
 
-  static class EncryptedKvEncoder extends KeyValueCodec.KeyValueEncoder {
+  static class EncryptedKvEncoder extends 
KeyValueCodecWithTags.KeyValueEncoder {
 
 private Encryptor encryptor;
 private final ThreadLocal iv = new ThreadLocal() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/30eb2fb2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
index 9389479..05d733d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALCellCodec.java
@@ -31,7 +31,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.codec.BaseDecoder;
 import org.apache.hadoop.hbase.codec.BaseEncoder;
 import org.apache.hadoop.hbase.codec.Codec;
-import org.apache.hadoop.hbase.codec.KeyValueCodec;
+import org.apache.hadoop.hbase.codec.KeyValueCodecWithTags;
 import org.apache.hadoop.hbase.io.util.Dictionary;
 import org.apache.hadoop.hbase.io.util.StreamUtils;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -342,7 +342,7 @@ public class WALCellCodec implements Codec {
   @Override
   public Decoder getDecoder(InputStream is) {
 return (compression == null)
-? new KeyValueCodec.KeyValueDecoder(is) : new CompressedKvDecoder(is, 
compression);
+? new KeyValueCodecWithTags.KeyValueDecoder(is) : new 
CompressedKvDecoder(is, compression);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/30eb2fb2/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
index 3cca329..5f2505c 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels

[34/50] hbase git commit: HBASE-15693 Reconsider the ImportOrder rule of checkstyle

2016-11-01 Thread larsh
HBASE-15693 Reconsider the ImportOrder rule of checkstyle


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

Branch: refs/heads/branch-1.0
Commit: 0b20b27e56aeb0a9b602c39fc13bfeddad11bdee
Parents: a74c495
Author: zhangduo 
Authored: Sun Apr 24 11:09:50 2016 +0800
Committer: zhangduo 
Committed: Sun Apr 24 11:10:38 2016 +0800

--
 .../src/main/resources/hbase/checkstyle.xml | 82 
 1 file changed, 66 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0b20b27e/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml
--
diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml
index 34fe5ec..b423095 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml
@@ -32,29 +32,79 @@
 
   
   
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
 
+
+  
+  
+  
+
 
-
+
+  
+
+
+
+
+  
+
+
+
+
+
+
+  
+  
+  
+  
+  
+
+
+
 
   
-  ftp://"/>
+  
 
 
+
+
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
   
 



[06/50] hbase git commit: HBASE-15108 TestReplicationAdmin failed on branch-1.0

2016-11-01 Thread larsh
HBASE-15108 TestReplicationAdmin failed on branch-1.0


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

Branch: refs/heads/branch-1.0
Commit: ae8f0900fb49b222c8359256022035841b3eb53d
Parents: 9277293
Author: chenheng 
Authored: Fri Jan 15 09:49:37 2016 +0800
Committer: chenheng 
Committed: Fri Jan 15 09:49:37 2016 +0800

--
 .../client/replication/TestReplicationAdmin.java  | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ae8f0900/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
index 1a5dd33..d4cebd8 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
@@ -175,14 +175,28 @@ public class TestReplicationAdmin {
 
 // append table t2 to replication
 admin.appendPeerTableCFs(ID_ONE, "t2");
-assertEquals("t2;t1", admin.getPeerTableCFs(ID_ONE));
+String peerTablesOne = admin.getPeerTableCFs(ID_ONE);
+
+// Different jdk's return different sort order for the tables. ( Not sure 
on why exactly )
+//
+// So instead of asserting that the string is exactly we
+// assert that the string contains all tables and the needed separator.
+assertTrue("Should contain t1", peerTablesOne.contains("t1"));
+assertTrue("Should contain t2", peerTablesOne.contains("t2"));
+assertTrue("Should contain ; as the seperator", 
peerTablesOne.contains(";"));
 
 // append table column family: f1 of t3 to replication
 admin.appendPeerTableCFs(ID_ONE, "t3:f1");
-assertEquals("t3:f1;t2;t1", admin.getPeerTableCFs(ID_ONE));
+String peerTablesTwo = admin.getPeerTableCFs(ID_ONE);
+assertTrue("Should contain t1", peerTablesTwo.contains("t1"));
+assertTrue("Should contain t2", peerTablesTwo.contains("t2"));
+assertTrue("Should contain t3:f1", peerTablesTwo.contains("t3:f1"));
+assertTrue("Should contain ; as the seperator", 
peerTablesTwo.contains(";"));
 admin.removePeer(ID_ONE);
+
   }
 
+
   @Test
   public void testRemovePeerTableCFs() throws Exception {
 // Add a valid peer



[25/50] hbase git commit: HBASE-15122 Servlets generate XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER findbugs warnings (Samir Ahmic)

2016-11-01 Thread larsh
HBASE-15122 Servlets generate XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER findbugs 
warnings (Samir Ahmic)

Conflicts:
pom.xml


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

Branch: refs/heads/branch-1.0
Commit: f280c45956d01639756b04757e74229f486e6a8f
Parents: 21ab184
Author: chenheng 
Authored: Mon Feb 15 13:52:37 2016 +0800
Committer: chenheng 
Committed: Mon Feb 15 14:01:26 2016 +0800

--
 .../src/main/resources/supplemental-models.xml  |  36 ++
 hbase-server/pom.xml|  11 +
 .../hadoop/hbase/http/jmx/JMXJsonServlet.java   |   8 +-
 .../src/main/resources/ESAPI.properties | 431 +++
 .../hbase/http/jmx/TestJMXJsonServlet.java  |   6 +
 .../src/test/resources/ESAPI.properties | 431 +++
 pom.xml |   1 +
 7 files changed, 923 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f280c459/hbase-resource-bundle/src/main/resources/supplemental-models.xml
--
diff --git a/hbase-resource-bundle/src/main/resources/supplemental-models.xml 
b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
index faa7887..a27ecd7 100644
--- a/hbase-resource-bundle/src/main/resources/supplemental-models.xml
+++ b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
@@ -61,6 +61,24 @@ under the License.
   
 
   
+  
+
+  commons-beanutils
+  commons-beanutils-core
+
+  
+The Apache Software Foundation
+http://www.apache.org/
+  
+  
+
+  Apache Software License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
+
+  
 
   
 
@@ -1292,4 +1310,22 @@ Copyright (c) 2007-2011 The JRuby project
   
 
   
+  
+
+  xalan
+  xalan
+
+  
+The Apache Software Foundation
+http://www.apache.org/
+  
+  
+
+  The Apache Software License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
+
+  
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/f280c459/hbase-server/pom.xml
--
diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml
index babc96a..28433b5 100644
--- a/hbase-server/pom.xml
+++ b/hbase-server/pom.xml
@@ -541,6 +541,17 @@
   bcprov-jdk16
   test
 
+
+  org.owasp.esapi
+  esapi
+  2.1.0
+  
+
+  xercesImpl
+  xerces
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/f280c459/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
index b6e97a8..5573f2b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
@@ -38,6 +38,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.http.HttpServer;
 import org.apache.hadoop.hbase.util.JSONBean;
+import org.owasp.esapi.ESAPI;
 
 /*
  * This servlet is based off of the JMXProxyServlet from Tomcat 7.0.14. It has
@@ -160,7 +161,7 @@ public class JMXJsonServlet extends HttpServlet {
 jsonpcb = request.getParameter(CALLBACK_PARAM);
 if (jsonpcb != null) {
   response.setContentType("application/javascript; charset=utf8");
-  writer.write(jsonpcb + "(");
+  writer.write(encodeJS(jsonpcb) + "(");
 } else {
   response.setContentType("application/json; charset=utf8");
 }
@@ -213,4 +214,9 @@ public class JMXJsonServlet extends HttpServlet {
   response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
 }
   }
+
+  private String encodeJS(String inputStr) {
+return ESAPI.encoder().encodeForJavaScript(inputStr);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/f280c459/hbase-server/src/main/resources/ESAPI.properties
--
diff --git a/hbase-server/src/main/resources/ESAPI.properties 
b/hbase-server/src/main/resources/ESAPI.properties
new file mode 100644
index 000..9074001
--- /dev/null
+++ b/hbase-server

[23/50] hbase git commit: HBASE-15129 Set default value for hbase.fs.tmp.dir rather than fully depend on hbase-default.xml (Yu Li)

2016-11-01 Thread larsh
HBASE-15129 Set default value for hbase.fs.tmp.dir rather than fully depend on 
hbase-default.xml (Yu Li)

Conflicts:

hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java


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

Branch: refs/heads/branch-1.0
Commit: e521b51e406e7a60d50b82d1fb3361e1a9c5880a
Parents: 8f064d4
Author: Enis Soztutar 
Authored: Tue Feb 2 16:18:26 2016 -0800
Committer: Nick Dimiduk 
Committed: Thu Feb 11 09:22:33 2016 -0800

--
 .../org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java | 8 ++--
 .../src/main/java/org/apache/hadoop/hbase/HConstants.java| 5 +
 .../apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java| 5 -
 .../hadoop/hbase/mapreduce/TestHFileOutputFormat2.java   | 3 ++-
 4 files changed, 17 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e521b51e/hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java
index 04bfbb5..5af6891 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/security/SecureBulkLoadUtil.java
@@ -18,9 +18,10 @@
  */
 package org.apache.hadoop.hbase.security;
 
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.util.Bytes;
 
 @InterfaceAudience.Private
@@ -37,6 +38,9 @@ public class SecureBulkLoadUtil {
   }
 
   public static Path getBaseStagingDir(Configuration conf) {
-return new Path(conf.get(BULKLOAD_STAGING_DIR));
+String hbaseTmpFsDir =
+conf.get(HConstants.TEMPORARY_FS_DIRECTORY_KEY,
+  HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY);
+return new Path(conf.get(BULKLOAD_STAGING_DIR, hbaseTmpFsDir));
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/e521b51e/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 68680b8..f1f3e1a 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1187,6 +1187,11 @@ public final class HConstants {
   public static final String ZK_SERVER_KERBEROS_PRINCIPAL =
   "hbase.zookeeper.server.kerberos.principal";  
 
+  /** Config key for hbase temporary directory in hdfs */
+  public static final String TEMPORARY_FS_DIRECTORY_KEY = "hbase.fs.tmp.dir";
+  public static final String DEFAULT_TEMPORARY_HDFS_DIRECTORY = "/user/"
+  + System.getProperty("user.name") + "/hbase-staging";
+
   private HConstants() {
 // Can't be instantiated with this ctor.
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/e521b51e/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 41a540b..7230f3c 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
@@ -568,7 +568,10 @@ public class HFileOutputFormat2
 Configuration conf = job.getConfiguration();
 // create the partitions file
 FileSystem fs = FileSystem.get(conf);
-Path partitionsPath = new Path(conf.get("hbase.fs.tmp.dir"), "partitions_" 
+ UUID.randomUUID());
+String hbaseTmpFsDir =
+conf.get(HConstants.TEMPORARY_FS_DIRECTORY_KEY,
+  HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY);
+Path partitionsPath = new Path(hbaseTmpFsDir, "partitions_" + 
UUID.randomUUID());
 fs.makeQualified(partitionsPath);
 writePartitions(conf, partitionsPath, splitPoints);
 fs.deleteOnExit(partitionsPath);

http://git-wip-us.apache.org/repos/asf/hbase/blob/e521b51e/hbase-server/src/test/java/org/apach

[44/50] hbase git commit: HBASE-16180 Fix ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD findbugs introduced by parent

2016-11-01 Thread larsh
HBASE-16180 Fix ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD findbugs introduced by 
parent


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

Branch: refs/heads/branch-1.0
Commit: fb9a64816d6a19c2a9de3b91c5c145c2f62ca698
Parents: 14d0bef
Author: stack 
Authored: Tue Jul 5 15:43:56 2016 -0700
Committer: stack 
Committed: Wed Jul 6 09:13:12 2016 -0700

--
 .../main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/fb9a6481/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
index edab0dc..7e6e4a2 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
@@ -46,6 +46,8 @@ import org.apache.hadoop.io.Writable;
  * Writes HFile format version 2.
  */
 @InterfaceAudience.Private
+@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD",
+  justification="Understood but doing it anyway; HBASE-14730")
 public class HFileWriterV2 extends AbstractHFileWriter {
   static final Log LOG = LogFactory.getLog(HFileWriterV2.class);
 



[22/50] hbase git commit: HBASE-15198 RPC client not using Codec and CellBlock for puts by default-addendum.

2016-11-01 Thread larsh
HBASE-15198 RPC client not using Codec and CellBlock for puts by 
default-addendum.


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

Branch: refs/heads/branch-1.0
Commit: 8f064d47785dac99b69cc16c50fe26a6203970f2
Parents: 62206fd
Author: anoopsjohn 
Authored: Thu Feb 11 20:00:02 2016 +0530
Committer: anoopsjohn 
Committed: Thu Feb 11 20:00:02 2016 +0530

--
 .../java/org/apache/hadoop/hbase/client/TestAsyncProcess.java   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8f064d47/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
--
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
index ce7e2f3..cbd3ffc 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
@@ -353,6 +353,11 @@ public class TestAsyncProcess {
 byte[] row, boolean useCache, boolean retry, int replicaId) throws 
IOException {
   return new RegionLocations(loc1);
 }
+
+@Override
+public boolean hasCellBlockSupport() {
+  return false;
+}
   }
 
   /**



[41/50] hbase git commit: HBASE-15801 Upgrade checkstyle for all branches

2016-11-01 Thread larsh
HBASE-15801 Upgrade checkstyle for all branches


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

Branch: refs/heads/branch-1.0
Commit: edc0a171f1e449ffe2b2749f53dcbe76d067acbd
Parents: a3e77bf
Author: zhangduo 
Authored: Mon May 9 14:42:27 2016 +0800
Committer: zhangduo 
Committed: Mon May 9 15:35:14 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/edc0a171/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 1ab1f58..1ced55c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -781,13 +781,18 @@
 
   org.apache.maven.plugins
   maven-checkstyle-plugin
-  2.13
+  2.17
   
 
   org.apache.hbase
   hbase-checkstyle
   ${project.version}
 
+
+  com.puppycrawl.tools
+  checkstyle
+  ${checkstyle.version}
+
   
   
 hbase/checkstyle.xml
@@ -902,6 +907,11 @@
 hbase-checkstyle
 ${project.version}
   
+  
+com.puppycrawl.tools
+checkstyle
+${checkstyle.version}
+  
 
 
   hbase/checkstyle.xml
@@ -1174,6 +1184,7 @@
 1.6
 2.3.4
 1.3.9-1
+6.18
 2.9
 1.5.2.1
 
@@ -2455,7 +2466,7 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-2.13
+2.17
 
   hbase/checkstyle.xml
   
hbase/checkstyle-suppressions.xml



[04/50] [abbrv] hbase git commit: HBASE-16661 Add last major compaction age to per-region metrics

2016-11-01 Thread larsh
HBASE-16661 Add last major compaction age to per-region metrics

Signed-off-by: Gary Helmling 


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

Branch: refs/heads/branch-1
Commit: 59ca4dad70cee46314c992766fd9303d1e41ee2c
Parents: 66038b8
Author: Dustin Pho 
Authored: Sat Sep 24 14:58:37 2016 -0700
Committer: Gary Helmling 
Committed: Mon Oct 10 15:21:53 2016 -0700

--
 .../hbase/regionserver/MetricsRegionSource.java|  2 ++
 .../hbase/regionserver/MetricsRegionWrapper.java   |  5 +
 .../regionserver/MetricsRegionSourceImpl.java  |  4 
 .../regionserver/TestMetricsRegionSourceImpl.java  |  5 +
 .../apache/hadoop/hbase/regionserver/HRegion.java  |  9 +++--
 .../regionserver/MetricsRegionWrapperImpl.java | 17 +
 .../apache/hadoop/hbase/regionserver/Region.java   |  4 ++--
 .../regionserver/MetricsRegionWrapperStub.java |  5 +
 8 files changed, 43 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/59ca4dad/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSource.java
--
diff --git 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSource.java
 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSource.java
index 911c757..12ef07c 100644
--- 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSource.java
+++ 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSource.java
@@ -29,10 +29,12 @@ public interface MetricsRegionSource extends 
Comparable {
   String SIZE_VALUE_NAME = "size";
   String COMPACTIONS_COMPLETED_COUNT = "compactionsCompletedCount";
   String COMPACTIONS_FAILED_COUNT = "compactionsFailedCount";
+  String LAST_MAJOR_COMPACTION_AGE = "lastMajorCompactionAge";
   String NUM_BYTES_COMPACTED_COUNT = "numBytesCompactedCount";
   String NUM_FILES_COMPACTED_COUNT = "numFilesCompactedCount";
   String COMPACTIONS_COMPLETED_DESC = "Number of compactions that have 
completed.";
   String COMPACTIONS_FAILED_DESC = "Number of compactions that have failed.";
+  String LAST_MAJOR_COMPACTION_DESC = "Age of the last major compaction in 
milliseconds.";
   String  NUM_BYTES_COMPACTED_DESC =
   "Sum of filesize on all files entering a finished, successful or 
aborted, compaction";
   String NUM_FILES_COMPACTED_DESC =

http://git-wip-us.apache.org/repos/asf/hbase/blob/59ca4dad/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
--
diff --git 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
index 0482d2a..9b7acd3 100644
--- 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
+++ 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
@@ -101,6 +101,11 @@ public interface MetricsRegionWrapper {
   long getNumCompactionsCompleted();
 
   /**
+   *  @return Age of the last major compaction
+   */
+  long getLastMajorCompactionAge();
+
+  /**
* Returns the total number of compactions that have been reported as failed 
on this region.
* Note that a given compaction can be reported as both completed and failed 
if an exception
* is thrown in the processing after {@code HRegion.compact()}.

http://git-wip-us.apache.org/repos/asf/hbase/blob/59ca4dad/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java
--
diff --git 
a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java
 
b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java
index ae579cf..16f36bb 100644
--- 
a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java
+++ 
b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java
@@ -269,6 +269,10 @@ public class MetricsRegionSourceImpl implements 
MetricsRegionSource {
   MetricsRegionSource.COMPACTIONS_FAILED_DESC),
   this.regionWrapper.getNumCompactionsFailed());
   mrb.addCounter(Interns.info(
+  regionNamePrefix + MetricsRegionSource.LAST_MAJOR_COMPACTION_AGE,

[26/50] [abbrv] hbase git commit: HBASE-16653 Backport HBASE-11393 to branches which support namespace

2016-11-01 Thread larsh
HBASE-16653 Backport HBASE-11393 to branches which support namespace

Signed-off-by: chenheng 


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

Branch: refs/heads/branch-1
Commit: 66941910bd07462fe496c5bbb591f4071f77b8fb
Parents: 6df7554
Author: Guanghao Zhang 
Authored: Mon Sep 26 19:33:43 2016 +0800
Committer: chenheng 
Committed: Tue Oct 18 09:12:47 2016 +0800

--
 .../client/replication/ReplicationAdmin.java|   84 +-
 .../replication/ReplicationPeerConfig.java  |   16 +-
 .../replication/ReplicationPeerZKImpl.java  |   80 +-
 .../hbase/replication/ReplicationPeers.java |   15 +-
 .../replication/ReplicationPeersZKImpl.java |   60 +-
 .../replication/ReplicationSerDeHelper.java |  189 +++
 .../replication/ReplicationStateZKBase.java |   17 +
 .../protobuf/generated/ZooKeeperProtos.java | 1155 +-
 .../src/main/protobuf/ZooKeeper.proto   |8 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |8 +
 .../replication/master/TableCFsUpdater.java |  120 ++
 .../hbase/client/TestReplicaWithCluster.java|5 +-
 .../replication/TestReplicationAdmin.java   |  193 +--
 .../cleaner/TestReplicationHFileCleaner.java|2 +-
 .../replication/TestMasterReplication.java  |9 +-
 .../replication/TestMultiSlaveReplication.java  |8 +-
 .../replication/TestPerTableCFReplication.java  |  153 ++-
 .../hbase/replication/TestReplicationBase.java  |4 +-
 .../replication/TestReplicationSmallTests.java  |4 +-
 .../replication/TestReplicationStateBasic.java  |   20 +-
 .../replication/TestReplicationSyncUpTool.java  |4 +-
 .../TestReplicationTrackerZKImpl.java   |   10 +-
 .../replication/TestReplicationWithTags.java|4 +-
 .../replication/master/TestTableCFsUpdater.java |  164 +++
 .../TestReplicationSourceManager.java   |2 +-
 ...sibilityLabelReplicationWithExpAsString.java |5 +-
 .../TestVisibilityLabelsReplication.java|5 +-
 .../apache/hadoop/hbase/util/TestHBaseFsck.java |5 +-
 .../src/main/ruby/hbase/replication_admin.rb|   49 +-
 .../src/main/ruby/shell/commands/add_peer.rb|4 +-
 .../ruby/shell/commands/append_peer_tableCFs.rb |2 +-
 .../src/main/ruby/shell/commands/list_peers.rb  |6 +-
 .../ruby/shell/commands/remove_peer_tableCFs.rb |4 +-
 .../ruby/shell/commands/set_peer_tableCFs.rb|4 +-
 .../hbase/client/TestReplicationShell.java  |2 +-
 .../test/ruby/hbase/replication_admin_test.rb   |  118 +-
 36 files changed, 2167 insertions(+), 371 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/66941910/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 1304396..9fca28b 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
@@ -55,6 +55,7 @@ import 
org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
 import org.apache.hadoop.hbase.replication.ReplicationPeerZKImpl;
 import org.apache.hadoop.hbase.replication.ReplicationPeers;
 import org.apache.hadoop.hbase.replication.ReplicationQueuesClient;
+import org.apache.hadoop.hbase.replication.ReplicationSerDeHelper;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
 
@@ -184,8 +185,8 @@ public class ReplicationAdmin implements Closeable {
   @Deprecated
   public void addPeer(String id, String clusterKey, String tableCFs)
 throws ReplicationException {
-this.replicationPeers.addPeer(id,
-  new ReplicationPeerConfig().setClusterKey(clusterKey), tableCFs);
+this.addPeer(id, new ReplicationPeerConfig().setClusterKey(clusterKey),
+  parseTableCFsFromConfig(tableCFs));
   }
 
   /**
@@ -199,7 +200,19 @@ public class ReplicationAdmin implements Closeable {
*/
   public void addPeer(String id, ReplicationPeerConfig peerConfig,
   Map> tableCfs) throws 
ReplicationException {
-this.replicationPeers.addPeer(id, peerConfig, getTableCfsStr(tableCfs));
+if (tableCfs != null) {
+  peerConfig.setTableCFsMap(tableCfs);
+}
+this.replicationPeers.addPeer(id, peerConfig);
+  }
+
+  /**
+   * Add a new remote slave cluster for replication.
+   * @param id a short name that identifies the cl

[36/50] [abbrv] hbase git commit: HBASE-16870 Add the metrics of replication sources which were transformed from other dead rs to ReplicationLoad

2016-11-01 Thread larsh
HBASE-16870 Add the metrics of replication sources which were transformed from 
other dead rs to ReplicationLoad

Signed-off-by: zhangduo 


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

Branch: refs/heads/branch-1
Commit: d76cc4c1f08d405ea152934a3871758aacc9382f
Parents: e395bf9
Author: Guanghao Zhang 
Authored: Thu Oct 20 09:33:03 2016 +0800
Committer: zhangduo 
Committed: Sat Oct 22 14:27:01 2016 +0800

--
 .../replication/regionserver/MetricsSource.java |  2 +-
 .../replication/regionserver/Replication.java   | 13 ++-
 .../regionserver/ReplicationLoad.java   | 26 -
 .../regionserver/ReplicationSourceManager.java  |  6 ++
 .../hbase/replication/TestReplicationBase.java  |  3 +-
 .../replication/TestReplicationSmallTests.java  | 42 -
 .../replication/TestReplicationStatus.java  | 99 
 7 files changed, 141 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d76cc4c1/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
index a647d03..68f32f7 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
@@ -82,7 +82,7 @@ public class MetricsSource implements BaseSource {
   public void setAgeOfLastShippedOp(long timestamp, String walGroup) {
 long age = EnvironmentEdgeManager.currentTime() - timestamp;
 singleSourceSource.setLastShippedAge(age);
-globalSourceSource.setLastShippedAge(age);
+globalSourceSource.setLastShippedAge(Math.max(age, 
globalSourceSource.getLastShippedAge()));
 this.lastTimeStamps.put(walGroup, timestamp);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d76cc4c1/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
index d9a20ac..4f5393a 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
@@ -447,15 +447,24 @@ public class Replication extends WALActionsListener.Base 
implements
   }
 
   private void buildReplicationLoad() {
-// get source
-List sources = 
this.replicationManager.getSources();
 List sourceMetricsList = new ArrayList();
 
+// get source
+List sources = 
this.replicationManager.getSources();
 for (ReplicationSourceInterface source : sources) {
   if (source instanceof ReplicationSource) {
 sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());
   }
 }
+
+// get old source
+List oldSources = 
this.replicationManager.getOldSources();
+for (ReplicationSourceInterface source : oldSources) {
+  if (source instanceof ReplicationSource) {
+sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());
+  }
+}
+
 // get sink
 MetricsSink sinkMetrics = this.replicationSink.getSinkMetrics();
 this.replicationLoad.buildReplicationLoad(sourceMetricsList, sinkMetrics);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d76cc4c1/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationLoad.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationLoad.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationLoad.java
index 8dd42bc..2ead3df 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationLoad.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationLoad.java
@@ -19,8 +19,10 @@
 package org.apache.hadoop.hbase.replication.regionserver;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Map;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;

[46/50] [abbrv] hbase git commit: HBASE-16743 TestSimpleRpcScheduler#testCoDelScheduling is broke

2016-11-01 Thread larsh
HBASE-16743 TestSimpleRpcScheduler#testCoDelScheduling is broke


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

Branch: refs/heads/branch-1
Commit: ea5b0a05d692cfaccc004d030df9d81fb4f7f47e
Parents: 0f158ed
Author: Mikhail Antonov 
Authored: Fri Oct 28 16:26:48 2016 -0700
Committer: Mikhail Antonov 
Committed: Fri Oct 28 16:32:58 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/ea5b0a05/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
index 514e42d..f93f250 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
@@ -410,7 +410,8 @@ public class TestSimpleRpcScheduler {
   @Test
   public void testCoDelScheduling() throws Exception {
 CoDelEnvironmentEdge envEdge = new CoDelEnvironmentEdge();
-envEdge.threadNamePrefixs.add("RpcServer.CodelBQ.default.handler");
+envEdge.threadNamePrefixs.add("RpcServer.CodelFPBQ.default.handler");
+envEdge.threadNamePrefixs.add("RpcServer.CodelRWQ.default.handler");
 Configuration schedConf = HBaseConfiguration.create();
 schedConf.setInt(RpcScheduler.IPC_SERVER_MAX_CALLQUEUE_LENGTH, 250);
 



[33/50] [abbrv] hbase git commit: HBASE-16889 Proc-V2: verifyTables in the IntegrationTestDDLMasterFailover test after each table DDL is incorrect (Stephen Yuan Jiang)

2016-11-01 Thread larsh
HBASE-16889 Proc-V2: verifyTables in the IntegrationTestDDLMasterFailover test 
after each table DDL is incorrect (Stephen Yuan Jiang)


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

Branch: refs/heads/branch-1
Commit: 42e7a4acd7112fde71ca939eaf8225db64a422d2
Parents: 0117ed9
Author: Stephen Yuan Jiang 
Authored: Thu Oct 20 18:25:29 2016 -0700
Committer: Stephen Yuan Jiang 
Committed: Thu Oct 20 18:25:29 2016 -0700

--
 .../hbase/IntegrationTestDDLMasterFailover.java | 54 
 1 file changed, 33 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/42e7a4ac/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
index 52a118a..adf0f46 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
@@ -153,7 +153,7 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
   admin.disableTables("ittable-\\d+");
   admin.deleteTables("ittable-\\d+");
   NamespaceDescriptor [] nsds = admin.listNamespaceDescriptors();
-  for(NamespaceDescriptor nsd:nsds ) {
+  for(NamespaceDescriptor nsd: nsds) {
 if(nsd.getName().matches("itnamespace\\d+")) {
   LOG.info("Removing namespace="+nsd.getName());
   admin.deleteNamespace(nsd.getName());
@@ -294,15 +294,14 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
 admin.createNamespace(nsd);
 NamespaceDescriptor freshNamespaceDesc = 
admin.getNamespaceDescriptor(nsd.getName());
 Assert.assertTrue("Namespace: " + nsd + " was not created", 
freshNamespaceDesc != null);
-LOG.info("Created namespace:" + freshNamespaceDesc);
 namespaceMap.put(nsd.getName(), freshNamespaceDesc);
+LOG.info("Created namespace:" + freshNamespaceDesc);
   } catch (Exception e){
 LOG.warn("Caught exception in action: " + this.getClass());
 throw e;
   } finally {
 admin.close();
   }
-  verifyNamespaces();
 }
 
 private NamespaceDescriptor createNamespaceDesc() {
@@ -340,15 +339,17 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
 Assert.assertTrue(
   "Namespace: " + selected + " was not modified",
   
freshNamespaceDesc.getConfigurationValue(nsTestConfigKey).equals(nsValueNew));
-LOG.info("Modified namespace :" + freshNamespaceDesc);
+Assert.assertTrue(
+  "Namespace: " + namespaceName + " does not exist",
+  admin.getNamespaceDescriptor(namespaceName) != null);
 namespaceMap.put(namespaceName, freshNamespaceDesc);
+LOG.info("Modified namespace :" + freshNamespaceDesc);
   } catch (Exception e){
 LOG.warn("Caught exception in action: " + this.getClass());
 throw e;
   } finally {
 admin.close();
   }
-  verifyNamespaces();
 }
   }
 
@@ -382,7 +383,6 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
   } finally {
 admin.close();
   }
-  verifyNamespaces();
 }
   }
 
@@ -425,6 +425,8 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
 admin.createTable(htd, startKey, endKey, numRegions);
 Assert.assertTrue("Table: " + htd + " was not created", 
admin.tableExists(tableName));
 HTableDescriptor freshTableDesc = admin.getTableDescriptor(tableName);
+Assert.assertTrue(
+  "After create, Table: " + tableName + " in not enabled", 
admin.isTableEnabled(tableName));
 enabledTables.put(tableName, freshTableDesc);
 LOG.info("Created table:" + freshTableDesc);
   } catch (Exception e) {
@@ -433,7 +435,6 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
   } finally {
 admin.close();
   }
-  verifyTables();
 }
 
 private HTableDescriptor createTableDesc() {
@@ -465,6 +466,9 @@ public class IntegrationTestDDLMasterFailover extends 
IntegrationTestBase {
 Assert.assertTrue("Table: " + selected + " was not disabled",
 admin.isTableDisabled(tableName));
 HTableDescriptor freshTableDesc = admin.getTableDescriptor(tableName);
+Assert.assertTrue(
+

[02/50] [abbrv] hbase git commit: HBASE-16701 rely on test category timeout instead of defining one on a specific test.

2016-11-01 Thread larsh
HBASE-16701 rely on test category timeout instead of defining one on a specific 
test.

Signed-off-by: Umesh Agashe 
Signed-off-by: Yu Li 


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

Branch: refs/heads/branch-1
Commit: acb1392b1533b8ebedf2e45b6f133516cdbf99ee
Parents: 364a57a
Author: Sean Busbey 
Authored: Wed Oct 5 17:23:20 2016 -0500
Committer: Sean Busbey 
Committed: Mon Oct 10 00:24:24 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/acb1392b/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 1265468..7cf76fc 100644
--- 
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
@@ -6639,7 +6639,7 @@ public class TestHRegion {
* HBASE-16429 Make sure no stuck if roll writer when ring buffer is filled 
with appends
* @throws IOException if IO error occurred during test
*/
-  @Test(timeout = 6)
+  @Test
   public void testWritesWhileRollWriter() throws IOException {
 int testCount = 10;
 int numRows = 1024;



[09/50] hbase git commit: Amend HBASE-16448 Custom metrics for custom replication endpoints

2016-11-01 Thread larsh
Amend HBASE-16448 Custom metrics for custom replication endpoints

Add missing support in hbase-hadoop1-compat


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

Branch: refs/heads/0.98
Commit: e78008700bcf30443cdd94b206575d8bb2ce31f8
Parents: 6fbdc38
Author: Andrew Purtell 
Authored: Wed Aug 24 17:44:21 2016 -0700
Committer: Andrew Purtell 
Committed: Wed Aug 24 17:44:21 2016 -0700

--
 .../MetricsReplicationGlobalSourceSource.java   | 64 ++-
 .../MetricsReplicationSourceSourceImpl.java | 82 +---
 2 files changed, 135 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e7800870/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java
--
diff --git 
a/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java
 
b/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java
index 620b764..ee59b1c 100644
--- 
a/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java
+++ 
b/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java
@@ -22,7 +22,7 @@ import 
org.apache.hadoop.metrics2.lib.MetricMutableCounterLong;
 import org.apache.hadoop.metrics2.lib.MetricMutableGaugeLong;
 
 public class MetricsReplicationGlobalSourceSource implements 
MetricsReplicationSourceSource {
-
+  private final MetricsReplicationSource rms;
   private final MetricMutableGaugeLong ageOfLastShippedOpGauge;
   private long ageOfLastShipped; // Hadoop 1 metrics don't let you read from 
gauges
   private final MetricMutableGaugeLong sizeOfLogQueueGauge;
@@ -36,7 +36,7 @@ public class MetricsReplicationGlobalSourceSource implements 
MetricsReplicationS
   private final MetricMutableCounterLong logReadInBytesCounter;
 
   public MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl 
rms) {
-
+this.rms = rms;
 ageOfLastShippedOpGauge = 
rms.getMetricsRegistry().getLongGauge(SOURCE_AGE_OF_LAST_SHIPPED_OP, 0L);
 
 sizeOfLogQueueGauge = 
rms.getMetricsRegistry().getLongGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L);
@@ -115,4 +115,64 @@ public class MetricsReplicationGlobalSourceSource 
implements MetricsReplicationS
   public long getLastShippedAge() {
 return ageOfLastShipped;
   }
+
+  @Override
+  public void init() {
+rms.init();
+  }
+
+  @Override
+  public void setGauge(String gaugeName, long value) {
+rms.setGauge(gaugeName, value);
+  }
+
+  @Override
+  public void incGauge(String gaugeName, long delta) {
+rms.incGauge(gaugeName, delta);
+  }
+
+  @Override
+  public void decGauge(String gaugeName, long delta) {
+rms.decGauge(gaugeName, delta);
+  }
+
+  @Override
+  public void removeMetric(String key) {
+rms.removeMetric(key);
+  }
+
+  @Override
+  public void incCounters(String counterName, long delta) {
+rms.incCounters(counterName, delta);
+  }
+
+  @Override
+  public void updateHistogram(String name, long value) {
+rms.updateHistogram(name, value);
+  }
+
+  @Override
+  public void updateQuantile(String name, long value) {
+rms.updateQuantile(name, value);
+  }
+
+  @Override
+  public String getMetricsContext() {
+return rms.getMetricsContext();
+  }
+
+  @Override
+  public String getMetricsDescription() {
+return rms.getMetricsDescription();
+  }
+
+  @Override
+  public String getMetricsJmxContext() {
+return rms.getMetricsJmxContext();
+  }
+
+  @Override
+  public String getMetricsName() {
+return rms.getMetricsName();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/e7800870/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationSourceSourceImpl.java
--
diff --git 
a/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationSourceSourceImpl.java
 
b/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationSourceSourceImpl.java
index 21a6cb3..e15af46 100644
--- 
a/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationSourceSourceImpl.java
+++ 
b/hbase-hadoop1-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationSourceSourceImpl.java
@@ -31,6 +31,8 @@ public c

[13/50] hbase git commit: HBASE-16385 Have hbase-rest pull hbase.rest.port from Constants.java (Yi Liang)

2016-11-01 Thread larsh
HBASE-16385 Have hbase-rest pull hbase.rest.port from Constants.java (Yi Liang)


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

Branch: refs/heads/0.98
Commit: 3c4e8c16ffaea85d41bb19df2dda224e36d83d43
Parents: c283063
Author: stack 
Authored: Wed Aug 10 16:06:05 2016 -0700
Committer: Andrew Purtell 
Committed: Wed Aug 24 17:56:58 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/3c4e8c16/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
--
diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
index 79b3377..d91b58a 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
@@ -110,7 +110,7 @@ public class RESTServer implements Constants {
 RESTServlet servlet = RESTServlet.getInstance(conf, userProvider);
 
 Options options = new Options();
-options.addOption("p", "port", true, "Port to bind to [default: 8080]");
+options.addOption("p", "port", true, "Port to bind to [default: " + 
DEFAULT_LISTEN_PORT + "]");
 options.addOption("ro", "readonly", false, "Respond only to GET HTTP " +
   "method requests [default: false]");
 options.addOption(null, "infoport", true, "Port for web UI");
@@ -204,7 +204,7 @@ public class RESTServer implements Constants {
   sslConnector.setKeyPassword(keyPassword);
   connector = sslConnector;
 }
-connector.setPort(servlet.getConfiguration().getInt("hbase.rest.port", 
8080));
+connector.setPort(servlet.getConfiguration().getInt("hbase.rest.port", 
DEFAULT_LISTEN_PORT));
 connector.setHost(servlet.getConfiguration().get("hbase.rest.host", 
"0.0.0.0"));
 connector.setHeaderBufferSize(65536);
 



[44/50] hbase git commit: Update POMs and CHANGES.txt for 0.98.23RC0

2016-11-01 Thread larsh
Update POMs and CHANGES.txt for 0.98.23RC0


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

Branch: refs/heads/0.98
Commit: 6b9bdd6cf11c251c2cf2f716b1318d0819821621
Parents: c95f214
Author: Andrew Purtell 
Authored: Tue Oct 4 17:41:15 2016 -0700
Committer: Andrew Purtell 
Committed: Tue Oct 4 17:41:15 2016 -0700

--
 CHANGES.txt   | 22 ++
 hbase-annotations/pom.xml |  2 +-
 hbase-assembly/pom.xml|  2 +-
 hbase-checkstyle/pom.xml  |  4 ++--
 hbase-client/pom.xml  |  2 +-
 hbase-common/pom.xml  |  2 +-
 hbase-examples/pom.xml|  2 +-
 hbase-hadoop-compat/pom.xml   |  2 +-
 hbase-hadoop1-compat/pom.xml  |  2 +-
 hbase-hadoop2-compat/pom.xml  |  2 +-
 hbase-it/pom.xml  |  2 +-
 hbase-prefix-tree/pom.xml |  2 +-
 hbase-protocol/pom.xml|  2 +-
 hbase-resource-bundle/pom.xml |  2 +-
 hbase-rest/pom.xml|  2 +-
 hbase-server/pom.xml  |  2 +-
 hbase-shell/pom.xml   |  2 +-
 hbase-testing-util/pom.xml|  2 +-
 hbase-thrift/pom.xml  |  2 +-
 pom.xml   |  2 +-
 20 files changed, 42 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 02e26b4..523b723 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,27 @@
 HBase Change Log
 
+Release 0.98.23 - 10/11/2016
+
+** Sub-task
+* [HBASE-15984] - Given failure to parse a given WAL that was closed 
cleanly, replay the WAL.
+
+** Bug
+* [HBASE-11354] - HConnectionImplementation#DelayedClosing does not start
+* [HBASE-15983] - Replication improperly discards data from end-of-wal in 
some cases.
+* [HBASE-16165] - Decrease RpcServer.callQueueSize before writeResponse 
causes OOM
+* [HBASE-16373] - precommit needs a dockerfile with hbase prereqs
+* [HBASE-16576] - Shell add_peer doesn't allow setting cluster_key for 
custom endpoints
+* [HBASE-16589] - Adjust log level for FATAL messages from 
HBaseReplicationEndpoint that are not fatal
+* [HBASE-16649] - Truncate table with splits preserved can cause both data 
loss and truncated data appeared again
+* [HBASE-16660] - ArrayIndexOutOfBounds during the majorCompactionCheck in 
DateTieredCompaction
+* [HBASE-16662] - Fix open POODLE vulnerabilities
+
+** Improvement
+* [HBASE-16562] - ITBLL should fail to start if misconfigured
+* [HBASE-16694] - Reduce garbage for onDiskChecksum in HFileBlock
+* [HBASE-16705] - Eliminate long to Long auto boxing in LongComparator
+
+
 Release 0.98.22 - 9/9/2016
 
 ** Sub-task

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/hbase-annotations/pom.xml
--
diff --git a/hbase-annotations/pom.xml b/hbase-annotations/pom.xml
index 9ce4fbf..e730e9c 100644
--- a/hbase-annotations/pom.xml
+++ b/hbase-annotations/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-0.98.23-SNAPSHOT
+0.98.23
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/hbase-assembly/pom.xml
--
diff --git a/hbase-assembly/pom.xml b/hbase-assembly/pom.xml
index 28a425b..06d7bbd 100644
--- a/hbase-assembly/pom.xml
+++ b/hbase-assembly/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-0.98.23-SNAPSHOT
+0.98.23
 ..
   
   hbase-assembly

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/hbase-checkstyle/pom.xml
--
diff --git a/hbase-checkstyle/pom.xml b/hbase-checkstyle/pom.xml
index eb78208..4de5767 100644
--- a/hbase-checkstyle/pom.xml
+++ b/hbase-checkstyle/pom.xml
@@ -24,14 +24,14 @@
 4.0.0
 org.apache.hbase
 hbase-checkstyle
-0.98.23-SNAPSHOT
+0.98.23
 Apache HBase - Checkstyle
 Module to hold Checkstyle properties for HBase.
 
   
 hbase
 org.apache.hbase
-0.98.23-SNAPSHOT
+0.98.23
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/hbase-client/pom.xml
--
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index c8daf07..d402633 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -24,7 +24,7 @@
   
 hbase
 org.apache.hbase
-0.98.23-SNAPSHOT
+0.98.23
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b9bdd6c/hbase-common/pom.xml
--

[43/50] hbase git commit: HBASE-15976 RegionServerMetricsWrapperRunnable will be failure when disable blockcache.

2016-11-01 Thread larsh
HBASE-15976 RegionServerMetricsWrapperRunnable will be failure when disable 
blockcache.


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

Branch: refs/heads/branch-1.0
Commit: 14d0bef21eaa67f6377b4456a941f46cd908b3aa
Parents: a55ef15
Author: Jingcheng Du 
Authored: Wed Jun 29 17:16:09 2016 +0800
Committer: Jingcheng Du 
Committed: Wed Jun 29 17:16:09 2016 +0800

--
 .../hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/14d0bef2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
index 75dcf26..d14b135 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
@@ -413,7 +413,6 @@ class MetricsRegionServerWrapperImpl
 @Override
 synchronized public void run() {
   initBlockCache();
-  cacheStats = blockCache.getStats();
 
   HDFSBlocksDistribution hdfsBlocksDistribution =
   new HDFSBlocksDistribution();



[39/50] hbase git commit: HBASE-15645 ADDENDUM Label the new methods on Table introduced by HBASE-15645 as InterfaceAudience.Private

2016-11-01 Thread larsh
HBASE-15645 ADDENDUM Label the new methods on Table introduced by HBASE-15645 
as InterfaceAudience.Private

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/89111950
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/89111950
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/89111950

Branch: refs/heads/branch-1.0
Commit: 891119501dc6f3fc073bb38688a5bd3d42ffa6e7
Parents: fd5c5fb
Author: Phil Yang 
Authored: Wed Apr 27 11:21:17 2016 +0800
Committer: Sean Busbey 
Committed: Fri Apr 29 08:44:41 2016 -0500

--
 .../src/main/java/org/apache/hadoop/hbase/client/Table.java  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/89111950/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
index 8c6169d..ee742b2 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
@@ -606,11 +606,13 @@ public interface Table extends Closeable {
* early and throw SocketTimeoutException.
* @param operationTimeout the total timeout of each operation in 
millisecond.
*/
+  @InterfaceAudience.Private
   public void setOperationTimeout(int operationTimeout);
 
   /**
* Get timeout (millisecond) of each operation for in Table instance.
*/
+  @InterfaceAudience.Private
   public int getOperationTimeout();
 
   /**
@@ -620,10 +622,12 @@ public interface Table extends Closeable {
* retries exhausted or operation timeout reached.
* @param rpcTimeout the timeout of each rpc request in millisecond.
*/
+  @InterfaceAudience.Private
   public void setRpcTimeout(int rpcTimeout);
 
   /**
* Get timeout (millisecond) of each rpc request in this Table instance.
*/
+  @InterfaceAudience.Private
   public int getRpcTimeout();
 }



[30/50] hbase git commit: HBASE-15478 add comments to syncRunnerIndex handling explaining constraints on possible values.

2016-11-01 Thread larsh
HBASE-15478 add comments to syncRunnerIndex handling explaining constraints on 
possible values.

Signed-off-by: zhangduo 

 Conflicts:

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


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

Branch: refs/heads/branch-1.0
Commit: d5eb756044cb8819e2881b7dc6fd0f7c772b6561
Parents: d8a5820
Author: Sean Busbey 
Authored: Thu Mar 17 15:22:07 2016 -0500
Committer: Sean Busbey 
Committed: Mon Mar 21 00:36:53 2016 -0500

--
 .../hadoop/hbase/regionserver/wal/FSHLog.java  | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d5eb7560/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
index 9e886a7..85de419 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
@@ -1871,12 +1871,21 @@ public class FSHLog implements WAL {
   LOG.trace("Sequence=" + sequence + ", syncCount=" + 
this.syncFuturesCount);
 }
 
-// Below expects that the offer 'transfers' responsibility for the 
outstanding syncs to the
-// syncRunner. We should never get an exception in here. HBASE-11145 
was because queue
-// was sized exactly to the count of user handlers but we could have 
more if we factor in
-// meta handlers doing opens and closes.
+// syncRunnerIndex is bound to the range [0, Integer.MAX_INT - 1] as 
follows:
+//   * The maximum value possible for syncRunners.length is 
Integer.MAX_INT
+//   * syncRunnerIndex starts at 0 and is incremented only here
+//   * after the increment, the value is bounded by the '%' operator 
to [0, syncRunners.length),
+// presuming the value was positive prior to the '%' operator.
+//   * after being bound to [0, Integer.MAX_INT - 1], the new value is 
stored in syncRunnerIndex
+// ensuring that it can't grow without bound and overflow.
+//   * note that the value after the increment must be positive, 
because the most it could have
+// been prior was Integer.MAX_INT - 1 and we only increment by 1.
 this.syncRunnerIndex = (this.syncRunnerIndex + 1) % 
this.syncRunners.length;
 try {
+  // Below expects that the offer 'transfers' responsibility for the 
outstanding syncs to the
+  // syncRunner. We should never get an exception in here. HBASE-11145 
was because queue
+  // was sized exactly to the count of user handlers but we could have 
more if we factor in
+  // meta handlers doing opens and closes.
   this.syncRunners[this.syncRunnerIndex].offer(sequence, 
this.syncFutures, this.syncFuturesCount);
 } catch (Exception e) {
   cleanupOutstandingSyncsOnException(sequence, e);



[32/50] hbase git commit: HBASE-15587 FSTableDescriptors.getDescriptor() logs stack trace erronously

2016-11-01 Thread larsh
HBASE-15587 FSTableDescriptors.getDescriptor() logs stack trace erronously


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

Branch: refs/heads/branch-1.0
Commit: 52f8ad902da29f1e6eed4e5f18921689d42cc993
Parents: 47baaed
Author: Enis Soztutar 
Authored: Tue Apr 5 18:13:40 2016 -0700
Committer: Enis Soztutar 
Committed: Tue Apr 5 18:22:40 2016 -0700

--
 .../java/org/apache/hadoop/hbase/util/FSTableDescriptors.java| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/52f8ad90/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
index 7cd2673..06eb9ea 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
@@ -124,11 +124,13 @@ public class FSTableDescriptors implements 
TableDescriptors {
 this.metaTableDescriptor = HTableDescriptor.metaTableDescriptor(conf);
   }
 
+  @Override
   public void setCacheOn() throws IOException {
 this.cache.clear();
 this.usecache = true;
   }
 
+  @Override
   public void setCacheOff() throws IOException {
 this.usecache = false;
 this.cache.clear();
@@ -173,6 +175,8 @@ public class FSTableDescriptors implements TableDescriptors 
{
 } catch (NullPointerException e) {
   LOG.debug("Exception during readTableDecriptor. Current table name = "
   + tablename, e);
+} catch (TableInfoMissingException e) {
+  // ignore. This is regular operation
 } catch (IOException ioe) {
   LOG.debug("Exception during readTableDecriptor. Current table name = "
   + tablename, ioe);



[46/50] hbase git commit: HBASE-15635 Mean age of Blocks in cache (seconds) on webUI should be greater than zero

2016-11-01 Thread larsh
HBASE-15635 Mean age of Blocks in cache (seconds) on webUI should be greater 
than zero

Conflicts:

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java


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

Branch: refs/heads/branch-1.0
Commit: a049e518f3c1967de1668a4c5e618705ab11fb02
Parents: 89b432d
Author: chenheng 
Authored: Thu Aug 18 10:28:06 2016 +0800
Committer: chenheng 
Committed: Thu Aug 18 11:00:35 2016 +0800

--
 .../hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon  | 11 ++-
 .../org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java |  4 +++-
 .../org/apache/hadoop/hbase/io/hfile/CacheStats.java |  4 +++-
 3 files changed, 8 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a049e518/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
index 9883848..f5485c2 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
@@ -176,9 +176,6 @@ org.apache.hadoop.util.StringUtils;
 
 <%java>
   AgeSnapshot ageAtEvictionSnapshot = bc.getStats().getAgeAtEvictionSnapshot();
-  // Only show if non-zero mean and stddev as is the case in combinedblockcache
-  double mean = ageAtEvictionSnapshot.getMean();
-  double stddev = ageAtEvictionSnapshot.getStdDev();
 
 
 Evicted
@@ -190,20 +187,16 @@ org.apache.hadoop.util.StringUtils;
 <% String.format("%,d", bc.getStats().getEvictionCount()) %>
 The total number of times an eviction has occurred
 
-<%if mean > 0 %>
 
 Mean
-<% String.format("%,d", 
(long)(ageAtEvictionSnapshot.getMean()/(100 * 1000))) %>
+<% String.format("%,d", (long)(ageAtEvictionSnapshot.getMean())) 
%>
 Mean age of Blocks at eviction time (seconds)
 
-
-<%if stddev > 0 %>
 
 StdDev
-<% String.format("%,d", 
(long)(ageAtEvictionSnapshot.getStdDev()/100)) %>
+<% String.format("%,d", (long)(ageAtEvictionSnapshot.getStdDev())) 
%>
 Standard Deviation for age of Blocks at eviction time
 
-
 
 
 <%def bc_stats>

http://git-wip-us.apache.org/repos/asf/hbase/blob/a049e518/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
index 94638da..2d3f524 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
@@ -41,6 +41,8 @@ import com.yammer.metrics.stats.Snapshot;
  */
 @InterfaceAudience.Private
 public class BlockCacheUtil {
+
+  public static final long NANOS_PER_SECOND = 10;
   /**
* Needed making histograms.
*/
@@ -225,7 +227,7 @@ public class BlockCacheUtil {
 this.dataBlockCount++;
 this.dataSize += cb.getSize();
   }
-  long age = this.now - cb.getCachedTime();
+  long age = (this.now - cb.getCachedTime())/NANOS_PER_SECOND;
   this.age.update(age);
   return false;
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a049e518/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
index 00accfc..ba5fbf4 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
@@ -131,7 +131,9 @@ public class CacheStats {
   }
 
   public void evicted(final long t) {
-if (t > this.startTime) this.ageAtEviction.update(t - this.startTime);
+if (t > this.startTime) {
+  this.ageAtEviction.update((t - 
this.startTime)/BlockCacheUtil.NANOS_PER_SECOND);
+}
 this.evictedBlockCount.incrementAndGet();
   }
 



[40/50] hbase git commit: HBASE-15720 Print row locks at the debug dump page, addendum

2016-11-01 Thread larsh
HBASE-15720 Print row locks at the debug dump page, addendum


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

Branch: refs/heads/branch-1.0
Commit: a3e77bf3664d361a5337ba6b584848eb65ceccbb
Parents: 8911195
Author: chenheng 
Authored: Tue May 3 09:31:45 2016 +1000
Committer: chenheng 
Committed: Tue May 3 09:31:45 2016 +1000

--
 .../java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a3e77bf3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
index 56d0417..8fe6126 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
@@ -105,8 +105,7 @@ public class RSDumpServlet extends StateDumpServlet {
 
   public static void dumpRowLock(HRegionServer hrs, PrintWriter out) {
 StringBuilder sb = new StringBuilder();
-for (Region region : hrs.getOnlineRegionsLocalContext()) {
-  HRegion hRegion = (HRegion)region;
+for (HRegion hRegion : hrs.getOnlineRegionsLocalContext()) {
   if (hRegion.getLockedRows().size() > 0) {
 for (HRegion.RowLockContext rowLockContext : 
hRegion.getLockedRows().values()) {
   sb.setLength(0);



[27/50] hbase git commit: HBASE-15365 Do not write to '/tmp' in TestHBaseConfiguration

2016-11-01 Thread larsh
HBASE-15365 Do not write to '/tmp' in TestHBaseConfiguration

Conflicts:

hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java


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

Branch: refs/heads/branch-1.0
Commit: c4c50a565b84fee5bd5149bab9d5fb9df48d76ba
Parents: 2ce516b
Author: zhangduo 
Authored: Wed Mar 2 09:37:07 2016 +0800
Committer: zhangduo 
Committed: Wed Mar 2 11:21:30 2016 +0800

--
 .../hadoop/hbase/TestHBaseConfiguration.java| 27 
 1 file changed, 16 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c4c50a56/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
--
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
index b739f36..8973fdc 100644
--- 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
+++ 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
+import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -30,6 +31,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.junit.AfterClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -38,6 +40,13 @@ public class TestHBaseConfiguration {
 
   private static final Log LOG = 
LogFactory.getLog(TestHBaseConfiguration.class);
 
+  private static HBaseCommonTestingUtility UTIL = new 
HBaseCommonTestingUtility();
+
+  @AfterClass
+  public static void tearDown() throws IOException {
+UTIL.cleanupTestDir();
+  }
+
   @Test
   public void testGetIntDeprecated() {
 int VAL = 1, VAL2 = 2;
@@ -66,22 +75,19 @@ public class TestHBaseConfiguration {
   @Test
   public void testGetPassword() throws Exception {
 Configuration conf = HBaseConfiguration.create();
-conf.set(ReflectiveCredentialProviderClient.CREDENTIAL_PROVIDER_PATH,
-"jceks://file/tmp/foo.jks");
-ReflectiveCredentialProviderClient client =
-new ReflectiveCredentialProviderClient();
+conf.set(ReflectiveCredentialProviderClient.CREDENTIAL_PROVIDER_PATH, 
"jceks://file"
++ new File(UTIL.getDataTestDir().toUri().getPath(), 
"foo.jks").getCanonicalPath());
+ReflectiveCredentialProviderClient client = new 
ReflectiveCredentialProviderClient();
 if (client.isHadoopCredentialProviderAvailable()) {
-  char[] keyPass = {'k', 'e', 'y', 'p', 'a', 's', 's'};
-  char[] storePass = {'s', 't', 'o', 'r', 'e', 'p', 'a', 's', 's'};
+  char[] keyPass = { 'k', 'e', 'y', 'p', 'a', 's', 's' };
+  char[] storePass = { 's', 't', 'o', 'r', 'e', 'p', 'a', 's', 's' };
   client.createEntry(conf, "ssl.keypass.alias", keyPass);
   client.createEntry(conf, "ssl.storepass.alias", storePass);
 
-  String keypass = HBaseConfiguration.getPassword(
-  conf, "ssl.keypass.alias", null);
+  String keypass = HBaseConfiguration.getPassword(conf, 
"ssl.keypass.alias", null);
   assertEquals(keypass, new String(keyPass));
 
-  String storepass = HBaseConfiguration.getPassword(
-  conf, "ssl.storepass.alias", null);
+  String storepass = HBaseConfiguration.getPassword(conf, 
"ssl.storepass.alias", null);
   assertEquals(storepass, new String(storePass));
 }
   }
@@ -165,7 +171,6 @@ public class TestHBaseConfiguration {
 getProvidersMethod = loadMethod(hadoopCredProviderFactoryClz,
 HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME,
 Configuration.class);
-
 // Load Hadoop CredentialProvider
 Class hadoopCredProviderClz = null;
 hadoopCredProviderClz = Class.forName(HADOOP_CRED_PROVIDER_CLASS_NAME);



[26/50] hbase git commit: HBASE-15274 ClientSideRegionScanner's reaction to Scan#setBatch is not consistent between HBase versions (Youngjoon Kim)

2016-11-01 Thread larsh
HBASE-15274 ClientSideRegionScanner's reaction to Scan#setBatch is not 
consistent between HBase versions (Youngjoon Kim)


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

Branch: refs/heads/branch-1.0
Commit: 2ce516b0fff93a4ee84bb53f9623c495d8dc3d13
Parents: f280c45
Author: Enis Soztutar 
Authored: Wed Feb 17 17:41:13 2016 -0800
Committer: Enis Soztutar 
Committed: Wed Feb 17 17:41:13 2016 -0800

--
 .../org/apache/hadoop/hbase/client/ClientSideRegionScanner.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2ce516b0/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
index 9cb9494..f9dacdd 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
@@ -71,8 +71,7 @@ public class ClientSideRegionScanner extends 
AbstractClientScanner {
   @Override
   public Result next() throws IOException {
 values.clear();
-
-scanner.nextRaw(values, -1); // pass -1 as limit so that we see the whole 
row.
+scanner.nextRaw(values);
 if (values.isEmpty()) {
   //we are done
   return null;



[13/50] hbase git commit: Updated pom.xml version to 1.0.4-SNAPSHOT

2016-11-01 Thread larsh
Updated pom.xml version to 1.0.4-SNAPSHOT


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

Branch: refs/heads/branch-1.0
Commit: 5c2022f56ebff3b7fd387c609970cc7042651e14
Parents: 9c42bea
Author: Enis Soztutar 
Authored: Thu Jan 28 13:58:21 2016 -0800
Committer: Enis Soztutar 
Committed: Thu Jan 28 13:58:21 2016 -0800

--
 hbase-annotations/pom.xml | 2 +-
 hbase-assembly/pom.xml| 2 +-
 hbase-checkstyle/pom.xml  | 4 ++--
 hbase-client/pom.xml  | 2 +-
 hbase-common/pom.xml  | 2 +-
 hbase-examples/pom.xml| 2 +-
 hbase-hadoop-compat/pom.xml   | 2 +-
 hbase-hadoop2-compat/pom.xml  | 2 +-
 hbase-it/pom.xml  | 2 +-
 hbase-prefix-tree/pom.xml | 2 +-
 hbase-protocol/pom.xml| 2 +-
 hbase-resource-bundle/pom.xml | 2 +-
 hbase-rest/pom.xml| 2 +-
 hbase-server/pom.xml  | 2 +-
 hbase-shell/pom.xml   | 2 +-
 hbase-testing-util/pom.xml| 2 +-
 hbase-thrift/pom.xml  | 2 +-
 pom.xml   | 2 +-
 18 files changed, 19 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-annotations/pom.xml
--
diff --git a/hbase-annotations/pom.xml b/hbase-annotations/pom.xml
index f8b7986..f22ea05 100644
--- a/hbase-annotations/pom.xml
+++ b/hbase-annotations/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-assembly/pom.xml
--
diff --git a/hbase-assembly/pom.xml b/hbase-assembly/pom.xml
index 02ce2d8..9bbb9d4 100644
--- a/hbase-assembly/pom.xml
+++ b/hbase-assembly/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
   hbase-assembly

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-checkstyle/pom.xml
--
diff --git a/hbase-checkstyle/pom.xml b/hbase-checkstyle/pom.xml
index 05af30d..654ecec 100644
--- a/hbase-checkstyle/pom.xml
+++ b/hbase-checkstyle/pom.xml
@@ -24,14 +24,14 @@
 4.0.0
 org.apache.hbase
 hbase-checkstyle
-1.0.3
+1.0.4-SNAPSHOT
 Apache HBase - Checkstyle
 Module to hold Checkstyle properties for HBase.
 
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-client/pom.xml
--
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index 58732f9..770b60c 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -24,7 +24,7 @@
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-common/pom.xml
--
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index 1b654ba..260b268 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-examples/pom.xml
--
diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml
index 966c2f9..24af59e 100644
--- a/hbase-examples/pom.xml
+++ b/hbase-examples/pom.xml
@@ -23,7 +23,7 @@
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
   hbase-examples

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-hadoop-compat/pom.xml
--
diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml
index 1de2bb5..3964048 100644
--- a/hbase-hadoop-compat/pom.xml
+++ b/hbase-hadoop-compat/pom.xml
@@ -23,7 +23,7 @@
 
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-hadoop2-compat/pom.xml
--
diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml
index 5c85b01..5198e5e 100644
--- a/hbase-hadoop2-compat/pom.xml
+++ b/hbase-hadoop2-compat/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   
 hbase
 org.apache.hbase
-1.0.3
+1.0.4-SNAPSHOT
 ..
   
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5c2022f5/hbase-it

[36/50] hbase git commit: Label the new methods on Table introduced by HBASE-15645 as InterfaceAudience.Private

2016-11-01 Thread larsh
Label the new methods on Table introduced by HBASE-15645 as 
InterfaceAudience.Private

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/719993e0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/719993e0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/719993e0

Branch: refs/heads/branch-1.0
Commit: 719993e0fe2b132b75a3689267ae4adff364b6aa
Parents: 48f158f
Author: Phil Yang 
Authored: Wed Apr 27 11:21:17 2016 +0800
Committer: stack 
Committed: Wed Apr 27 10:07:52 2016 -0700

--
 .../src/main/java/org/apache/hadoop/hbase/client/Table.java  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/719993e0/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
index 8c6169d..ee742b2 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
@@ -606,11 +606,13 @@ public interface Table extends Closeable {
* early and throw SocketTimeoutException.
* @param operationTimeout the total timeout of each operation in 
millisecond.
*/
+  @InterfaceAudience.Private
   public void setOperationTimeout(int operationTimeout);
 
   /**
* Get timeout (millisecond) of each operation for in Table instance.
*/
+  @InterfaceAudience.Private
   public int getOperationTimeout();
 
   /**
@@ -620,10 +622,12 @@ public interface Table extends Closeable {
* retries exhausted or operation timeout reached.
* @param rpcTimeout the timeout of each rpc request in millisecond.
*/
+  @InterfaceAudience.Private
   public void setRpcTimeout(int rpcTimeout);
 
   /**
* Get timeout (millisecond) of each rpc request in this Table instance.
*/
+  @InterfaceAudience.Private
   public int getRpcTimeout();
 }



[45/50] hbase git commit: HBASE-14345 Consolidate printUsage in IntegrationTestLoadAndVerify (Reid Chan)

2016-11-01 Thread larsh
HBASE-14345 Consolidate printUsage in IntegrationTestLoadAndVerify (Reid Chan)

Change-Id: Iac3e3bbd3c0b8be848ded1c481334675789bd4cc


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

Branch: refs/heads/branch-1.0
Commit: 89b432d452d81843f725466c5cd581599710d488
Parents: fb9a648
Author: Reid 
Authored: Wed Aug 10 09:58:40 2016 -0700
Committer: Apekshit Sharma 
Committed: Wed Aug 10 09:58:40 2016 -0700

--
 .../hadoop/hbase/test/IntegrationTestLoadAndVerify.java | 12 +++-
 .../IntegrationTestWithCellVisibilityLoadAndVerify.java |  4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/89b432d4/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
index 8a0181c..1930a9c 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
@@ -398,10 +398,12 @@ public void cleanUpCluster() throws Exception {
 getTestingUtil(getConf()).deleteTable(htd.getTableName());
   }
 
-  public void usage() {
-System.err.println(this.getClass().getSimpleName() + " [-Doptions] 
");
+  @Override
+  public void printUsage() {
+printUsage(this.getClass().getSimpleName() + " "
++ " [-Doptions] ", "Options", "");
+System.err.println("");
 System.err.println("  Loads a table with row dependencies and verifies the 
dependency chains");
-System.err.println("Options");
 System.err.println("  -Dloadmapper.table=Table to 
write/verify (default autogen)");
 System.err.println("  -Dloadmapper.backrefs=Number of 
backreferences per row (default 50)");
 System.err.println("  -Dloadmapper.num_to_write=Number of rows per 
mapper (default 100,000 per mapper)");
@@ -419,7 +421,7 @@ public void cleanUpCluster() throws Exception {
 
 String[] args = cmd.getArgs();
 if (args == null || args.length < 1 || args.length > 1) {
-  usage();
+  printUsage();
   throw new RuntimeException("Incorrect Number of args.");
 }
 toRun = args[0];
@@ -442,7 +444,7 @@ public void cleanUpCluster() throws Exception {
   doVerify= true;
 } else {
   System.err.println("Invalid argument " + toRun);
-  usage();
+  printUsage();
   return 1;
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/89b432d4/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
--
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
index e68cb38..1c7fc62 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
@@ -346,7 +346,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify 
extends IntegrationT
   }
 
   @Override
-  public void usage() {
+  public void printUsage() {
 System.err.println(this.getClass().getSimpleName() + " -u usera,userb 
[-Doptions]");
 System.err.println("  Loads a table with cell visibilities and verifies 
with Authorizations");
 System.err.println("Options");
@@ -386,7 +386,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify 
extends IntegrationT
   protected void processOptions(CommandLine cmd) {
 List args = cmd.getArgList();
 if (args.size() > 0) {
-  usage();
+  printUsage();
   throw new RuntimeException("No args expected.");
 }
 // We always want loadAndVerify action



[49/50] hbase git commit: HBASE-16538 Changes the way version information is stored during build. Instead of writing package-info.java with VersionAnnotation, saveVersion.sh now writes Version.java wi

2016-11-01 Thread larsh
HBASE-16538 Changes the way version information is stored during build.
Instead of writing package-info.java with VersionAnnotation, saveVersion.sh now 
writes Version.java with static members.

Change-Id: I009f440fa049f409e10cb3f1c3afb483bc2aa876


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

Branch: refs/heads/branch-1.0
Commit: fba13a6ef6cfe4c56bfa528b7bbf003482dfc4a4
Parents: 8971176
Author: Apekshit Sharma 
Authored: Thu Sep 1 18:18:48 2016 -0700
Committer: Apekshit Sharma 
Committed: Fri Sep 2 16:44:47 2016 -0700

--
 .../apache/hadoop/hbase/VersionAnnotation.java  | 66 
 .../apache/hadoop/hbase/util/VersionInfo.java   | 34 +++---
 hbase-common/src/saveVersion.sh | 14 +++--
 3 files changed, 19 insertions(+), 95 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/fba13a6e/hbase-common/src/main/java/org/apache/hadoop/hbase/VersionAnnotation.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/VersionAnnotation.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/VersionAnnotation.java
deleted file mode 100644
index f3137ae..000
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/VersionAnnotation.java
+++ /dev/null
@@ -1,66 +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 java.lang.annotation.*;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-
-/**
- * A package attribute that captures the version of hbase that was compiled.
- * Copied down from hadoop.  All is same except name of interface.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.PACKAGE)
-@InterfaceAudience.Private
-public @interface VersionAnnotation {
-
-  /**
-   * Get the Hadoop version
-   * @return the version string "0.6.3-dev"
-   */
-  String version();
-
-  /**
-   * Get the username that compiled Hadoop.
-   */
-  String user();
-
-  /**
-   * Get the date when Hadoop was compiled.
-   * @return the date in unix 'date' format
-   */
-  String date();
-
-  /**
-   * Get the url for the subversion repository.
-   */
-  String url();
-
-  /**
-   * Get the subversion revision.
-   * @return the revision number as a string (eg. "451451")
-   */
-  String revision();
-
-  /**
-   * Get a checksum of the source files from which HBase was compiled.
-   * @return a string that uniquely identifies the source
-   **/
-  String srcChecksum();
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/fba13a6e/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java
index aadad2e..e767d80 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java
@@ -21,41 +21,25 @@ package org.apache.hadoop.hbase.util;
 import org.apache.commons.logging.LogFactory;
 import java.io.PrintWriter;
 
+import org.apache.commons.logging.Log;
+import org.apache.hadoop.hbase.Version;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
-import org.apache.hadoop.hbase.VersionAnnotation;
-import org.apache.commons.logging.Log;
 
 /**
- * This class finds the package info for hbase and the VersionAnnotation
- * information.  Taken from hadoop.  Only name of annotation is different.
+ * This class finds the Version information for HBase.
  */
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class VersionInfo {
   private static final Log LOG = 
LogFactory.getLog(VersionInfo.class.getName

[10/50] hbase git commit: HBASE-15152 Automatically include prefix-tree module in MR jobs if present

2016-11-01 Thread larsh
HBASE-15152 Automatically include prefix-tree module in MR jobs if present


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

Branch: refs/heads/branch-1.0
Commit: 24002e23623472d9e6d5e5a63c834eb442873bf1
Parents: 64e2262
Author: Jonathan M Hsieh 
Authored: Thu Jan 21 07:25:00 2016 -0800
Committer: Jonathan M Hsieh 
Committed: Thu Jan 21 19:01:54 2016 -0800

--
 .../hbase/mapreduce/TableMapReduceUtil.java   | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/24002e23/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
index 410e411..ce273f5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
@@ -705,7 +705,7 @@ public class TableMapReduceUtil {
* Add HBase and its dependencies (only) to the job configuration.
* 
* This is intended as a low-level API, facilitating code reuse between this
-   * class and its mapred counterpart. It also of use to extenral tools that
+   * class and its mapred counterpart. It also of use to external tools that
* need to build a MapReduce job that interacts with HBase but want
* fine-grained control over the jars shipped to the cluster.
* 
@@ -714,6 +714,21 @@ public class TableMapReduceUtil {
* @see https://issues.apache.org/jira/browse/PIG-3285";>PIG-3285
*/
   public static void addHBaseDependencyJars(Configuration conf) throws 
IOException {
+
+// PrefixTreeCodec is part of the hbase-prefix-tree module. If not 
included in MR jobs jar
+// dependencies, MR jobs that write encoded hfiles will fail.
+// We used reflection here so to prevent a circular module dependency.
+// TODO - if we extract the MR into a module, make it depend on 
hbase-prefix-tree.
+Class prefixTreeCodecClass = null;
+try {
+  prefixTreeCodecClass =
+  
Class.forName("org.apache.hadoop.hbase.code.prefixtree.PrefixTreeCodec");
+} catch (ClassNotFoundException e) {
+  // this will show up in unit tests but should not show in real 
deployments
+  LOG.warn("The hbase-prefix-tree module jar containing PrefixTreeCodec is 
not present." +
+  "  Continuing without it.");
+}
+
 addDependencyJars(conf,
   // explicitly pull a class from each module
   org.apache.hadoop.hbase.HConstants.class,  // 
hbase-common
@@ -721,6 +736,7 @@ public class TableMapReduceUtil {
   org.apache.hadoop.hbase.client.Put.class,  // 
hbase-client
   org.apache.hadoop.hbase.CompatibilityFactory.class,// 
hbase-hadoop-compat
   org.apache.hadoop.hbase.mapreduce.TableMapper.class,   // 
hbase-server
+  prefixTreeCodecClass, //  hbase-prefix-tree (if null will be skipped)
   // pull necessary dependencies
   org.apache.zookeeper.ZooKeeper.class,
   io.netty.channel.Channel.class,



[20/50] hbase git commit: HBASE-15224 Undo "hbase.increment.fast.but.narrow.consistency" option; it is not necessary since HBASE-15213

2016-11-01 Thread larsh
HBASE-15224 Undo "hbase.increment.fast.but.narrow.consistency" option; it is 
not necessary since HBASE-15213


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

Branch: refs/heads/branch-1.0
Commit: b9c3419d483493a29b4980cc2b38ca629d80a598
Parents: eb9af81
Author: stack 
Authored: Mon Feb 8 08:43:11 2016 -0800
Committer: stack 
Committed: Mon Feb 8 10:14:57 2016 -0800

--
 .../hadoop/hbase/regionserver/HRegion.java  | 143 +--
 ...tIncrementFromClientSideWithCoprocessor.java |   5 -
 .../client/TestIncrementsFromClientSide.java|  95 ++--
 .../hbase/regionserver/TestAtomicOperation.java |  62 +++-
 .../hbase/regionserver/TestRegionIncrement.java |  24 +---
 5 files changed, 30 insertions(+), 299 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b9c3419d/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 0c5dfe7..8aed3a6 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
@@ -221,16 +221,6 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   "hbase.hregion.scan.loadColumnFamiliesOnDemand";
 
   /**
-   * Set region to take the fast increment path. Constraint is that caller can 
only access the
-   * Cell via Increment; intermixing Increment with other Mutations will give 
indeterminate
-   * results. A Get with {@link IsolationLevel#READ_UNCOMMITTED} will get the 
latest increment
-   * or an Increment of zero will do the same.
-   */
-  public static final String INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY =
-  "hbase.increment.fast.but.narrow.consistency";
-  private final boolean incrementFastButNarrowConsistency;
-
-  /**
* This is the global default value for durability. All tables/mutations not
* defining a durability or using USE_DEFAULT will default to this value.
*/
@@ -712,10 +702,6 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   false :
   conf.getBoolean(HConstants.ENABLE_CLIENT_BACKPRESSURE,
   HConstants.DEFAULT_ENABLE_CLIENT_BACKPRESSURE);
-
-// See #INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY for what this flag is 
about.
-this.incrementFastButNarrowConsistency =
-  this.conf.getBoolean(INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY, false);
   }
 
   void setHTableSpecificConf() {
@@ -5840,139 +5826,14 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
 startRegionOperation(Operation.INCREMENT);
 this.writeRequestsCount.increment();
 try {
-  // Which Increment is it? Narrow increment-only consistency or slow 
(default) and general
-  // row-wide consistency.
-
-  // So, difference between fastAndNarrowConsistencyIncrement and 
slowButConsistentIncrement is
-  // that the former holds the row lock until the sync completes; this 
allows us to reason that
-  // there are no other writers afoot when we read the current increment 
value. The row lock
-  // means that we do not need to wait on mvcc reads to catch up to writes 
before we proceed
-  // with the read, the root of the slowdown seen in HBASE-14460. The 
fast-path also does not
-  // wait on mvcc to complete before returning to the client. We also 
reorder the write so that
-  // the update of memstore happens AFTER sync returns; i.e. the write 
pipeline does less
-  // zigzagging now.
-  //
-  // See the comment on INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY
-  // for the constraints that apply when you take this code path; it is 
correct but only if
-  // Increments are used mutating an Increment Cell; mixing concurrent 
Put+Delete and Increment
-  // will yield indeterminate results.
-  return this.incrementFastButNarrowConsistency?
-fastAndNarrowConsistencyIncrement(increment, nonceGroup, nonce):
-slowButConsistentIncrement(increment, nonceGroup, nonce);
+  return doIncrement(increment, nonceGroup, nonce);
 } finally {
   if (this.metricsRegion != null) this.metricsRegion.updateIncrement();
   closeRegionOperation(Operation.INCREMENT);
 }
   }
 
-  /**
-   * The bulk of this method is a bulk-and-paste of the 
slowButConsistentIncrement but with some
-   * reordering to enable the fast incr

[15/50] hbase git commit: Amend HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname

2016-11-01 Thread larsh
Amend HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname

Fixes for newly introduced FindBugs warnings


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

Branch: refs/heads/branch-1.0
Commit: 7f42fcd6f9db1decd06dfb9484dd22c5704dd917
Parents: b43442c
Author: Andrew Purtell 
Authored: Thu Feb 4 16:17:41 2016 -0800
Committer: Andrew Purtell 
Committed: Thu Feb 4 17:00:23 2016 -0800

--
 .../org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7f42fcd6/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 983153f..3ad3a20 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
@@ -297,7 +297,7 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
   if (Ids.ANYONE_ID_UNSAFE.equals(id)) {
 if (perms != Perms.READ) {
   if (LOG.isDebugEnabled()) {
-LOG.debug(String.format("permissions for '%s' are not correct: 
have %0x, want %0x",
+LOG.debug(String.format("permissions for '%s' are not correct: 
have 0x%x, want 0x%x",
   id, perms, Perms.READ));
   }
   return false;
@@ -312,7 +312,7 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
 if (name.equals(hbaseUser)) {
   if (perms != Perms.ALL) {
 if (LOG.isDebugEnabled()) {
-  LOG.debug(String.format("permissions for '%s' are not correct: 
have %0x, want %0x",
+  LOG.debug(String.format("permissions for '%s' are not correct: 
have 0x%x, want 0x%x",
 id, perms, Perms.ALL));
 }
 return false;
@@ -348,7 +348,7 @@ public class ZooKeeperWatcher implements Watcher, 
Abortable, Closeable {
 } else {
   if (LOG.isDebugEnabled()) {
 LOG.debug(String.format(
-  "superuser '%s' does not have correct permissions: have %0x, 
want %0x",
+  "superuser '%s' does not have correct permissions: have 
0x%x, want 0x%x",
   acl.getId().getId(), acl.getPerms(), Perms.ALL));
   }
 }



[21/50] hbase git commit: HBASE-15198 RPC client not using Codec and CellBlock for puts by default.

2016-11-01 Thread larsh
HBASE-15198 RPC client not using Codec and CellBlock for puts by default.


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

Branch: refs/heads/branch-1.0
Commit: 62206fd9af286a2a40a7567debf890efa255b361
Parents: b9c3419
Author: anoopsjohn 
Authored: Thu Feb 11 16:41:39 2016 +0530
Committer: anoopsjohn 
Committed: Thu Feb 11 16:41:39 2016 +0530

--
 .../hadoop/hbase/client/ClusterConnection.java  |  6 +
 .../hadoop/hbase/client/ConnectionAdapter.java  |  5 
 .../hadoop/hbase/client/ConnectionManager.java  |  5 
 .../hbase/client/MultiServerCallable.java   |  8 ++-
 .../hadoop/hbase/ipc/AbstractRpcClient.java |  5 
 .../org/apache/hadoop/hbase/ipc/RpcClient.java  |  6 +
 .../hadoop/hbase/protobuf/ProtobufUtil.java |  4 
 .../hadoop/hbase/protobuf/RequestConverter.java | 11 ++---
 .../security/access/TestAccessController.java   | 25 
 9 files changed, 37 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/62206fd9/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
index 05d5c63..9ceb112 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
@@ -300,4 +300,10 @@ public interface ClusterConnection extends HConnection {
* @return the configured client backoff policy
*/
   ClientBackoffPolicy getBackoffPolicy();
+
+  /**
+   * @return true when this connection uses a {@link 
org.apache.hadoop.hbase.codec.Codec} and so
+   * supports cell blocks.
+   */
+  boolean hasCellBlockSupport();
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62206fd9/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
index 99da1be..d67df2a 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
@@ -464,4 +464,9 @@ abstract class ConnectionAdapter implements 
ClusterConnection {
   public ClientBackoffPolicy getBackoffPolicy() {
 return wrappedConnection.getBackoffPolicy();
   }
+
+  @Override
+  public boolean hasCellBlockSupport() {
+return wrappedConnection.hasCellBlockSupport();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62206fd9/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
index 5b5ffa1..78fb17f 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
@@ -2522,6 +2522,11 @@ class ConnectionManager {
 public boolean isManaged() {
   return managed;
 }
+
+@Override
+public boolean hasCellBlockSupport() {
+  return this.rpcClient.hasCellBlockSupport();
+}
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/62206fd9/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
index 8d63105..382a8b6 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.CellScannable;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HConstants;
@@ -142,11 +141,8 @@ class MultiServerCallable extends 
RegionServerCallable 

[42/50] hbase git commit: HBASE-15895 Remove unmaintained jenkins build analysis tool.

2016-11-01 Thread larsh
HBASE-15895 Remove unmaintained jenkins build analysis tool.

Signed-off-by: stack 
Signed-off-by: Dima Spivak 
Signed-off-by: Elliott Clark 
Signed-off-by: Apekshit 


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

Branch: refs/heads/branch-1.0
Commit: a55ef158661d24a3567823205213bb56fdfc1164
Parents: edc0a17
Author: Sean Busbey 
Authored: Thu May 26 14:23:15 2016 -0700
Committer: Sean Busbey 
Committed: Fri May 27 16:43:45 2016 -0700

--
 dev-support/jenkins-tools/README.md |  67 -
 dev-support/jenkins-tools/buildstats/pom.xml|  87 ---
 .../BuildResultWithTestCaseDetails.java |  49 
 .../devtools/buildstats/HistoryReport.java  |  88 ---
 .../devtools/buildstats/TestCaseResult.java |  61 -
 .../devtools/buildstats/TestResultHistory.java  | 260 ---
 .../hbase/devtools/buildstats/TestSuite.java|  47 
 dev-support/jenkins-tools/pom.xml   |  36 ---
 8 files changed, 695 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a55ef158/dev-support/jenkins-tools/README.md
--
diff --git a/dev-support/jenkins-tools/README.md 
b/dev-support/jenkins-tools/README.md
deleted file mode 100644
index 9e1905f..000
--- a/dev-support/jenkins-tools/README.md
+++ /dev/null
@@ -1,67 +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.
- */
-
-jenkins-tools
-=
-
-A tool which pulls test case results from Jenkins server. It displays a union 
of failed test cases 
-from the last 15(by default and actual number of jobs can be less depending on 
availablity) runs 
-recorded in Jenkins sever and track how each of them are performed for all the 
last 15 runs(passed, 
-not run or failed)
-
-Pre-requirement(run under folder jenkins-tools)
-   Please download jenkins-client from 
https://github.com/cosmin/jenkins-client
-   1) git clone git://github.com/cosmin/jenkins-client.git
-   2) make sure the dependency jenkins-client version in 
./buildstats/pom.xml matches the 
-  downloaded jenkins-client(current value is 0.1.6-SNAPSHOT)
-   
-Build command(run under folder jenkins-tools):
-
-   mvn clean package
-
-Usage are: 
-
-   java -jar ./buildstats/target/buildstats.jar   [number of last most recent jobs to check]
-
-Sample commands are:
-
-   java -jar ./buildstats/target/buildstats.jar https://builds.apache.org 
HBase-TRUNK
-
-Sample output(where 1 means "PASSED", 0 means "NOT RUN AT ALL", -1 means 
"FAILED"):
-
-Failed Test Cases  3621 3622 3623 3624 3625 3626 3627 3628 3629 
3630 3632 3633 3634 3635
-
-org.apache.hadoop.hbase.catalog.testmetareadereditor.testretrying11   
-101111   -101111
-org.apache.hadoop.hbase.client.testadmin.testdeleteeditunknowncolumnfamilyandortable
0111   -1011011111
-org.apache.hadoop.hbase.client.testfromclientsidewithcoprocessor.testclientpoolthreadlocal
11111111011   -101
-org.apache.hadoop.hbase.client.testhcm.testregioncaching11   -10   
 11   -10   -10   -1011
-org.apache.hadoop.hbase.client.testmultiparallel.testflushcommitswithabort
11111111   -101111
-org.apache.hadoop.hbase.client.testscannertimeout.test3686a111
11111   -101111
-org.apache.hadoop.hbase.coprocessor.example.testrowcountendpoint.org.apache.hadoop.hbase.coprocessor.example.testrowcountendpoint
0   -10   -1000   -1000000
-org.apache.hadoop.hbase.coprocessor.example.testzookeeperscanpolicyobserver.org.apache.hadoop.hbase.coprocessor.example.testzookeeperscanpolicyobserver
0

[18/50] hbase git commit: HBASE-15157 Add *PerformanceTest for Append, CheckAnd*

2016-11-01 Thread larsh
HBASE-15157 Add *PerformanceTest for Append, CheckAnd*


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

Branch: refs/heads/branch-1.0
Commit: 7d90196059c236b05b3a4df0f1ff6bdb39069e10
Parents: 6c555d3
Author: stack 
Authored: Fri Feb 5 11:18:42 2016 -0800
Committer: stack 
Committed: Fri Feb 5 20:39:23 2016 -0800

--
 .../hadoop/hbase/IncrementPerformanceTest.java  | 129 
 .../hadoop/hbase/PerformanceEvaluation.java | 146 ++-
 2 files changed, 141 insertions(+), 134 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7d901960/hbase-server/src/test/java/org/apache/hadoop/hbase/IncrementPerformanceTest.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/IncrementPerformanceTest.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/IncrementPerformanceTest.java
deleted file mode 100644
index bf3a44f..000
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/IncrementPerformanceTest.java
+++ /dev/null
@@ -1,129 +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 java.io.IOException;
-import java.util.HashSet;
-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.atomic.AtomicInteger;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-// import org.apache.hadoop.hbase.client.ConnectionFactory;
-import org.apache.hadoop.hbase.client.HTable;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.util.Tool;
-import org.apache.hadoop.util.ToolRunner;
-
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.MetricName;
-import com.yammer.metrics.core.Timer;
-import com.yammer.metrics.core.TimerContext;
-import com.yammer.metrics.stats.Snapshot;
-
-/**
- * Simple Increments Performance Test. Run this from main. It is to go against 
a cluster.
- * Presumption is the table exists already. Defaults are a zk ensemble of 
localhost:2181,
- * a tableName of 'tableName', a column famly name of 'columnFamilyName', with 
80 threads by
- * default and 1 increments per thread. To change any of these configs, 
pass -DNAME=VALUE as
- * in -DtableName="newTableName". It prints out configuration it is running 
with at the start and
- * on the end it prints out percentiles.
- */
-public class IncrementPerformanceTest implements Tool {
-  private static final Log LOG = 
LogFactory.getLog(IncrementPerformanceTest.class);
-  private static final byte [] QUALIFIER = new byte [] {'q'};
-  private Configuration conf;
-  private final MetricName metricName = new MetricName(this.getClass(), 
"increment");
-  private static final String TABLENAME = "tableName";
-  private static final String COLUMN_FAMILY = "columnFamilyName";
-  private static final String THREAD_COUNT = "threadCount";
-  private static final int DEFAULT_THREAD_COUNT = 80;
-  private static final String INCREMENT_COUNT = "incrementCount";
-  private static final int DEFAULT_INCREMENT_COUNT = 1;
-
-  IncrementPerformanceTest() {}
-
-  public int run(final String [] args) throws Exception {
-Configuration conf = getConf();
-final TableName tableName = TableName.valueOf(conf.get(TABLENAME), 
TABLENAME);
-final byte [] columnFamilyName = Bytes.toBytes(conf.get(COLUMN_FAMILY, 
COLUMN_FAMILY));
-int threadCount = conf.getInt(THREAD_COUNT, DEFAULT_THREAD_COUNT);
-final int incrementCount = conf.getInt(INCREMENT_COUNT, 
DEFAULT_INCREMENT_COUNT);
-LOG.info("Running test with " + HConstants.ZOOKEEPER_QUORUM + "=" +
-  getConf().get(HConstants.ZOOKEEPER_QUORUM) + ", tableName=" + t

[24/50] hbase git commit: HBASE-15252 Data loss when replaying wal if HDFS timeout

2016-11-01 Thread larsh
HBASE-15252 Data loss when replaying wal if HDFS timeout


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

Branch: refs/heads/branch-1.0
Commit: 21ab1843c524c670bab54db9a0082d3439fa7baa
Parents: e521b51
Author: zhangduo 
Authored: Fri Feb 12 08:17:10 2016 +0800
Committer: zhangduo 
Committed: Fri Feb 12 16:26:26 2016 +0800

--
 .../regionserver/wal/ProtobufLogReader.java |   3 +-
 .../hbase/regionserver/wal/TestWALReplay.java   | 113 ++-
 2 files changed, 112 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/21ab1843/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
index 3aba71a..61b3977 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
@@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.wal.WAL.Entry;
 
 import com.google.protobuf.CodedInputStream;
+import com.google.protobuf.InvalidProtocolBufferException;
 
 /**
  * A Protobuf based WAL has the following structure:
@@ -318,7 +319,7 @@ public class ProtobufLogReader extends ReaderBase {
   }
   ProtobufUtil.mergeFrom(builder, new 
LimitInputStream(this.inputStream, size),
 (int)size);
-} catch (IOException ipbe) {
+} catch (InvalidProtocolBufferException ipbe) {
   throw (EOFException) new EOFException("Invalid PB, EOF? Ignoring; 
originalPosition=" +
 originalPosition + ", currentPosition=" + 
this.inputStream.getPos() +
 ", messageSize=" + size + ", currentAvailable=" + 
available).initCause(ipbe);

http://git-wip-us.apache.org/repos/asf/hbase/blob/21ab1843/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
index e2f974e..12295a56 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
@@ -22,9 +22,15 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
 
+import java.io.FilterInputStream;
 import java.io.IOException;
+import java.lang.reflect.Field;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,6 +41,7 @@ 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.FSDataInputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -86,6 +93,7 @@ import org.apache.hadoop.hbase.wal.WAL;
 import org.apache.hadoop.hbase.wal.WALKey;
 import org.apache.hadoop.hbase.wal.WALFactory;
 import org.apache.hadoop.hbase.wal.WALSplitter;
+import org.apache.hadoop.hdfs.DFSInputStream;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -95,6 +103,8 @@ import org.junit.Rule;
 import org.junit.rules.TestName;
 import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
 
 /**
  * Test replay of edits out of a WAL split.
@@ -496,7 +506,7 @@ public class TestWALReplay {
 boolean first = true;
 for (HColumnDescriptor hcd: htd.getFamilies()) {
   addRegionEdits(rowName, hcd.getName(), countPerFamily, this.ee, region, 
"x");
-  if (first ) {
+  if (first) {
 // If first, so we have at least one family w/ different seqid to rest.
 region.flushcache();
 first = false;
@@ -820,9 +830,9 @@ public class

[35/50] hbase git commit: HBASE-15645 hbase.rpc.timeout is not used in operations of HTable

2016-11-01 Thread larsh
HBASE-15645 hbase.rpc.timeout is not used in operations of HTable

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/48f158f0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/48f158f0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/48f158f0

Branch: refs/heads/branch-1.0
Commit: 48f158f0a834c28ec06a88aa39389da685ec7a0e
Parents: 0b20b27
Author: Phil Yang 
Authored: Tue Apr 26 18:02:22 2016 +0800
Committer: stack 
Committed: Tue Apr 26 10:55:36 2016 -0700

--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |  5 ++-
 .../org/apache/hadoop/hbase/client/HTable.java  | 43 +++-
 .../apache/hadoop/hbase/client/HTablePool.java  | 16 
 .../hadoop/hbase/client/RpcRetryingCaller.java  | 16 ++--
 .../hbase/client/RpcRetryingCallerFactory.java  | 25 +++-
 .../client/StatsTrackingRpcRetryingCaller.java  |  2 +-
 .../org/apache/hadoop/hbase/client/Table.java   | 31 ++
 .../client/TestFastFailWithoutTestUtil.java |  2 +-
 .../org/apache/hadoop/hbase/HConstants.java |  4 +-
 .../src/main/resources/hbase-default.xml| 11 -
 .../hadoop/hbase/rest/client/RemoteHTable.java  | 16 
 .../hadoop/hbase/client/HTableWrapper.java  | 16 
 .../org/apache/hadoop/hbase/client/TestHCM.java | 26 +++-
 13 files changed, 191 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/48f158f0/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 8cd3037..73d8c89 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
@@ -183,6 +183,7 @@ public class HBaseAdmin implements Admin {
   private boolean cleanupConnectionOnClose = false; // close the connection in 
close()
   private boolean closed = false;
   private int operationTimeout;
+  private int rpcTimeout;
 
   private RpcRetryingCallerFactory rpcCallerFactory;
 
@@ -237,6 +238,8 @@ public class HBaseAdmin implements Admin {
 "hbase.client.retries.longer.multiplier", 10);
 this.operationTimeout = 
this.conf.getInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT,
 HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT);
+this.rpcTimeout = this.conf.getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
+HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
 
 this.rpcCallerFactory = RpcRetryingCallerFactory.instantiate(this.conf);
   }
@@ -3596,7 +3599,7 @@ public class HBaseAdmin implements Admin {
   }
 
   private  V executeCallable(MasterCallable callable) throws IOException 
{
-RpcRetryingCaller caller = rpcCallerFactory.newCaller();
+RpcRetryingCaller caller = rpcCallerFactory.newCaller(rpcTimeout);
 try {
   return caller.callWithRetries(callable, operationTimeout);
 } finally {

http://git-wip-us.apache.org/repos/asf/hbase/blob/48f158f0/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index 533cbab..2bc0791 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -129,7 +129,8 @@ public class HTable implements HTableInterface, 
RegionLocator {
   protected int scannerCaching;
   protected long scannerMaxResultSize;
   private ExecutorService pool;  // For Multi & Scan
-  private int operationTimeout;
+  private int operationTimeout; // global timeout for each blocking method 
with retrying rpc
+  private int rpcTimeout; // timeout for each rpc request
   private final boolean cleanupPoolOnClose; // shutdown the pool in close()
   private final boolean cleanupConnectionOnClose; // close the connection in 
close()
   private Consistency defaultConsistency = Consistency.STRONG;
@@ -360,6 +361,8 @@ public class HTable implements HTableInterface, 
RegionLocator {
 
 this.operationTimeout = tableName.isSystemTable() ?
 tableConfiguration.getMetaOperationTimeout() : 
tableConfiguration.getOperationTimeout();
+this.rpcTimeout = configuration.getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
+HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
 this.scannerCaching = tableConfiguration.getScannerCaching();
 this.scannerMaxResultSize = tableConfiguration.getScannerMaxResultSize();
 if (this.r

[31/50] hbase git commit: HBASE-15582 SnapshotManifestV1 too verbose when there are no regions

2016-11-01 Thread larsh
HBASE-15582 SnapshotManifestV1 too verbose when there are no regions


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

Branch: refs/heads/branch-1.0
Commit: 47baaed0c7185e8cccfcf9df7ea5b17268b94f37
Parents: d5eb7560
Author: Matteo Bertozzi 
Authored: Fri Apr 1 20:55:21 2016 -0700
Committer: Matteo Bertozzi 
Committed: Fri Apr 1 21:00:32 2016 -0700

--
 .../java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/47baaed0/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java
index 137acf3..6f00692 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifestV1.java
@@ -116,7 +116,7 @@ public class SnapshotManifestV1 {
   final SnapshotDescription desc) throws IOException {
 FileStatus[] regions = FSUtils.listStatus(fs, snapshotDir, new 
FSUtils.RegionDirFilter(fs));
 if (regions == null) {
-  LOG.info("No regions under directory:" + snapshotDir);
+  LOG.debug("No regions under directory:" + snapshotDir);
   return null;
 }
 



[38/50] hbase git commit: Revert "Label the new methods on Table introduced by HBASE-15645 as InterfaceAudience.Private"

2016-11-01 Thread larsh
Revert "Label the new methods on Table introduced by HBASE-15645 as 
InterfaceAudience.Private"

This reverts commit 719993e0fe2b132b75a3689267ae4adff364b6aa.

bad commit message


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

Branch: refs/heads/branch-1.0
Commit: fd5c5fb3887914183a1510f5972e50d9365e02f5
Parents: a837182
Author: Sean Busbey 
Authored: Fri Apr 29 08:44:28 2016 -0500
Committer: Sean Busbey 
Committed: Fri Apr 29 08:44:28 2016 -0500

--
 .../src/main/java/org/apache/hadoop/hbase/client/Table.java  | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/fd5c5fb3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
index ee742b2..8c6169d 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
@@ -606,13 +606,11 @@ public interface Table extends Closeable {
* early and throw SocketTimeoutException.
* @param operationTimeout the total timeout of each operation in 
millisecond.
*/
-  @InterfaceAudience.Private
   public void setOperationTimeout(int operationTimeout);
 
   /**
* Get timeout (millisecond) of each operation for in Table instance.
*/
-  @InterfaceAudience.Private
   public int getOperationTimeout();
 
   /**
@@ -622,12 +620,10 @@ public interface Table extends Closeable {
* retries exhausted or operation timeout reached.
* @param rpcTimeout the timeout of each rpc request in millisecond.
*/
-  @InterfaceAudience.Private
   public void setRpcTimeout(int rpcTimeout);
 
   /**
* Get timeout (millisecond) of each rpc request in this Table instance.
*/
-  @InterfaceAudience.Private
   public int getRpcTimeout();
 }



[33/50] hbase git commit: HBASE-15674 HRegionLocator#getAllRegionLocations should put the results in cache

2016-11-01 Thread larsh
HBASE-15674 HRegionLocator#getAllRegionLocations should put the results in cache

Conflicts:

hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java

hbase-client/src/main/java/org/apache/hadoop/hbase/client/HRegionLocator.java

hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java


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

Branch: refs/heads/branch-1.0
Commit: a74c495f32ff5446377b2b5d6d4d190ca2f00457
Parents: 52f8ad9
Author: chenheng 
Authored: Thu Apr 21 14:16:06 2016 +0800
Committer: chenheng 
Committed: Thu Apr 21 15:00:27 2016 +0800

--
 .../hadoop/hbase/client/ClusterConnection.java  |  3 +++
 .../hadoop/hbase/client/ConnectionAdapter.java  |  6 ++
 .../hadoop/hbase/client/ConnectionManager.java  |  3 ++-
 .../apache/hadoop/hbase/client/ConnectionUtils.java |  1 +
 .../java/org/apache/hadoop/hbase/client/HTable.java |  3 +++
 .../hadoop/hbase/client/TestFromClientSide.java | 16 +++-
 6 files changed, 30 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a74c495f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
index 9ceb112..40c4462 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java
@@ -83,6 +83,9 @@ public interface ClusterConnection extends HConnection {
   @Override
   void clearRegionCache();
 
+
+  void cacheLocation(final TableName tableName, final RegionLocations 
location);
+
   /**
* Allows flushing the region cache of all locations that pertain to
* tableName

http://git-wip-us.apache.org/repos/asf/hbase/blob/a74c495f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
index d67df2a..fd56692 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionAdapter.java
@@ -238,6 +238,12 @@ abstract class ConnectionAdapter implements 
ClusterConnection {
 wrappedConnection.clearRegionCache(tableName);
   }
 
+
+  @Override
+  public void cacheLocation(TableName tableName, RegionLocations location) {
+wrappedConnection.cacheLocation(tableName, location);
+  }
+
   @Override
   public void deleteCachedRegionLocation(HRegionLocation location) {
 wrappedConnection.deleteCachedRegionLocation(location);

http://git-wip-us.apache.org/repos/asf/hbase/blob/a74c495f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
index 78fb17f..ede3157 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
@@ -1296,7 +1296,8 @@ class ConnectionManager {
  * @param tableName The table name.
  * @param location the new location
  */
-private void cacheLocation(final TableName tableName, final 
RegionLocations location) {
+@Override
+public void cacheLocation(final TableName tableName, final RegionLocations 
location) {
   metaCache.cacheLocation(tableName, location);
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/a74c495f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
index b939b17..cd6b0e0 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
@@ -24,6 +24,7 @@ import java.util.con

[47/50] hbase git commit: HBASE-16467 Move AbstractHBaseTool to hbase-common.

2016-11-01 Thread larsh
HBASE-16467 Move AbstractHBaseTool to hbase-common.

Change-Id: Iea3a3cd91fe4ecc9ff253e2795ab885945fa6a25


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

Branch: refs/heads/branch-1.0
Commit: cf2e2fde0d66ebc8abc773f0a70825ac4a38523c
Parents: a049e51
Author: Apekshit Sharma 
Authored: Mon Aug 22 17:19:40 2016 -0700
Committer: Apekshit Sharma 
Committed: Mon Aug 22 17:19:40 2016 -0700

--
 .../hadoop/hbase/util/AbstractHBaseTool.java| 203 +++
 .../hadoop/hbase/util/AbstractHBaseTool.java| 203 ---
 2 files changed, 203 insertions(+), 203 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cf2e2fde/hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractHBaseTool.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractHBaseTool.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractHBaseTool.java
new file mode 100644
index 000..a876aef
--- /dev/null
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractHBaseTool.java
@@ -0,0 +1,203 @@
+/*
+ * 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.util;
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.commons.cli.BasicParser;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+
+/**
+ * Common base class used for HBase command-line tools. Simplifies workflow and
+ * command-line argument parsing.
+ */
+@InterfaceAudience.Private
+public abstract class AbstractHBaseTool implements Tool {
+
+  protected static final int EXIT_SUCCESS = 0;
+  protected static final int EXIT_FAILURE = 1;
+
+  private static final String SHORT_HELP_OPTION = "h";
+  private static final String LONG_HELP_OPTION = "help";
+
+  private static final Log LOG = LogFactory.getLog(AbstractHBaseTool.class);
+
+  private final Options options = new Options();
+
+  protected Configuration conf = null;
+
+  private static final Set requiredOptions = new TreeSet();
+
+  protected String[] cmdLineArgs = null;
+
+  /**
+   * Override this to add command-line options using {@link #addOptWithArg}
+   * and similar methods.
+   */
+  protected abstract void addOptions();
+
+  /**
+   * This method is called to process the options after they have been parsed.
+   */
+  protected abstract void processOptions(CommandLine cmd);
+
+  /** The "main function" of the tool */
+  protected abstract int doWork() throws Exception;
+
+  @Override
+  public Configuration getConf() {
+return conf;
+  }
+
+  @Override
+  public void setConf(Configuration conf) {
+this.conf = conf;
+  }
+
+  @Override
+  public final int run(String[] args) throws IOException {
+if (conf == null) {
+  LOG.error("Tool configuration is not initialized");
+  throw new NullPointerException("conf");
+}
+
+CommandLine cmd;
+try {
+  // parse the command line arguments
+  cmd = parseArgs(args);
+  cmdLineArgs = args;
+} catch (ParseException e) {
+  LOG.error("Error when parsing command-line arguments", e);
+  printUsage();
+  return EXIT_FAILURE;
+}
+
+if (cmd.hasOption(SHORT_HELP_OPTION) || cmd.hasOption(LONG_HELP_OPTION) ||
+!sanityCheckOptions(cmd)) {
+  printUsage();
+  return EXIT_FAILURE;
+}
+
+

[29/50] hbase git commit: HBASE-15430 Failed taking snapshot - Manifest proto-message too large (JunHo Cho)

2016-11-01 Thread larsh
HBASE-15430 Failed taking snapshot - Manifest proto-message too large (JunHo 
Cho)


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

Branch: refs/heads/branch-1.0
Commit: d8a5820becfb776ba7d9f5597e56563ca67dc87e
Parents: 7947de6
Author: Matteo Bertozzi 
Authored: Wed Mar 16 08:52:02 2016 -0700
Committer: Matteo Bertozzi 
Committed: Wed Mar 16 09:15:21 2016 -0700

--
 .../hadoop/hbase/snapshot/SnapshotManifest.java |  17 ++-
 .../hbase/snapshot/SnapshotTestingUtils.java|  18 ++-
 .../hbase/snapshot/TestSnapshotManifest.java| 143 +++
 3 files changed, 172 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d8a5820b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
index 38ccf08..f688e79 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
@@ -18,8 +18,10 @@
 
 package org.apache.hadoop.hbase.snapshot;
 
-import java.io.IOException;
+import com.google.protobuf.CodedInputStream;
+
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -30,7 +32,6 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
@@ -38,6 +39,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.errorhandling.ForeignExceptionSnare;
 import 
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
 import 
org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotDataManifest;
@@ -64,7 +66,9 @@ import org.apache.hadoop.hbase.util.Threads;
 public class SnapshotManifest {
   private static final Log LOG = LogFactory.getLog(SnapshotManifest.class);
 
-  private static final String DATA_MANIFEST_NAME = "data.manifest";
+  public static final String SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY = 
"snapshot.manifest.size.limit";
+
+  public static final String DATA_MANIFEST_NAME = "data.manifest";
 
   private List regionManifests;
   private SnapshotDescription desc;
@@ -74,6 +78,7 @@ public class SnapshotManifest {
   private final Configuration conf;
   private final Path workingDir;
   private final FileSystem fs;
+  private int manifestSizeLimit;
 
   private SnapshotManifest(final Configuration conf, final FileSystem fs,
   final Path workingDir, final SnapshotDescription desc,
@@ -83,6 +88,8 @@ public class SnapshotManifest {
 this.workingDir = workingDir;
 this.conf = conf;
 this.fs = fs;
+
+this.manifestSizeLimit = 
conf.getInt(SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY, 64 * 1024 * 1024);
   }
 
   /**
@@ -430,7 +437,9 @@ public class SnapshotManifest {
 FSDataInputStream in = null;
 try {
   in = fs.open(new Path(workingDir, DATA_MANIFEST_NAME));
-  return SnapshotDataManifest.parseFrom(in);
+  CodedInputStream cin = CodedInputStream.newInstance(in);
+  cin.setSizeLimit(manifestSizeLimit);
+  return SnapshotDataManifest.parseFrom(cin);
 } catch (FileNotFoundException e) {
   return null;
 } finally {

http://git-wip-us.apache.org/repos/asf/hbase/blob/d8a5820b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
index 89754b7..7390b7d 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
@@ -546,16 +546,30 @@ public class SnapshotTestingUtils {
   return createSnapshot(snapshotName, tableName, 
SnapshotManifestV1.DESCRIPTOR_VERSION);
 

[19/50] hbase git commit: HBASE-15214 Valid mutate Ops fail with RPC Codec in use and region moves across.

2016-11-01 Thread larsh
HBASE-15214 Valid mutate Ops fail with RPC Codec in use and region moves across.


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

Branch: refs/heads/branch-1.0
Commit: eb9af81f67ecc95b1b5fe2ee70f5142c1b29bc50
Parents: 7d90196
Author: anoopsjohn 
Authored: Sat Feb 6 12:35:09 2016 +0530
Committer: anoopsjohn 
Committed: Sat Feb 6 12:35:09 2016 +0530

--
 .../hadoop/hbase/protobuf/ProtobufUtil.java | 18 +---
 .../hbase/regionserver/RSRpcServices.java   | 30 ++--
 .../hadoop/hbase/client/TestMultiParallel.java  |  4 +++
 3 files changed, 38 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/eb9af81f/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 db7b074..47acfde 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
@@ -541,7 +541,7 @@ public final class ProtobufUtil {
 MutationType type = proto.getMutateType();
 assert type == MutationType.PUT: type.name();
 long timestamp = proto.hasTimestamp()? proto.getTimestamp(): 
HConstants.LATEST_TIMESTAMP;
-Put put = null;
+Put put = proto.hasRow() ? new Put(proto.getRow().toByteArray(), 
timestamp) : null;
 int cellCount = proto.hasAssociatedCellCount()? 
proto.getAssociatedCellCount(): 0;
 if (cellCount > 0) {
   // The proto has metadata only and the data is separate to be found in 
the cellScanner.
@@ -561,9 +561,7 @@ public final class ProtobufUtil {
 put.add(cell);
   }
 } else {
-  if (proto.hasRow()) {
-put = new Put(proto.getRow().asReadOnlyByteBuffer(), timestamp);
-  } else {
+  if (put == null) {
 throw new IllegalArgumentException("row cannot be null");
   }
   // The proto has the metadata and the data itself
@@ -640,12 +638,8 @@ public final class ProtobufUtil {
   throws IOException {
 MutationType type = proto.getMutateType();
 assert type == MutationType.DELETE : type.name();
-byte [] row = proto.hasRow()? proto.getRow().toByteArray(): null;
-long timestamp = HConstants.LATEST_TIMESTAMP;
-if (proto.hasTimestamp()) {
-  timestamp = proto.getTimestamp();
-}
-Delete delete = null;
+long timestamp = proto.hasTimestamp() ? proto.getTimestamp() : 
HConstants.LATEST_TIMESTAMP;
+Delete delete = proto.hasRow() ? new Delete(proto.getRow().toByteArray(), 
timestamp) : null;
 int cellCount = proto.hasAssociatedCellCount()? 
proto.getAssociatedCellCount(): 0;
 if (cellCount > 0) {
   // The proto has metadata only and the data is separate to be found in 
the cellScanner.
@@ -668,7 +662,9 @@ public final class ProtobufUtil {
 delete.addDeleteMarker(cell);
   }
 } else {
-  delete = new Delete(row, timestamp);
+  if (delete == null) {
+throw new IllegalArgumentException("row cannot be null");
+  }
   for (ColumnValue column: proto.getColumnValueList()) {
 byte[] family = column.getFamily().toByteArray();
 for (QualifierValue qv: column.getQualifierValueList()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/eb9af81f/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 2af42fe..2f4104c 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
@@ -74,7 +74,6 @@ import 
org.apache.hadoop.hbase.exceptions.OperationConflictException;
 import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
 import org.apache.hadoop.hbase.filter.ByteArrayComparable;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
-import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.ipc.HBaseRPCErrorHandler;
 import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.PriorityFunction;
@@ -152,11 +151,9 @@ import 
org.apache.hadoop.hbase.regionserver.HRegion.Operation;
 import org.apache.hadoop.hba

[37/50] hbase git commit: HBASE-15720 Print row locks at the debug dump page

2016-11-01 Thread larsh
HBASE-15720 Print row locks at the debug dump page

Conflicts:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java


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

Branch: refs/heads/branch-1.0
Commit: a837182b79df1eb1bf7c50418d54d9881ea26509
Parents: 719993e
Author: chenheng 
Authored: Thu Apr 28 12:18:32 2016 +0800
Committer: chenheng 
Committed: Thu Apr 28 12:25:06 2016 +0800

--
 .../hadoop/hbase/regionserver/HRegion.java  | 17 +++-
 .../hbase/regionserver/RSDumpServlet.java   | 21 +++-
 2 files changed, 36 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a837182b/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 8aed3a6..18a6684 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
@@ -268,7 +268,6 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   
//
   // Members
   
//
-
   // map from a locked row to the context for that lock including:
   // - CountDownLatch for threads waiting on that row
   // - the thread that owns the lock (allow reentrancy)
@@ -3862,6 +3861,10 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
 return this.stores.get(column);
   }
 
+  public ConcurrentHashMap getLockedRows() {
+return lockedRows;
+  }
+
   /**
* Return HStore instance. Does not do any copy: as the number of store is 
limited, we
*  iterate on the list.
@@ -6774,6 +6777,16 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
 latch.countDown();
   }
 }
+
+@Override
+public String toString() {
+  return "RowLockContext{" +
+"row=" + row +
+", count=" + lockCount +
+", threadName=" + thread.getName() +
+'}';
+}
+
   }
 
   /**
@@ -6867,4 +6880,6 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   public RegionSplitPolicy getSplitPolicy() {
 return this.splitPolicy;
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a837182b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
index 77b68ec..56d0417 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSDumpServlet.java
@@ -23,7 +23,6 @@ import java.io.OutputStream;
 import java.io.PrintStream;
 import java.io.PrintWriter;
 import java.util.Date;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -69,6 +68,10 @@ public class RSDumpServlet extends StateDumpServlet {
 out.println(LINE);
 TaskMonitor.get().dumpAsText(out);
 
+out.println("\n\nRowLocks:");
+out.println(LINE);
+dumpRowLock(hrs, out);
+
 out.println("\n\nExecutors:");
 out.println(LINE);
 dumpExecutors(hrs.getExecutorService(), out);
@@ -100,6 +103,22 @@ public class RSDumpServlet extends StateDumpServlet {
 out.flush();
   }
 
+  public static void dumpRowLock(HRegionServer hrs, PrintWriter out) {
+StringBuilder sb = new StringBuilder();
+for (Region region : hrs.getOnlineRegionsLocalContext()) {
+  HRegion hRegion = (HRegion)region;
+  if (hRegion.getLockedRows().size() > 0) {
+for (HRegion.RowLockContext rowLockContext : 
hRegion.getLockedRows().values()) {
+  sb.setLength(0);
+  sb.append(hRegion.getTableDesc().getTableName()).append(",")
+.append(hRegion.getRegionInfo().getEncodedName()).append(",");
+  sb.append(rowLockContext.toString());
+  out.println(sb.toString());
+}
+  }
+}
+  }
+
   public static void dumpQueue(HRegionServer hrs, Print

[48/50] hbase git commit: HBASE-16518 Remove unused .arcconfig file

2016-11-01 Thread larsh
HBASE-16518 Remove unused .arcconfig file


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

Branch: refs/heads/branch-1.0
Commit: 8971176d89b1a8d45367a095c89221caf96fb3e7
Parents: cf2e2fd
Author: Gary Helmling 
Authored: Mon Aug 29 12:28:46 2016 -0700
Committer: Gary Helmling 
Committed: Mon Aug 29 15:14:57 2016 -0700

--
 .arcconfig | 6 --
 .gitignore | 1 -
 2 files changed, 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8971176d/.arcconfig
--
diff --git a/.arcconfig b/.arcconfig
deleted file mode 100644
index 8eef934..000
--- a/.arcconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "project_id" : "HBaseOnGithub",
-  "conduit_uri" : "https://reviews.facebook.net/";,
-  "copyright_holder" : "Apache Software Foundation",
-  "max_line_length" : 100
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/8971176d/.gitignore
--
diff --git a/.gitignore b/.gitignore
index f9fc9f7..63c7a7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-/.arc_jira_lib
 /.externalToolBuilders
 .project
 *.settings/



[01/50] hbase git commit: HBASE-14221 - Reduce the number of time row comparison is done in a Scan (Ram)

2016-11-01 Thread larsh
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 fd55483bc -> a55842a0a


HBASE-14221 - Reduce the number of time row comparison is done in a Scan
(Ram)

Conflicts:

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java


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

Branch: refs/heads/branch-1.0
Commit: cccf8e6a4a791aa94e738f42370b4f7e1f90353a
Parents: 5d854d3
Author: ramkrishna 
Authored: Fri Jan 8 13:58:52 2016 +0530
Committer: ramkrishna 
Committed: Fri Jan 8 14:02:39 2016 +0530

--
 .../hbase/regionserver/ScanQueryMatcher.java| 32 +++-
 .../hadoop/hbase/regionserver/StoreScanner.java | 20 ++--
 2 files changed, 35 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cccf8e6a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
index 032b4ce..901dbad 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
@@ -278,23 +278,27 @@ public class ScanQueryMatcher {
 if (filter != null && filter.filterAllRemaining()) {
   return MatchCode.DONE_SCAN;
 }
-int ret = this.rowComparator.compareRows(row, this.rowOffset, 
this.rowLength,
+if (row != null) {
+  int ret = this.rowComparator.compareRows(row, this.rowOffset, 
this.rowLength,
 cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
-if (!this.isReversed) {
-  if (ret <= -1) {
-return MatchCode.DONE;
-  } else if (ret >= 1) {
-// could optimize this, if necessary?
-// Could also be called SEEK_TO_CURRENT_ROW, but this
-// should be rare/never happens.
-return MatchCode.SEEK_NEXT_ROW;
+  if (!this.isReversed) {
+if (ret <= -1) {
+  return MatchCode.DONE;
+} else if (ret >= 1) {
+  // could optimize this, if necessary?
+  // Could also be called SEEK_TO_CURRENT_ROW, but this
+  // should be rare/never happens.
+  return MatchCode.SEEK_NEXT_ROW;
+}
+  } else {
+if (ret <= -1) {
+  return MatchCode.SEEK_NEXT_ROW;
+} else if (ret >= 1) {
+  return MatchCode.DONE;
+}
   }
 } else {
-  if (ret <= -1) {
-return MatchCode.SEEK_NEXT_ROW;
-  } else if (ret >= 1) {
-return MatchCode.DONE;
-  }
+  return MatchCode.DONE;
 }
 
 // optimize case.

http://git-wip-us.apache.org/repos/asf/hbase/blob/cccf8e6a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index 94e94d8..b983b12 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@ -474,8 +474,7 @@ public class StoreScanner extends 
NonReversedNonLazyKeyValueScanner
 byte[] row = cell.getRowArray();
 int offset = cell.getRowOffset();
 short length = cell.getRowLength();
-if (limit < 0 || matcher.row == null || !Bytes.equals(row, offset, length, 
matcher.row,
-matcher.rowOffset, matcher.rowLength)) {
+if (limit < 0 || matcher.row == null) {
   this.countPerRow = 0;
   matcher.setRow(row, offset, length);
 }
@@ -512,6 +511,10 @@ public class StoreScanner extends 
NonReversedNonLazyKeyValueScanner
 if (!matcher.moreRowsMayExistAfter(cell)) {
   return false;
 }
+// Setting the matcher.row = null, will mean that after the 
subsequent seekToNextRow()
+// the heap.peek() will any way be in the next row. So the 
SQM.match(cell) need do
+// another compareRow to say the current row is DONE
+matcher.row = null;
 seekToNextRow(cell);
 break LOOP;
   }
@@ -532,6 +535,10 @@ public class StoreScanner extends 
NonReversedNonLazyKeyValueScanner
 if (!matcher.moreRowsMayExistAfter(cell)) {
   return false;
 }
+/

[04/50] hbase git commit: HBASE-15085 IllegalStateException was thrown when scanning on bulkloaded HFiles (Victor Xu)

2016-11-01 Thread larsh
HBASE-15085 IllegalStateException was thrown when scanning on bulkloaded
HFiles (Victor Xu)


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

Branch: refs/heads/branch-1.0
Commit: ccc8e4a23862a2c44752e479cbf1f1bba1814511
Parents: 556741b
Author: ramkrishna 
Authored: Tue Jan 12 14:36:48 2016 +0530
Committer: ramkrishna 
Committed: Tue Jan 12 14:40:27 2016 +0530

--
 .../hbase/mapreduce/LoadIncrementalHFiles.java  |  6 +++
 .../mapreduce/TestLoadIncrementalHFiles.java| 46 
 .../apache/hadoop/hbase/util/HFileTestUtil.java | 25 +--
 3 files changed, 73 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ccc8e4a2/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 23b927b..093e30b 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
@@ -85,6 +85,7 @@ import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.io.hfile.HFileContext;
 import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
+import org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder;
 import org.apache.hadoop.hbase.io.hfile.HFileScanner;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.regionserver.BloomType;
@@ -859,6 +860,11 @@ public class LoadIncrementalHFiles extends Configured 
implements Tool {
   }
 
   private static boolean shouldCopyHFileMetaKey(byte[] key) {
+// skip encoding to keep hfile meta consistent with data block info, see 
HBASE-15085
+if (Bytes.equals(key, HFileDataBlockEncoder.DATA_BLOCK_ENCODING)) {
+  return false;
+}
+
 return !HFile.isReservedFileInfoKey(key);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/ccc8e4a2/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 96fc9bb..ed75e5e 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
@@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.codec.KeyValueCodecWithTags;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.io.hfile.HFileScanner;
@@ -471,6 +472,51 @@ public class TestLoadIncrementalHFiles {
 assertEquals(1000, rowCount);
   }
 
+  @Test
+  public void testSplitStoreFileWithNoneToNone() throws IOException {
+testSplitStoreFileWithDifferentEncoding(DataBlockEncoding.NONE, 
DataBlockEncoding.NONE);
+  }
+
+  @Test
+  public void testSplitStoreFileWithEncodedToEncoded() throws IOException {
+testSplitStoreFileWithDifferentEncoding(DataBlockEncoding.DIFF, 
DataBlockEncoding.DIFF);
+  }
+
+  @Test
+  public void testSplitStoreFileWithEncodedToNone() throws IOException {
+testSplitStoreFileWithDifferentEncoding(DataBlockEncoding.DIFF, 
DataBlockEncoding.NONE);
+  }
+
+  @Test
+  public void testSplitStoreFileWithNoneToEncoded() throws IOException {
+testSplitStoreFileWithDifferentEncoding(DataBlockEncoding.NONE, 
DataBlockEncoding.DIFF);
+  }
+
+  private void testSplitStoreFileWithDifferentEncoding(DataBlockEncoding 
bulkloadEncoding,
+  DataBlockEncoding cfEncoding) throws IOException {
+Path dir = 
util.getDataTestDirOnTestFS("testSplitHFileWithDifferentEncoding");
+FileSystem fs = util.getTestFileSystem();
+Path testIn = new Path(dir, "testhfile");
+HColumnDescriptor familyDesc = new HColumnDescriptor(FAMILY);
+familyDesc.setDataBlockEncoding(cfEncoding);
+HFileTestUtil.createHFileWithDataBlockEncoding(
+util.getConfiguration(), fs, testIn, bulkloadEncoding,
+ 

[02/50] hbase git commit: HBASE-15052 Use EnvironmentEdgeManager in ReplicationSource

2016-11-01 Thread larsh
HBASE-15052 Use EnvironmentEdgeManager in ReplicationSource


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

Branch: refs/heads/branch-1.0
Commit: f4fa859d949f4cffbb5bf8ed17a64bd6c58ce586
Parents: cccf8e6
Author: Matteo Bertozzi 
Authored: Mon Jan 11 09:49:26 2016 -0800
Committer: Matteo Bertozzi 
Committed: Mon Jan 11 09:49:47 2016 -0800

--
 .../hadoop/hbase/replication/regionserver/ReplicationSource.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f4fa859d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index 0d55b94..f3734b2 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -53,6 +53,7 @@ import 
org.apache.hadoop.hbase.replication.ReplicationQueueInfo;
 import org.apache.hadoop.hbase.replication.ReplicationQueues;
 import org.apache.hadoop.hbase.replication.SystemTableWALEntryFilter;
 import org.apache.hadoop.hbase.replication.WALEntryFilter;
+import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.util.Threads;
 
@@ -395,7 +396,7 @@ public class ReplicationSource extends Thread
   sleepMultiplier = 1;
   // if there was nothing to ship and it's not an error
   // set "ageOfLastShippedOp" to  to indicate that we're current
-  this.metrics.setAgeOfLastShippedOp(System.currentTimeMillis());
+  
this.metrics.setAgeOfLastShippedOp(EnvironmentEdgeManager.currentTime());
 }
 if (sleepForRetries("Nothing to replicate", sleepMultiplier)) {
   sleepMultiplier++;



[08/50] hbase git commit: HBASE-15147 Shell should use Admin.listTableNames() instead of Admin.listTables()

2016-11-01 Thread larsh
HBASE-15147 Shell should use Admin.listTableNames() instead of 
Admin.listTables()


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

Branch: refs/heads/branch-1.0
Commit: 886c70d0d95b95ddd928cd5bc1e1fc83b1de2f42
Parents: f1e1312
Author: Enis Soztutar 
Authored: Thu Jan 21 11:09:02 2016 -0800
Committer: Enis Soztutar 
Committed: Thu Jan 21 11:13:08 2016 -0800

--
 hbase-shell/src/main/ruby/hbase/admin.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/886c70d0/hbase-shell/src/main/ruby/hbase/admin.rb
--
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb 
b/hbase-shell/src/main/ruby/hbase/admin.rb
index 4aa715f..749ec50 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -45,7 +45,7 @@ module Hbase
 
#--
 # Returns a list of tables in hbase
 def list(regex = ".*")
-  @admin.listTables(regex).map { |t| t.getNameAsString }
+  @admin.listTableNames(regex).map { |t| t.getNameAsString }
 end
 
 
#--



[07/50] hbase git commit: Updated CHANGES.txt for 1.0.3RC1

2016-11-01 Thread larsh
Updated CHANGES.txt for 1.0.3RC1


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

Branch: refs/heads/branch-1.0
Commit: f1e1312f9790a7c40f6a4b5a1bab2ea1dd559890
Parents: ae8f090
Author: Enis Soztutar 
Authored: Tue Jan 19 18:57:25 2016 -0800
Committer: Enis Soztutar 
Committed: Tue Jan 19 18:57:25 2016 -0800

--
 CHANGES.txt | 34 +++---
 1 file changed, 31 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f1e1312f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index bf7c7d4..102b681 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,9 @@
 HBase Change Log
 
-Release Notes - HBase - Version 1.0.3 - 11/23/2015
+Release Notes - HBase - Version 1.0.3 - 01/26/2016
 
 ** Sub-task
+* [HBASE-14221] - Reduce the number of time row comparison is done in a 
Scan
 * [HBASE-14428] - Upgrade our surefire-plugin from 2.18 to 2.18.1
 * [HBASE-14513] - TestBucketCache runs obnoxious 1k threads in a unit test
 * [HBASE-14519] - Purge TestFavoredNodeAssignmentHelper, a test for an 
abandoned feature that can hang
@@ -16,6 +17,11 @@ Release Notes - HBase - Version 1.0.3 - 11/23/2015
 * [HBASE-14655] - Narrow the scope of doAs() calls to region observer 
notifications for compaction
 * [HBASE-14657] - Remove unneeded API from EncodedSeeker
 * [HBASE-14709] - Parent change breaks graceful_stop.sh on a cluster
+* [HBASE-15031] - Fix merge of MVCC and SequenceID performance regression 
in branch-1.0
+* [HBASE-15095] - isReturnResult=false  on fast path in branch-1.1 and 
branch-1.0 is not respected
+
+** Brainstorming
+* [HBASE-14869] - Better request latency and size histograms
 
 ** Bug
 * [HBASE-13143] - TestCacheOnWrite is flaky and needs a diet
@@ -45,10 +51,9 @@ Release Notes - HBase - Version 1.0.3 - 11/23/2015
 * [HBASE-14474] - DeadLock in RpcClientImpl.Connection.close() 
 * [HBASE-14475] - Region split requests are always audited with "hbase" 
user rather than request user
 * [HBASE-14489] - postScannerFilterRow consumes a lot of CPU
-* [HBASE-14491] - ReplicationSource#countDistinctRowKeys code logic is not 
correct
 * [HBASE-14492] - Increase REST server header buffer size from 8k to 64k
 * [HBASE-14494] - Wrong usage messages on shell commands
-* [HBASE-14501] - NPE in replication with TDE
+* [HBASE-14501] - NPE in replication when HDFS transparent encryption is 
enabled.
 * [HBASE-14510] - Can not set coprocessor from Shell after HBASE-14224
 * [HBASE-14545] - TestMasterFailover often times out
 * [HBASE-14577] - HBase shell help for scan and returning a column family 
has a typo
@@ -67,7 +72,25 @@ Release Notes - HBase - Version 1.0.3 - 11/23/2015
 * [HBASE-14705] - Javadoc for KeyValue constructor is not correct.
 * [HBASE-14733] - Minor typo in alter_namespace.rb
 * [HBASE-14759] - Avoid using Math.abs when selecting SyncRunner in FSHLog
+* [HBASE-14761] - Deletes with and without visibility expression do not 
delete the matching mutation
 * [HBASE-14768] - bin/graceful_stop.sh logs nothing as a balancer state to 
be stored
+* [HBASE-14799] - Commons-collections object deserialization remote 
command execution vulnerability 
+* [HBASE-14806] - Missing sources.jar for several modules when building 
HBase
+* [HBASE-14822] - Renewing leases of scanners doesn't work
+* [HBASE-14840] - Sink cluster reports data replication request as success 
though the data is not replicated
+* [HBASE-14904] - Mark Base[En|De]coder LimitedPrivate and fix binary 
compat issue
+* [HBASE-14923] - VerifyReplication should not mask the exception during 
result comparison 
+* [HBASE-14930] - check_compatibility.sh needs smarter exit codes
+* [HBASE-14936] - CombinedBlockCache should overwrite 
CacheStats#rollMetricsPeriod()
+* [HBASE-14940] - Make our unsafe based ops more safe
+* [HBASE-14968] - ConcurrentModificationException in region close 
resulting in the region staying in closing state
+* [HBASE-14989] - Implementation of Mutation.getWriteToWAL() is backwards
+* [HBASE-15035] - bulkloading hfiles with tags that require splits do not 
preserve tags
+* [HBASE-15052] - Use EnvironmentEdgeManager in ReplicationSource 
+* [HBASE-15083] - Gets from Multiactions are not counted in metrics for 
gets.
+* [HBASE-15085] - IllegalStateException was thrown when scanning on 
bulkloaded HFiles
+* [HBASE-15104] - Occasional failures due to NotServingRegionException in 
IT tests
+* [HBASE-15108] 

[09/50] hbase git commit: HBASE-15150 Fix TestDurablity in branch-1.1 (Yu Li)

2016-11-01 Thread larsh
HBASE-15150 Fix TestDurablity in branch-1.1 (Yu Li)


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

Branch: refs/heads/branch-1.0
Commit: 64e22626adc20162cfb5da71f0fc68797a888fa4
Parents: 886c70d
Author: stack 
Authored: Thu Jan 21 14:37:36 2016 -0800
Committer: stack 
Committed: Thu Jan 21 14:37:36 2016 -0800

--
 .../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/64e22626/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 8df37ff..4b8f3b6 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
@@ -6074,7 +6074,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
 }
 // Request a cache flush.  Do it outside update lock.
 if (isFlushSize(this.addAndGetGlobalMemstoreSize(accumulatedResultSize))) 
requestFlush();
-return Result.create(allKVs);
+return increment.isReturnResults() ? Result.create(allKVs) : null;
   }
 
   /**



[05/50] hbase git commit: HBASE-15095 isReturnResult=false on fast path in branch-1.1 and branch-1.0 is not respected

2016-11-01 Thread larsh
HBASE-15095 isReturnResult=false on fast path in branch-1.1 and branch-1.0 is 
not respected


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

Branch: refs/heads/branch-1.0
Commit: 927729362f7a6cac33ad990b06314b9252dfb278
Parents: ccc8e4a
Author: chenheng 
Authored: Wed Jan 13 11:13:35 2016 +0800
Committer: chenheng 
Committed: Wed Jan 13 11:13:35 2016 +0800

--
 .../org/apache/hadoop/hbase/client/Append.java  |  1 -
 .../apache/hadoop/hbase/client/Increment.java   | 12 
 .../apache/hadoop/hbase/client/Mutation.java|  2 +
 .../hadoop/hbase/regionserver/HRegion.java  |  4 +-
 .../client/TestIncrementsFromClientSide.java| 62 +++-
 5 files changed, 51 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/92772936/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
index 58c204b6..1bdb121 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
@@ -47,7 +47,6 @@ import org.apache.hadoop.hbase.util.Bytes;
 @InterfaceAudience.Public
 @InterfaceStability.Stable
 public class Append extends Mutation {
-  private static final String RETURN_RESULTS = "_rr_";
   /**
* @param returnResults
*  True (default) if the append operation should return the results.

http://git-wip-us.apache.org/repos/asf/hbase/blob/92772936/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
index af0ea56..f090cf0 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
@@ -90,6 +90,18 @@ public class Increment extends Mutation implements 
Comparable {
   }
 
   /**
+   * @return current setting for returnResults
+   */
+  public boolean isReturnResults() {
+byte[] v = getAttribute(RETURN_RESULTS);
+return v == null ? true : Bytes.toBoolean(v);
+  }
+
+  public Increment setReturnResults(boolean returnResults) {
+setAttribute(RETURN_RESULTS, Bytes.toBytes(returnResults));
+return this;
+  }
+  /**
* Add the specified KeyValue to this operation.
* @param cell individual Cell
* @return this

http://git-wip-us.apache.org/repos/asf/hbase/blob/92772936/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
index 2b88ffc..2444cf4 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
@@ -83,6 +83,8 @@ public abstract class Mutation extends 
OperationWithAttributes implements Row, C
*/
   private static final String OP_ATTRIBUTE_TTL = "_ttl";
 
+  protected static final String RETURN_RESULTS = "_rr_";
+
   protected byte [] row = null;
   protected long ts = HConstants.LATEST_TIMESTAMP;
   protected Durability durability = Durability.USE_DEFAULT;

http://git-wip-us.apache.org/repos/asf/hbase/blob/92772936/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 e655f4e..8df37ff 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
@@ -5893,7 +5893,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver { //
   try {
 if (this.coprocessorHost != null) {
   Result r = this.coprocessorHost.preIncrementAfterRowLock(increment);
-  if (r != null) return r;
+  if (r != null) return increment.isReturnResults() ? r : null;
 }
 // Process increments a Store/family at a time.
 long now = Environmen

[47/50] [abbrv] hbase git commit: HBASE-16969 RegionCoprocessorServiceExec should override the toString() for debugging (ChiaPing Tsai)

2016-11-01 Thread larsh
HBASE-16969 RegionCoprocessorServiceExec should override the toString() for 
debugging (ChiaPing Tsai)


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

Branch: refs/heads/branch-1
Commit: a969f8d7903d07ca1f6672db4b2a739c227e70a0
Parents: ea5b0a0
Author: Michael Stack 
Authored: Mon Oct 31 14:37:51 2016 -0700
Committer: Michael Stack 
Committed: Mon Oct 31 14:37:51 2016 -0700

--
 .../hbase/client/RegionCoprocessorServiceExec.java| 14 ++
 .../apache/hadoop/hbase/CoordinatedStateManager.java  |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a969f8d7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionCoprocessorServiceExec.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionCoprocessorServiceExec.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionCoprocessorServiceExec.java
index 2d62332..cd4716e 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionCoprocessorServiceExec.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionCoprocessorServiceExec.java
@@ -101,4 +101,18 @@ public class RegionCoprocessorServiceExec implements Row {
 Row other = (Row) obj;
 return compareTo(other) == 0;
   }
+
+  @Override
+  public String toString() {
+StringBuilder builder = new StringBuilder();
+builder.append("region:")
+   .append(Bytes.toStringBinary(region))
+   .append(", startKey:")
+   .append(Bytes.toStringBinary(startKey))
+   .append(", method:")
+   .append(method.getFullName())
+   .append(", request:")
+   .append(request);
+return builder.toString();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a969f8d7/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java
index b7bfa75..bdb202d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java
@@ -20,7 +20,7 @@ package org.apache.hadoop.hbase;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 
 /**
- * Implementations of this interface will keep and return to clients 
+ * Implementations of this interface will keep and return to clients
  * implementations of classes providing API to execute
  * coordinated operations. This interface is client-side, so it does NOT
  * include methods to retrieve the particular interface implementations.



[44/50] [abbrv] hbase git commit: HBASE-16450 Shell tool to dump replication queues

2016-11-01 Thread larsh
HBASE-16450 Shell tool to dump replication queues

New tool to dump existing replication peers, configurations and
queues when using HBase Replication. The tool provides two flags:

 --distributed  This flag will poll each RS for information about
the replication queues being processed on this RS.
By default this is not enabled and the information
about the replication queues and configuration will
be obtained from ZooKeeper.
 --hdfs When --distributed is used, this flag will attempt
to calculate the total size of the WAL files used
by the replication queues. Since its possible that
multiple peers can be configured this value can be
overestimated.

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/0a41493a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0a41493a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0a41493a

Branch: refs/heads/branch-1
Commit: 0a41493ac4e5ad0e0feac82cd17531c3d2a27089
Parents: d4826e1
Author: Esteban Gutierrez 
Authored: Mon Aug 22 19:53:29 2016 -0700
Committer: Michael Stack 
Committed: Thu Oct 27 21:38:42 2016 -0700

--
 .../replication/ReplicationQueuesZKImpl.java|   2 +-
 .../apache/hadoop/hbase/zookeeper/ZKUtil.java   |  11 +
 .../regionserver/DumpReplicationQueues.java | 355 +++
 3 files changed, 367 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0a41493a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
index 37d23ef..c7af78e 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
@@ -162,7 +162,7 @@ public class ReplicationQueuesZKImpl extends 
ReplicationStateZKBase implements R
   return ZKUtil.parseWALPositionFrom(bytes);
 } catch (DeserializationException de) {
   LOG.warn("Failed to parse WALPosition for queueId=" + queueId + " and 
wal=" + filename
-  + "znode content, continuing.");
+  + " znode content, continuing.");
 }
 // if we can not parse the position, start at the beginning of the wal file
 // again

http://git-wip-us.apache.org/repos/asf/hbase/blob/0a41493a/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 ff837cb..66ddb62 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
@@ -1825,6 +1825,17 @@ public class ZKUtil {
 }
   }
 
+  /**
+   * Returns a string with replication znodes and position of the replication 
log
+   * @param zkw
+   * @return aq string of replication znodes and log positions
+   */
+  public static String getReplicationZnodesDump(ZooKeeperWatcher zkw) throws 
KeeperException {
+StringBuilder sb = new StringBuilder();
+getReplicationZnodesDump(zkw, sb);
+return sb.toString();
+  }
+
   private static void appendRSZnodes(ZooKeeperWatcher zkw, String znode, 
StringBuilder sb)
   throws KeeperException {
 List stack = new LinkedList();

http://git-wip-us.apache.org/repos/asf/hbase/blob/0a41493a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
new file mode 100644
index 000..bf38d6f
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
@@ -0,0 +1,355 @@
+/**
+ * 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 fil

[50/50] [abbrv] hbase git commit: HBASE-16970 Clarify misleading Scan.java comment about caching

2016-11-01 Thread larsh
HBASE-16970 Clarify misleading Scan.java comment about caching

Signed-off-by: Yu Li 


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

Branch: refs/heads/branch-1
Commit: 5fdddae55e7220afbc5f21d90792915dd25da39f
Parents: b3ddea9
Author: Jim Kleckner 
Authored: Tue Nov 1 17:31:23 2016 +0800
Committer: Yu Li 
Committed: Tue Nov 1 17:48:56 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/5fdddae5/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 a518ffb..ac7e190 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
@@ -136,7 +136,8 @@ public class Scan extends Query {
   public static final String HINT_LOOKAHEAD = "_look_ahead_";
 
   /*
-   * -1 means no caching
+   * -1 means no caching specified and the value of {@link 
HConstants#HBASE_CLIENT_SCANNER_CACHING}
+   * (default to {@link HConstants#DEFAULT_HBASE_CLIENT_SCANNER_CACHING}) will 
be used
*/
   private int caching = -1;
   private long maxResultSize = -1;



[40/50] [abbrv] hbase git commit: HBASE-16910 Avoid NPE when starting StochasticLoadBalancer

2016-11-01 Thread larsh
HBASE-16910 Avoid NPE when starting StochasticLoadBalancer

Signed-off-by: Ashish Singhi 


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

Branch: refs/heads/branch-1
Commit: ae502a9d5ce3dc5c4a485c3ff364d433bdf29a10
Parents: 16823ff
Author: Guanghao Zhang 
Authored: Tue Oct 25 11:58:41 2016 +0530
Committer: Ashish Singhi 
Committed: Tue Oct 25 11:58:41 2016 +0530

--
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java  | 2 +-
 .../hadoop/hbase/master/balancer/StochasticLoadBalancer.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ae502a9d/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index e079b3b..ba067e7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -774,8 +774,8 @@ public class HMaster extends HRegionServer implements 
MasterServices, Server {
 }
 
 //initialize load balancer
-this.balancer.setClusterStatus(getClusterStatus());
 this.balancer.setMasterServices(this);
+this.balancer.setClusterStatus(getClusterStatus());
 this.balancer.initialize();
 
 // Check if master is shutting down because of some issue

http://git-wip-us.apache.org/repos/asf/hbase/blob/ae502a9d/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 d497d42..7d7dc8e 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
@@ -232,7 +232,7 @@ public class StochasticLoadBalancer extends 
BaseLoadBalancer {
 
   updateMetricsSize(tablesCount * (functionsCount + 1)); // +1 for overall
 } catch (Exception e) {
-  LOG.error("failed to get the size of all tables, exception = " + 
e.getMessage());
+  LOG.error("failed to get the size of all tables", e);
 }
   }
 



[45/50] [abbrv] hbase git commit: HBASE-16951 1.3 assembly scripts dont package hbase-archetypes in the tarball

2016-11-01 Thread larsh
HBASE-16951 1.3 assembly scripts dont package hbase-archetypes in the tarball


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

Branch: refs/heads/branch-1
Commit: 0f158edb3aba82101275ae5f6750827e09150d59
Parents: 0a41493
Author: Mikhail Antonov 
Authored: Wed Oct 26 23:20:42 2016 -0700
Committer: Mikhail Antonov 
Committed: Fri Oct 28 15:55:18 2016 -0700

--
 hbase-assembly/src/main/assembly/src.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0f158edb/hbase-assembly/src/main/assembly/src.xml
--
diff --git a/hbase-assembly/src/main/assembly/src.xml 
b/hbase-assembly/src/main/assembly/src.xml
index 16b22ee..b972bfd 100644
--- a/hbase-assembly/src/main/assembly/src.xml
+++ b/hbase-assembly/src/main/assembly/src.xml
@@ -32,6 +32,7 @@
   true
   
 org.apache.hbase:hbase-annotations
+org.apache.hbase:hbase-archetypes
 org.apache.hbase:hbase-assembly
 org.apache.hbase:hbase-checkstyle
 org.apache.hbase:hbase-client



[39/50] [abbrv] hbase git commit: HBASE-16931 Setting cell's seqId to zero in compaction flow might cause RS down.

2016-11-01 Thread larsh
HBASE-16931 Setting cell's seqId to zero in compaction flow might cause RS down.

Signed-off-by: Yu Li 


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

Branch: refs/heads/branch-1
Commit: 16823ff55e7da4822d82fb2a2108b4a253fd42f9
Parents: a1536c2
Author: binlijin 
Authored: Mon Oct 24 23:31:14 2016 +0800
Committer: Yu Li 
Committed: Mon Oct 24 23:33:34 2016 +0800

--
 .../regionserver/compactions/Compactor.java | 17 +++-
 .../hbase/regionserver/TestCompaction.java  | 83 +++-
 2 files changed, 94 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/16823ff5/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 c6fc0c6..b6d145d 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
@@ -26,8 +26,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import com.google.common.io.Closeables;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -58,6 +56,8 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
 
+import com.google.common.io.Closeables;
+
 /**
  * A compactor is a compaction algorithm associated a given policy. Base class 
also contains
  * reusable parts for implementing compactors (what is common and what isn't 
is evolving).
@@ -75,7 +75,7 @@ public abstract class Compactor {
   protected final Compression.Algorithm compactionCompression;
 
   /** specify how many days to keep MVCC values during major compaction **/ 
-  protected final int keepSeqIdPeriod;
+  protected int keepSeqIdPeriod;
 
   //TODO: depending on Store is not good but, realistically, all compactors 
currently do.
   Compactor(final Configuration conf, final Store store) {
@@ -435,9 +435,16 @@ public abstract class Compactor {
   now = EnvironmentEdgeManager.currentTime();
 }
 // output to writer:
+Cell lastCleanCell = null;
+long lastCleanCellSeqId = 0;
 for (Cell c : cells) {
   if (cleanSeqId && c.getSequenceId() <= smallestReadPoint) {
+lastCleanCell = c;
+lastCleanCellSeqId = c.getSequenceId();
 CellUtil.setSequenceId(c, 0);
+  } else {
+lastCleanCell = null;
+lastCleanCellSeqId = 0;
   }
   writer.append(c);
   int len = KeyValueUtil.length(c);
@@ -459,6 +466,10 @@ public abstract class Compactor {
 }
   }
 }
+if (lastCleanCell != null) {
+  // HBASE-16931, set back sequence id to avoid affecting scan order 
unexpectedly
+  CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);
+}
 // Log the progress of long running compactions every minute if
 // logging at DEBUG level
 if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/16823ff5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index da0bf42..6b1382f 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -50,10 +50,9 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon;
 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.security.User;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.cl

[30/50] [abbrv] hbase git commit: HBASE-16752 Return error back to rpc client on exceeding rpc request size limit.

2016-11-01 Thread larsh
HBASE-16752 Return error back to rpc client on exceeding rpc request size limit.

Signed-off-by: Gary Helmling 


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

Branch: refs/heads/branch-1
Commit: 33e89fa9cfd4036fe972ff892df957603ae25bbf
Parents: a97aef5
Author: Ashu Pachauri 
Authored: Thu Oct 6 17:09:19 2016 -0700
Committer: Gary Helmling 
Committed: Wed Oct 19 15:50:42 2016 -0700

--
 .../hbase/exceptions/ClientExceptionsUtil.java  |  2 +-
 .../exceptions/RequestTooBigException.java  | 43 +
 .../org/apache/hadoop/hbase/ipc/RpcServer.java  | 49 ++--
 .../hadoop/hbase/ipc/AbstractTestIPC.java   | 17 ---
 4 files changed, 101 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/33e89fa9/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
index f367ed9..8acfe49 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
@@ -63,7 +63,7 @@ public final class ClientExceptionsUtil {
 || cur instanceof RegionTooBusyException || cur instanceof 
ThrottlingException
 || cur instanceof MultiActionResultTooLarge || cur instanceof 
RetryImmediatelyException
 || cur instanceof CallQueueTooBigException || cur instanceof 
CallDroppedException
-|| cur instanceof NotServingRegionException);
+|| cur instanceof NotServingRegionException || cur instanceof 
RequestTooBigException);
   }
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/33e89fa9/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
new file mode 100644
index 000..31baebb
--- /dev/null
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
@@ -0,0 +1,43 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.classification.InterfaceStability;
+
+/**
+ * Thrown when the size of the rpc request received by the server is too large.
+ *
+ * On receiving such an exception, the client does not retry the offending rpc.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class RequestTooBigException extends DoNotRetryIOException {
+
+  private static final long serialVersionUID = -1593339239809586516L;
+
+  public RequestTooBigException() {
+super();
+  }
+
+  public RequestTooBigException(String message) {
+super(message);
+  }
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/33e89fa9/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 90a53bc..9c21bbe 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -24,6 +24,7 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 i

[38/50] [abbrv] hbase git commit: Revert "HBASE-16562 ITBLL should fail to start if misconfigured"

2016-11-01 Thread larsh
Revert "HBASE-16562 ITBLL should fail to start if misconfigured"

This reverts commit 38b946c2762d10f547de3e6c2b0676d3f7dfbd54.

See discussion on JIRA.


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

Branch: refs/heads/branch-1
Commit: a1536c28763014153510f3f14a82587d32c14572
Parents: 65c2dd4
Author: Sean Busbey 
Authored: Mon Oct 24 09:16:53 2016 -0500
Committer: Sean Busbey 
Committed: Mon Oct 24 09:16:53 2016 -0500

--
 .../hadoop/hbase/test/IntegrationTestBigLinkedList.java  | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a1536c28/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 366fc02..2d828f4 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
@@ -678,17 +678,6 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
 Integer wrapMultiplier = (args.length < 5) ? null : 
Integer.parseInt(args[4]);
 Integer numWalkers = (args.length < 6) ? null : 
Integer.parseInt(args[5]);
-
-long wrap = (long)width*wrapMultiplier;
-if (wrap < numNodes && numNodes % wrap != 0) {
-  /**
-   *  numNodes should be a multiple of width*wrapMultiplier.
-   *  If numNodes less than wrap, wrap will be set to be equal with 
numNodes,
-   *  See {@link GeneratorMapper#setup(Mapper.Context)}
-   * */
-  System.err.println(USAGE);
-  return 1;
-}
 return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier, 
numWalkers);
   } catch (NumberFormatException e) {
 System.err.println("Parsing generator arguments failed: " + 
e.getMessage());



[35/50] [abbrv] hbase git commit: HBASE-16815 Low scan ratio in RPC queue tuning triggers divide by zero exception

2016-11-01 Thread larsh
HBASE-16815 Low scan ratio in RPC queue tuning triggers divide by zero exception

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/e395bf91
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e395bf91
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e395bf91

Branch: refs/heads/branch-1
Commit: e395bf91dbafc7d892966122972e70c5446f3a09
Parents: 9fda0dd
Author: Guanghao Zhang 
Authored: Fri Oct 14 18:29:25 2016 +0800
Committer: Matteo Bertozzi 
Committed: Fri Oct 21 17:00:24 2016 -0700

--
 .../apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java  | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e395bf91/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
index 68e7b65..7ca9196 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
@@ -145,17 +145,16 @@ public class RWQueueRpcExecutor extends RpcExecutor {
 this.scanBalancer = numScanQueues > 0 ? getBalancer(numScanQueues) : null;
 
 queues = new ArrayList>(numWriteQueues + 
numReadQueues + numScanQueues);
-LOG.debug(name + " writeQueues=" + numWriteQueues + " writeHandlers=" + 
writeHandlersCount +
-  " readQueues=" + numReadQueues + " readHandlers=" + 
readHandlersCount +
-  ((numScanQueues == 0) ? "" : " scanQueues=" + numScanQueues +
-" scanHandlers=" + scanHandlersCount));
+LOG.info(name + " writeQueues=" + numWriteQueues + " writeHandlers=" + 
writeHandlersCount
++ " readQueues=" + numReadQueues + " readHandlers=" + 
readHandlersCount + " scanQueues="
++ numScanQueues + " scanHandlers=" + scanHandlersCount);
+
 if (writeQueueInitArgs.length > 0) {
   currentQueueLimit = (int) writeQueueInitArgs[0];
   writeQueueInitArgs[0] = Math.max((int) writeQueueInitArgs[0],
 DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
 }
 for (int i = 0; i < numWriteQueues; ++i) {
-
   queues.add((BlockingQueue)
 ReflectionUtils.newInstance(writeQueueClass, writeQueueInitArgs));
 }
@@ -175,8 +174,10 @@ public class RWQueueRpcExecutor extends RpcExecutor {
   protected void startHandlers(final int port) {
 startHandlers(".write", writeHandlersCount, queues, 0, numWriteQueues, 
port);
 startHandlers(".read", readHandlersCount, queues, numWriteQueues, 
numReadQueues, port);
-startHandlers(".scan", scanHandlersCount, queues,
-  numWriteQueues + numReadQueues, numScanQueues, port);
+if (numScanQueues > 0) {
+  startHandlers(".scan", scanHandlersCount, queues, numWriteQueues + 
numReadQueues,
+numScanQueues, port);
+}
   }
 
   @Override



[18/50] [abbrv] hbase git commit: HBASE-16816 HMaster.move() should throw exception if region to move is not online (Allan Yang)

2016-11-01 Thread larsh
HBASE-16816 HMaster.move() should throw exception if region to move is not 
online (Allan Yang)


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

Branch: refs/heads/branch-1
Commit: 57d3e9e7562b3e7410293d1462075758b1793f88
Parents: ca58187
Author: tedyu 
Authored: Thu Oct 13 11:11:11 2016 -0700
Committer: tedyu 
Committed: Thu Oct 13 11:11:11 2016 -0700

--
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java   | 5 +
 .../java/org/apache/hadoop/hbase/master/TestWarmupRegion.java   | 2 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/57d3e9e7/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index b1051f5..8db8324 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1501,6 +1501,11 @@ public class HMaster extends HRegionServer implements 
MasterServices, Server {
   getRegionState(Bytes.toString(encodedRegionName));
 if (regionState == null) {
   throw new 
UnknownRegionException(Bytes.toStringBinary(encodedRegionName));
+} else if (!assignmentManager.getRegionStates()
+.isRegionOnline(regionState.getRegion())) {
+  throw new HBaseIOException(
+  "moving region not onlined: " + regionState.getRegion() + ", "
+  + regionState);
 }
 
 HRegionInfo hri = regionState.getRegion();

http://git-wip-us.apache.org/repos/asf/hbase/blob/57d3e9e7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java
index 9046397..533363d 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java
@@ -157,6 +157,8 @@ public class TestWarmupRegion {
HRegionServer rs = 
TEST_UTIL.getMiniHBaseCluster().getRegionServer(serverid);
byte [] destName = Bytes.toBytes(rs.getServerName().toString());

TEST_UTIL.getMiniHBaseCluster().getMaster().move(info.getEncodedNameAsBytes(), 
destName);
+   //wait region online
+   TEST_UTIL.waitUntilNoRegionsInTransition(1000);
serverid = (serverid + 1) % 2;
  }
}



[41/50] [abbrv] hbase git commit: HBASE-16939 ExportSnapshot: set owner and permission on right directory

2016-11-01 Thread larsh
HBASE-16939 ExportSnapshot: set owner and permission on right directory

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/4edd8a63
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4edd8a63
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4edd8a63

Branch: refs/heads/branch-1
Commit: 4edd8a63d2afa57a1c7029b2d6badeede8855097
Parents: ae502a9
Author: Guanghao Zhang 
Authored: Tue Oct 25 10:36:55 2016 +0800
Committer: Matteo Bertozzi 
Committed: Tue Oct 25 14:11:59 2016 -0700

--
 .../hadoop/hbase/snapshot/ExportSnapshot.java   | 29 
 1 file changed, 24 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4edd8a63/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
index 35ce2d7..89dcd37 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
@@ -930,6 +930,19 @@ public class ExportSnapshot extends Configured implements 
Tool {
 Path outputSnapshotDir = 
SnapshotDescriptionUtils.getCompletedSnapshotDir(targetName, outputRoot);
 Path initialOutputSnapshotDir = skipTmp ? outputSnapshotDir : 
snapshotTmpDir;
 
+// Find the necessary directory which need to change owner and group
+Path needSetOwnerDir = 
SnapshotDescriptionUtils.getSnapshotRootDir(outputRoot);
+if (outputFs.exists(needSetOwnerDir)) {
+  if (skipTmp) {
+needSetOwnerDir = outputSnapshotDir;
+  } else {
+needSetOwnerDir = 
SnapshotDescriptionUtils.getWorkingSnapshotDir(outputRoot);
+if (outputFs.exists(needSetOwnerDir)) {
+  needSetOwnerDir = snapshotTmpDir;
+}
+  }
+}
+
 // Check if the snapshot already exists
 if (outputFs.exists(outputSnapshotDir)) {
   if (overwrite) {
@@ -967,15 +980,21 @@ public class ExportSnapshot extends Configured implements 
Tool {
 try {
   LOG.info("Copy Snapshot Manifest");
   FileUtil.copy(inputFs, snapshotDir, outputFs, initialOutputSnapshotDir, 
false, false, conf);
+} catch (IOException e) {
+  throw new ExportSnapshotException("Failed to copy the snapshot 
directory: from=" +
+snapshotDir + " to=" + initialOutputSnapshotDir, e);
+} finally {
   if (filesUser != null || filesGroup != null) {
-setOwner(outputFs, snapshotTmpDir, filesUser, filesGroup, true);
+LOG.warn((filesUser == null ? "" : "Change the owner of " + 
needSetOwnerDir + " to "
++ filesUser)
++ (filesGroup == null ? "" : ", Change the group of " + 
needSetOwnerDir + " to "
++ filesGroup));
+setOwner(outputFs, needSetOwnerDir, filesUser, filesGroup, true);
   }
   if (filesMode > 0) {
-setPermission(outputFs, snapshotTmpDir, (short)filesMode, true);
+LOG.warn("Change the permission of " + needSetOwnerDir + " to " + 
filesMode);
+setPermission(outputFs, needSetOwnerDir, (short)filesMode, true);
   }
-} catch (IOException e) {
-  throw new ExportSnapshotException("Failed to copy the snapshot 
directory: from=" +
-snapshotDir + " to=" + initialOutputSnapshotDir, e);
 }
 
 // Write a new .snapshotinfo if the target name is different from the 
source name



[31/50] [abbrv] hbase git commit: HBASE-16698 Performance issue: handlers stuck waiting for CountDownLatch inside WALKey#getWriteEntry under high writing workload

2016-11-01 Thread larsh
HBASE-16698 Performance issue: handlers stuck waiting for CountDownLatch inside 
WALKey#getWriteEntry under high writing workload


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

Branch: refs/heads/branch-1
Commit: a7a4e17f1d04d389f87ad22da96d72cd3be050d9
Parents: 33e89fa
Author: Yu Li 
Authored: Thu Oct 20 15:32:59 2016 +0800
Committer: Yu Li 
Committed: Thu Oct 20 15:32:59 2016 +0800

--
 .../hadoop/hbase/regionserver/HRegion.java  | 86 +++-
 .../hbase/regionserver/wal/FSWALEntry.java  | 21 +++--
 .../org/apache/hadoop/hbase/wal/WALKey.java | 44 +++---
 .../hadoop/hbase/regionserver/TestHRegion.java  |  7 +-
 4 files changed, 115 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a7a4e17f/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 c18564d..ca37eb1 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
@@ -62,6 +62,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.commons.lang.RandomStringUtils;
@@ -206,6 +207,10 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   public static final String LOAD_CFS_ON_DEMAND_CONFIG_KEY =
 "hbase.hregion.scan.loadColumnFamiliesOnDemand";
 
+  /** Config key for using mvcc pre-assign feature for put */
+  public static final String HREGION_MVCC_PRE_ASSIGN = 
"hbase.hregion.mvcc.preassign";
+  public static final boolean DEFAULT_HREGION_MVCC_PRE_ASSIGN = true;
+
   /**
* Longest time we'll wait on a sequenceid.
* Sequenceid comes up out of the WAL subsystem. WAL subsystem can go bad or 
a test might use
@@ -604,6 +609,10 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   private final Durability durability;
   private final boolean regionStatsEnabled;
 
+  // flag and lock for MVCC preassign
+  private final boolean mvccPreAssign;
+  private final ReentrantLock preAssignMvccLock;
+
   /**
* HRegion constructor. This constructor should only be used for testing and
* extensions.  Instances of HRegion should be instantiated with the
@@ -753,6 +762,14 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   false :
   conf.getBoolean(HConstants.ENABLE_CLIENT_BACKPRESSURE,
   HConstants.DEFAULT_ENABLE_CLIENT_BACKPRESSURE);
+
+// get mvcc pre-assign flag and lock
+this.mvccPreAssign = conf.getBoolean(HREGION_MVCC_PRE_ASSIGN, 
DEFAULT_HREGION_MVCC_PRE_ASSIGN);
+if (this.mvccPreAssign) {
+  this.preAssignMvccLock = new ReentrantLock();
+} else {
+  this.preAssignMvccLock = null;
+}
   }
 
   void setHTableSpecificConf() {
@@ -2576,7 +2593,7 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 // a timeout. May happen in tests after we tightened the semantic via 
HBASE-14317.
 // Also, the getSequenceId blocks on a latch. There is no global list of 
outstanding latches
 // so if an abort or stop, there is no way to call them in.
-WALKey key = this.appendEmptyEdit(wal);
+WALKey key = this.appendEmptyEdit(wal, null);
 mvcc.complete(key.getWriteEntry());
 return key.getSequenceId(this.maxWaitForSeqId);
   }
@@ -3283,25 +3300,44 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
   mutation.getClusterIds(), currentNonceGroup, currentNonce, mvcc);
 long replaySeqId = batchOp.getReplaySequenceId();
 walKey.setOrigLogSeqNum(replaySeqId);
-  }
-  if (walEdit.size() > 0) {
-if (!isInReplay) {
-// we use HLogKey here instead of WALKey directly to support legacy 
coprocessors.
-walKey = new HLogKey(this.getRegionInfo().getEncodedNameAsBytes(),
-this.htableDescriptor.getTableName(), WALKey.NO_SEQUENCE_ID, now,
-mutation.getClusterIds(), currentNonceGroup, currentNonce, mvcc);
+if (walEdit.size() > 0) {
+  txid =
+  this.wal.append(this.htableDescrip

[37/50] [abbrv] hbase git commit: Revert "HBASE-16562 ITBLL should fail to start if misconfigured, addendum"

2016-11-01 Thread larsh
Revert "HBASE-16562 ITBLL should fail to start if misconfigured, addendum"

This reverts commit 6f73ef2dff46692ede976621f3e4b9e5cfae01fa.

See discussion on JIRA.


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

Branch: refs/heads/branch-1
Commit: 65c2dd489f2c1773c9e253fb950daf223eb9a154
Parents: d76cc4c
Author: Sean Busbey 
Authored: Mon Oct 24 09:16:40 2016 -0500
Committer: Sean Busbey 
Committed: Mon Oct 24 09:16:40 2016 -0500

--
 .../test/IntegrationTestBigLinkedList.java  | 21 ++--
 1 file changed, 11 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/65c2dd48/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 87ac1f7..366fc02 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
@@ -678,6 +678,17 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 Integer width = (args.length < 4) ? null : Integer.parseInt(args[3]);
 Integer wrapMultiplier = (args.length < 5) ? null : 
Integer.parseInt(args[4]);
 Integer numWalkers = (args.length < 6) ? null : 
Integer.parseInt(args[5]);
+
+long wrap = (long)width*wrapMultiplier;
+if (wrap < numNodes && numNodes % wrap != 0) {
+  /**
+   *  numNodes should be a multiple of width*wrapMultiplier.
+   *  If numNodes less than wrap, wrap will be set to be equal with 
numNodes,
+   *  See {@link GeneratorMapper#setup(Mapper.Context)}
+   * */
+  System.err.println(USAGE);
+  return 1;
+}
 return run(numMappers, numNodes, tmpOutput, width, wrapMultiplier, 
numWalkers);
   } catch (NumberFormatException e) {
 System.err.println("Parsing generator arguments failed: " + 
e.getMessage());
@@ -802,16 +813,6 @@ public class IntegrationTestBigLinkedList extends 
IntegrationTestBase {
 public int run(int numMappers, long numNodes, Path tmpOutput,
 Integer width, Integer wrapMultiplier, Integer numWalkers)
 throws Exception {
-  long wrap = (long)width*wrapMultiplier;
-  if (wrap < numNodes && numNodes % wrap != 0) {
-/**
- *  numNodes should be a multiple of width*wrapMultiplier.
- *  If numNodes less than wrap, wrap will be set to be equal with 
numNodes,
- *  See {@link GeneratorMapper#setup(Mapper.Context)}
- * */
-System.err.println(USAGE);
-return 1;
-  }
   int ret = runRandomInputGenerator(numMappers, numNodes, tmpOutput, 
width, wrapMultiplier,
   numWalkers);
   if (ret > 0) {



[32/50] [abbrv] hbase git commit: HBASE-16752 addendum. Do not retry large request for client versions less than 1.3

2016-11-01 Thread larsh
HBASE-16752 addendum. Do not retry large request for client versions less than 
1.3

Signed-off-by: Gary Helmling 


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

Branch: refs/heads/branch-1
Commit: 0117ed9d78820abecf066d742782de1dd49f309e
Parents: a7a4e17
Author: Ashu Pachauri 
Authored: Wed Oct 19 16:50:52 2016 -0700
Committer: Gary Helmling 
Committed: Thu Oct 20 10:34:46 2016 -0700

--
 .../hadoop/hbase/exceptions/RequestTooBigException.java | 6 +-
 .../main/java/org/apache/hadoop/hbase/ipc/RpcServer.java| 9 -
 2 files changed, 13 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0117ed9d/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
index 31baebb..0021f4a 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RequestTooBigException.java
@@ -26,13 +26,17 @@ import 
org.apache.hadoop.hbase.classification.InterfaceStability;
  * Thrown when the size of the rpc request received by the server is too large.
  *
  * On receiving such an exception, the client does not retry the offending rpc.
+ * @since 1.3.0
  */
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class RequestTooBigException extends DoNotRetryIOException {
-
   private static final long serialVersionUID = -1593339239809586516L;
 
+  // Recognized only in HBase version 1.3 and higher.
+  public static final int MAJOR_VERSION = 1;
+  public static final int MINOR_VERSION = 3;
+
   public RequestTooBigException() {
 super();
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/0117ed9d/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 9c21bbe..c2698b1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -1690,7 +1690,14 @@ public class RpcServer implements RpcServerInterface, 
ConfigurationObserver {
 Call reqTooBig = new Call(header.getCallId(), this.service, null, 
null, null,
 null, this, responder, 0, null, this.addr,0);
 metrics.exception(REQUEST_TOO_BIG_EXCEPTION);
-setupResponse(null, reqTooBig, REQUEST_TOO_BIG_EXCEPTION, msg);
+// Make sure the client recognizes the underlying exception
+// Otherwise, throw a DoNotRetryIOException.
+if 
(VersionInfoUtil.hasMinimumVersion(connectionHeader.getVersionInfo(),
+RequestTooBigException.MAJOR_VERSION, 
RequestTooBigException.MINOR_VERSION)) {
+  setupResponse(null, reqTooBig, REQUEST_TOO_BIG_EXCEPTION, msg);
+} else {
+  setupResponse(null, reqTooBig, new DoNotRetryIOException(), msg);
+}
 // We are going to close the connection, make sure we process the 
response
 // before that. In rare case when this fails, we still close the 
connection.
 responseWriteLock.lock();



[25/50] [abbrv] hbase git commit: HBASE-16653 Backport HBASE-11393 to branches which support namespace

2016-11-01 Thread larsh
http://git-wip-us.apache.org/repos/asf/hbase/blob/66941910/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java
--
diff --git 
a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java
 
b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java
index 09479c4..955995f 100644
--- 
a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java
+++ 
b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java
@@ -5032,6 +5032,719 @@ public final class ZooKeeperProtos {
 // @@protoc_insertion_point(class_scope:hbase.pb.Table)
   }
 
+  public interface TableCFOrBuilder
+  extends com.google.protobuf.MessageOrBuilder {
+
+// optional .hbase.pb.TableName table_name = 1;
+/**
+ * optional .hbase.pb.TableName table_name = 1;
+ */
+boolean hasTableName();
+/**
+ * optional .hbase.pb.TableName table_name = 1;
+ */
+org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableName 
getTableName();
+/**
+ * optional .hbase.pb.TableName table_name = 1;
+ */
+org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableNameOrBuilder 
getTableNameOrBuilder();
+
+// repeated bytes families = 2;
+/**
+ * repeated bytes families = 2;
+ */
+java.util.List getFamiliesList();
+/**
+ * repeated bytes families = 2;
+ */
+int getFamiliesCount();
+/**
+ * repeated bytes families = 2;
+ */
+com.google.protobuf.ByteString getFamilies(int index);
+  }
+  /**
+   * Protobuf type {@code hbase.pb.TableCF}
+   */
+  public static final class TableCF extends
+  com.google.protobuf.GeneratedMessage
+  implements TableCFOrBuilder {
+// Use TableCF.newBuilder() to construct.
+private TableCF(com.google.protobuf.GeneratedMessage.Builder builder) {
+  super(builder);
+  this.unknownFields = builder.getUnknownFields();
+}
+private TableCF(boolean noInit) { this.unknownFields = 
com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+private static final TableCF defaultInstance;
+public static TableCF getDefaultInstance() {
+  return defaultInstance;
+}
+
+public TableCF getDefaultInstanceForType() {
+  return defaultInstance;
+}
+
+private final com.google.protobuf.UnknownFieldSet unknownFields;
+@java.lang.Override
+public final com.google.protobuf.UnknownFieldSet
+getUnknownFields() {
+  return this.unknownFields;
+}
+private TableCF(
+com.google.protobuf.CodedInputStream input,
+com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+throws com.google.protobuf.InvalidProtocolBufferException {
+  initFields();
+  int mutable_bitField0_ = 0;
+  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+  com.google.protobuf.UnknownFieldSet.newBuilder();
+  try {
+boolean done = false;
+while (!done) {
+  int tag = input.readTag();
+  switch (tag) {
+case 0:
+  done = true;
+  break;
+default: {
+  if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+done = true;
+  }
+  break;
+}
+case 10: {
+  
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableName.Builder 
subBuilder = null;
+  if (((bitField0_ & 0x0001) == 0x0001)) {
+subBuilder = tableName_.toBuilder();
+  }
+  tableName_ = 
input.readMessage(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableName.PARSER,
 extensionRegistry);
+  if (subBuilder != null) {
+subBuilder.mergeFrom(tableName_);
+tableName_ = subBuilder.buildPartial();
+  }
+  bitField0_ |= 0x0001;
+  break;
+}
+case 18: {
+  if (!((mutable_bitField0_ & 0x0002) == 0x0002)) {
+families_ = new 
java.util.ArrayList();
+mutable_bitField0_ |= 0x0002;
+  }
+  families_.add(input.readBytes());
+  break;
+}
+  }
+}
+  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+throw e.setUnfinishedMessage(this);
+  } catch (java.io.IOException e) {
+throw new com.google.protobuf.InvalidProtocolBufferException(
+e.getMessage()).setUnfinishedMessage(this);
+  } finally {
+if (((mutable_bitField0_ & 0x0002) == 0x0002)) {
+  families_ = java.util.Collections.unmodifiableList(families_);
+}
+this.unknownFields = unknownFields.build()

[43/50] [abbrv] hbase git commit: HBASE-16886 hbase-client: scanner with reversed=true and small=true gets no result (huzheng)

2016-11-01 Thread larsh
HBASE-16886 hbase-client: scanner with reversed=true and small=true gets no 
result (huzheng)


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

Branch: refs/heads/branch-1
Commit: d4826e1665085b0ef697db548f8b6277be256591
Parents: 24a92ed
Author: tedyu 
Authored: Thu Oct 27 07:47:49 2016 -0700
Committer: tedyu 
Committed: Thu Oct 27 07:47:49 2016 -0700

--
 .../client/ClientSmallReversedScanner.java  | 115 ++--
 .../client/TestClientSmallReversedScanner.java  |  16 +--
 .../hbase/client/TestSmallReversedScanner.java  | 138 +++
 3 files changed, 248 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d4826e16/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java
index d4de6a0..bd5575a 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java
@@ -20,6 +20,7 @@
 package org.apache.hadoop.hbase.client;
 
 
+import com.google.protobuf.ServiceException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -29,13 +30,18 @@ import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.ClientSmallScanner.SmallScannerCallable;
-import 
org.apache.hadoop.hbase.client.ClientSmallScanner.SmallScannerCallableFactory;
+import org.apache.hadoop.hbase.client.metrics.ScanMetrics;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
+import org.apache.hadoop.hbase.protobuf.RequestConverter;
+import org.apache.hadoop.hbase.protobuf.ResponseConverter;
+import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
 import org.apache.hadoop.hbase.util.Bytes;
 
 import com.google.common.annotations.VisibleForTesting;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.concurrent.ExecutorService;
 
 /**
@@ -49,8 +55,8 @@ import java.util.concurrent.ExecutorService;
 @InterfaceAudience.Private
 public class ClientSmallReversedScanner extends ReversedClientScanner {
   private static final Log LOG = 
LogFactory.getLog(ClientSmallReversedScanner.class);
-  private ScannerCallableWithReplicas smallScanCallable = null;
-  private SmallScannerCallableFactory callableFactory;
+  private ScannerCallableWithReplicas smallReversedScanCallable = null;
+  private SmallReversedScannerCallableFactory callableFactory;
 
   /**
* Create a new ReversibleClientScanner for the specified table. Take note 
that the passed
@@ -80,7 +86,7 @@ public class ClientSmallReversedScanner extends 
ReversedClientScanner {
   RpcControllerFactory controllerFactory, ExecutorService pool, int 
primaryOperationTimeout)
   throws IOException {
 this(conf, scan, tableName, connection, rpcFactory, controllerFactory, 
pool,
-primaryOperationTimeout, new SmallScannerCallableFactory());
+primaryOperationTimeout, new SmallReversedScannerCallableFactory());
   }
 
   /**
@@ -112,7 +118,7 @@ public class ClientSmallReversedScanner extends 
ReversedClientScanner {
   ClientSmallReversedScanner(final Configuration conf, final Scan scan, final 
TableName tableName,
   ClusterConnection connection, RpcRetryingCallerFactory rpcFactory,
   RpcControllerFactory controllerFactory, ExecutorService pool, int 
primaryOperationTimeout,
-  SmallScannerCallableFactory callableFactory) throws IOException {
+  SmallReversedScannerCallableFactory callableFactory) throws IOException {
 super(conf, scan, tableName, connection, rpcFactory, controllerFactory, 
pool,
 primaryOperationTimeout);
 this.callableFactory = callableFactory;
@@ -136,6 +142,7 @@ public class ClientSmallReversedScanner extends 
ReversedClientScanner {
 byte[] localStartKey;
 int cacheNum = nbRows;
 boolean regionChanged = true;
+boolean isFirstRegionToLocate = false;
 // if we're at end of table, close and return false to stop iterating
 if (this.currentRegion != null && currentRegionDone) {
   byte[] startKey = this.currentRegion.getStartKey();
@@ -158,6 +165,14 @@ public class ClientSma

[42/50] [abbrv] hbase git commit: HBASE-16948 Fix inconsistency between HRegion and Region javadoc on getRowLock

2016-11-01 Thread larsh
HBASE-16948 Fix inconsistency between HRegion and Region javadoc on getRowLock


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

Branch: refs/heads/branch-1
Commit: 24a92ed63a2e483d43cf66f220c666c581b33484
Parents: 4edd8a6
Author: Michael Stack 
Authored: Wed Oct 26 16:09:43 2016 -0700
Committer: Michael Stack 
Committed: Wed Oct 26 16:11:26 2016 -0700

--
 .../hadoop/hbase/regionserver/HRegion.java  | 10 
 .../hadoop/hbase/regionserver/Region.java   | 26 +---
 2 files changed, 17 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/24a92ed6/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 ca37eb1..2757eae 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
@@ -5310,16 +5310,6 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
 return getRowLock(row, false);
   }
 
-  /**
-   *
-   * Get a row lock for the specified row. All locks are reentrant.
-   *
-   * Before calling this function make sure that a region operation has 
already been
-   * started (the calling thread has already acquired the region-close-guard 
lock).
-   * @param row The row actions will be performed against
-   * @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.

http://git-wip-us.apache.org/repos/asf/hbase/blob/24a92ed6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
index c763ac0..35e2b35 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
@@ -269,15 +269,23 @@ public interface Region extends ConfigurationObserver {
   }
 
   /**
-   * Tries to acquire a lock on the given row.
-   * @param waitForLock if true, will block until the lock is available.
-   *Otherwise, just tries to obtain the lock and returns
-   *false if unavailable.
-   * @return the row lock if acquired,
-   *   null if waitForLock was false and the lock was not acquired
-   * @throws IOException if waitForLock was true and the lock could not be 
acquired after waiting
-   */
-  RowLock getRowLock(byte[] row, boolean waitForLock) throws IOException;
+   *
+   * Get a row lock for the specified row. All locks are reentrant.
+   *
+   * Before calling this function make sure that a region operation has 
already been
+   * started (the calling thread has already acquired the region-close-guard 
lock).
+   * 
+   * NOTE: the boolean passed here has changed. It used to be a boolean that
+   * stated whether or not to wait on the lock. Now it is whether it an 
exclusive
+   * lock is requested.
+   * 
+   * @param row The row actions will be performed against
+   * @param readLock is the lock reader or writer. True indicates that a 
non-exclusive
+   * lock is requested
+   * @see #startRegionOperation()
+   * @see #startRegionOperation(Operation)
+   */
+  RowLock getRowLock(byte[] row, boolean readLock) throws IOException;
 
   /**
* If the given list of row locks is not null, releases all locks.



[49/50] [abbrv] hbase git commit: HBASE-16983 TestMultiTableSnapshotInputFormat failing with Unable to create region directory: /tmp/...

2016-11-01 Thread larsh
HBASE-16983 TestMultiTableSnapshotInputFormat failing with Unable to
create region directory: /tmp/...


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

Branch: refs/heads/branch-1
Commit: b3ddea9fc4f9e5ee7017642b57f05d0a40256f2f
Parents: 722be3a
Author: Michael Stack 
Authored: Mon Oct 31 21:48:49 2016 -0700
Committer: Michael Stack 
Committed: Mon Oct 31 21:48:49 2016 -0700

--
 .../hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java  | 2 +-
 .../org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b3ddea9f/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
index 93bb820..d8c4be7 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
@@ -63,7 +63,7 @@ public class TestMultiTableSnapshotInputFormat extends 
MultiTableInputFormatTest
 
   @Before
   public void setUp() throws Exception {
-this.restoreDir = new Path("/tmp");
+this.restoreDir = TEST_UTIL.getDataTestDir();
 
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b3ddea9f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java
index 5aa96c1..c5200fb 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileInfo.java
@@ -66,7 +66,7 @@ public class TestStoreFileInfo {
   @Test
   public void testEqualsWithLink() throws IOException {
 Path origin = new Path("/origin");
-Path tmp = new Path("/tmp");
+Path tmp = TEST_UTIL.getDataTestDir();
 Path archive = new Path("/archive");
 HFileLink link1 = new HFileLink(new Path(origin, "f1"), new Path(tmp, 
"f1"),
   new Path(archive, "f1"));



[28/50] [abbrv] hbase git commit: HBASE-16754 All WALSplitter OutputSinks should process compaction events

2016-11-01 Thread larsh
HBASE-16754 All WALSplitter OutputSinks should process compaction events


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

Branch: refs/heads/branch-1
Commit: ae151334ba5c20cb2ad4017a25d52aff8bd3994b
Parents: 019c7f9
Author: Gary Helmling 
Authored: Thu Oct 13 15:31:42 2016 -0700
Committer: Gary Helmling 
Committed: Wed Oct 19 10:37:35 2016 -0700

--
 .../hadoop/hbase/regionserver/wal/WALEdit.java  |   13 +-
 .../RegionReplicaReplicationEndpoint.java   |2 +-
 .../apache/hadoop/hbase/wal/WALSplitter.java|   19 +-
 .../apache/hadoop/hbase/wal/TestWALSplit.java   | 1423 ++
 .../hbase/wal/TestWALSplitCompressed.java   |   36 +
 5 files changed, 1483 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ae151334/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
index f7a3967..4fd1c41 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
@@ -363,13 +363,22 @@ public class WALEdit implements Writable, HeapSize {
* @return deserialized CompactionDescriptor or null.
*/
   public static CompactionDescriptor getCompaction(Cell kv) throws IOException 
{
-if (CellUtil.matchingColumn(kv, METAFAMILY, COMPACTION)) {
-  return CompactionDescriptor.parseFrom(kv.getValue());
+if (isCompactionMarker(kv)) {
+  return CompactionDescriptor.parseFrom(CellUtil.cloneValue(kv));
 }
 return null;
   }
 
   /**
+   * Returns true if the given cell is a serialized {@link 
CompactionDescriptor}
+   *
+   * @see #getCompaction(Cell)
+   */
+  public static boolean isCompactionMarker(Cell cell) {
+return CellUtil.matchingColumn(cell, METAFAMILY, COMPACTION);
+  }
+
+  /**
* Create a bulk loader WALEdit
*
* @param hriThe HRegionInfo for the region in which we are 
bulk loading

http://git-wip-us.apache.org/repos/asf/hbase/blob/ae151334/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
index f64b367..0697013 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
@@ -368,7 +368,7 @@ public class RegionReplicaReplicationEndpoint extends 
HBaseReplicationEndpoint {
 }
 
 @Override
-public boolean keepRegionEvents() {
+public boolean keepRegionEvent(Entry entry) {
   return true;
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/ae151334/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
index 8bf9fb5..cb60e68 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
@@ -369,7 +369,7 @@ public class WALSplitter {
   continue;
 }
 // Don't send Compaction/Close/Open region events to recovered edit 
type sinks.
-if (entry.getEdit().isMetaEdit() && !outputSink.keepRegionEvents()) {
+if (entry.getEdit().isMetaEdit() && 
!outputSink.keepRegionEvent(entry)) {
   editsSkipped++;
   continue;
 }
@@ -1282,12 +1282,11 @@ public class WALSplitter {
 
 /**
  * Some WALEdit's contain only KV's for account on what happened to a 
region.
- * Not all sinks will want to get those edits.
+ * Not all sinks will want to get all of those edits.
  *
- * @return Return true if this sink wants to get all WALEdit's regardless 
of if it's a region
- * event.
+ * @return Return true if this sink wants to accept this region-level 
WALEdit.
  */
-public abst

[48/50] [abbrv] hbase git commit: HBASE-16947 Some improvements for DumpReplicationQueues tool

2016-11-01 Thread larsh
HBASE-16947 Some improvements for DumpReplicationQueues tool

Signed-off-by: Michael Stack 


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

Branch: refs/heads/branch-1
Commit: 722be3a3d8e8bde9b557c62fb1cbb83d21c0a38b
Parents: a969f8d
Author: Guanghao Zhang 
Authored: Fri Oct 28 13:20:50 2016 +0800
Committer: Michael Stack 
Committed: Mon Oct 31 21:00:45 2016 -0700

--
 .../ReplicationQueuesClientZKImpl.java  |   4 +-
 .../replication/ReplicationQueuesZKImpl.java|   8 +-
 .../regionserver/DumpReplicationQueues.java | 123 ++-
 3 files changed, 102 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/722be3a3/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesClientZKImpl.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesClientZKImpl.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesClientZKImpl.java
index cc407e3..9078e40 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesClientZKImpl.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesClientZKImpl.java
@@ -40,7 +40,9 @@ public class ReplicationQueuesClientZKImpl extends 
ReplicationStateZKBase implem
   @Override
   public void init() throws ReplicationException {
 try {
-  ZKUtil.createWithParents(this.zookeeper, this.queuesZNode);
+  if (ZKUtil.checkExists(this.zookeeper, this.queuesZNode) < 0) {
+ZKUtil.createWithParents(this.zookeeper, this.queuesZNode);
+  }
 } catch (KeeperException e) {
   throw new ReplicationException("Internal error while initializing a 
queues client", e);
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/722be3a3/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
index c7af78e..9beaba7 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
@@ -82,14 +82,18 @@ public class ReplicationQueuesZKImpl extends 
ReplicationStateZKBase implements R
   public void init(String serverName) throws ReplicationException {
 this.myQueuesZnode = ZKUtil.joinZNode(this.queuesZNode, serverName);
 try {
-  ZKUtil.createWithParents(this.zookeeper, this.myQueuesZnode);
+  if (ZKUtil.checkExists(this.zookeeper, this.myQueuesZnode) < 0) {
+ZKUtil.createWithParents(this.zookeeper, this.myQueuesZnode);
+  }
 } catch (KeeperException e) {
   throw new ReplicationException("Could not initialize replication 
queues.", e);
 }
 if (conf.getBoolean(HConstants.REPLICATION_BULKLOAD_ENABLE_KEY,
   HConstants.REPLICATION_BULKLOAD_ENABLE_DEFAULT)) {
   try {
-ZKUtil.createWithParents(this.zookeeper, this.hfileRefsZNode);
+if (ZKUtil.checkExists(this.zookeeper, this.hfileRefsZNode) < 0) {
+  ZKUtil.createWithParents(this.zookeeper, this.hfileRefsZNode);
+}
   } catch (KeeperException e) {
 throw new ReplicationException("Could not initialize hfile references 
replication queue.",
 e);

http://git-wip-us.apache.org/repos/asf/hbase/blob/722be3a3/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
index bf38d6f..0772f89 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.java
@@ -40,6 +40,9 @@ import org.apache.hadoop.util.ToolRunner;
 import org.apache.zookeeper.KeeperException;
 import org.mortbay.util.IO;
 
+import com.google.common.util.concurrent.AtomicLongMap;
+
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.*;
 
@@ -55,6 +58,20 @@ public class Dum

  1   2   >