You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2017/04/28 16:29:06 UTC

[1/4] hbase git commit: HBASE-17817 add table name to output (if available) when removing coprocessors

Repository: hbase
Updated Branches:
  refs/heads/master 5411d3ecb -> fc68f23a4


HBASE-17817 add table name to output (if available) when removing coprocessors

Amending-Author: Sean Busbey <bu...@apache.org>
Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: 635c9db81556f7b3a89c76d3be40d9989496d151
Parents: 5411d3e
Author: Steen Manniche <st...@manniche.net>
Authored: Tue Apr 11 17:48:50 2017 +0200
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 28 11:24:00 2017 -0500

----------------------------------------------------------------------
 .../apache/hadoop/hbase/coprocessor/CoprocessorHost.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/635c9db8/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
index bdface1..ae0c4b1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
@@ -601,8 +601,15 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
       // server is configured to abort.
       abortServer(env, e);
     } else {
-      LOG.error("Removing coprocessor '" + env.toString() + "' from " +
-          "environment because it threw:  " + e,e);
+      // If available, pull a table name out of the environment
+      if(env instanceof RegionCoprocessorEnvironment) {
+        String tableName = ((RegionCoprocessorEnvironment)env).getRegionInfo().getTable().getNameAsString();
+        LOG.error("Removing coprocessor '" + env.toString() + "' from table '"+ tableName + "'", e);
+      } else {
+        LOG.error("Removing coprocessor '" + env.toString() + "' from " +
+                "environment",e);
+      }
+
       coprocessors.remove(env);
       try {
         shutdown(env);


[3/4] hbase git commit: HBASE-17835 Spelling mistakes in the Java source

Posted by bu...@apache.org.
HBASE-17835 Spelling mistakes in the Java source

Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: 03e8f6b56ec184d0bbcff765b1b8f353b853fb0f
Parents: 43f3fcc
Author: QilinCao <ca...@zte.com.cn>
Authored: Thu Apr 27 09:42:12 2017 +0800
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 28 11:25:57 2017 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/client/Admin.java      | 2 +-
 .../src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java | 2 +-
 .../org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java | 2 +-
 .../org/apache/hadoop/hbase/master/TestClockSkewDetection.java   | 4 ++--
 .../org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/03e8f6b5/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index decf81f..8a9dc61 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -1426,7 +1426,7 @@ public interface Admin extends Abortable, Closeable {
    * <li>running - returns <tt>false</tt></li> <li>finished - returns <tt>true</tt></li>
    * <li>finished with error - throws the exception that caused the snapshot to fail</li> </ol> The
    * cluster only knows about the most recent snapshot. Therefore, if another snapshot has been
-   * run/started since the snapshot your are checking, you will recieve an {@link
+   * run/started since the snapshot you are checking, you will receive an {@link
    * org.apache.hadoop.hbase.snapshot.UnknownSnapshotException}.
    *
    * @param snapshot description of the snapshot to check

http://git-wip-us.apache.org/repos/asf/hbase/blob/03e8f6b5/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
index 0e1054d..0782f5a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
@@ -627,7 +627,7 @@ public interface AsyncAdmin {
    * <li>finished with error - throws the exception that caused the snapshot to fail</li>
    * </ol>
    * The cluster only knows about the most recent snapshot. Therefore, if another snapshot has been
-   * run/started since the snapshot your are checking, you will recieve an
+   * run/started since the snapshot you are checking, you will receive an
    * {@link org.apache.hadoop.hbase.snapshot.UnknownSnapshotException}.
    * @param snapshot description of the snapshot to check
    * @return <tt>true</tt> if the snapshot is completed, <tt>false</tt> if the snapshot is still

http://git-wip-us.apache.org/repos/asf/hbase/blob/03e8f6b5/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java
index 2c2b4af..8c56255 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java
@@ -125,7 +125,7 @@ public class ZKProcedureMemberRpcs implements ProcedureMemberRpcs {
    * @param path full znode path that cause the notification
    */
   private void receivedReachedGlobalBarrier(String path) {
-    LOG.debug("Recieved reached global barrier:" + path);
+    LOG.debug("Received reached global barrier:" + path);
     String procName = ZKUtil.getNodeName(path);
     this.member.receivedReachedGlobalBarrier(procName);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/03e8f6b5/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
index 2b3f2fd..852b139 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
@@ -85,7 +85,7 @@ public class TestClockSkewDetection {
       fail("HMaster should have thrown a ClockOutOfSyncException but didn't.");
     } catch(ClockOutOfSyncException e) {
       //we want an exception
-      LOG.info("Recieved expected exception: "+e);
+      LOG.info("Received expected exception: "+e);
     }
 
     try {
@@ -101,7 +101,7 @@ public class TestClockSkewDetection {
       fail("HMaster should have thrown a ClockOutOfSyncException but didn't.");
     } catch (ClockOutOfSyncException e) {
       // we want an exception
-      LOG.info("Recieved expected exception: " + e);
+      LOG.info("Received expected exception: " + e);
     }
 
     // make sure values above warning threshold but below max threshold don't kill

http://git-wip-us.apache.org/repos/asf/hbase/blob/03e8f6b5/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
index 53cc49b..50649f7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
@@ -156,7 +156,7 @@ public final class WALPerformanceEvaluation extends Configured implements Tool {
           loopSampler = Sampler.ALWAYS;
           if (numIterations > 1000) {
             LOG.warn("Full tracing of all iterations will produce a lot of data. Be sure your"
-              + " SpanReciever can keep up.");
+              + " SpanReceiver can keep up.");
           }
         } else {
           getConf().setDouble("hbase.sampler.fraction", traceFreq);


[2/4] hbase git commit: HBASE-17920 TestFSHDFSUtils always fails against hadoop 3.0.0-alpha2

Posted by bu...@apache.org.
HBASE-17920 TestFSHDFSUtils always fails against hadoop 3.0.0-alpha2

Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: 43f3fccb7b24d1433434d983e8e60914d8905f8d
Parents: 635c9db
Author: Jonathan M Hsieh <jm...@apache.org>
Authored: Fri Apr 14 10:49:45 2017 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 28 11:25:14 2017 -0500

----------------------------------------------------------------------
 .../hadoop/hbase/util/TestFSHDFSUtils.java      | 27 +++++++++++++++-----
 1 file changed, 20 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/43f3fccb/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java
index ea19ea7..5899971 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java
@@ -100,8 +100,7 @@ public class TestFSHDFSUtils {
     Mockito.verify(dfs, Mockito.times(1)).isFileClosed(FILE);
   }
 
-  @Test
-  public void testIsSameHdfs() throws IOException {
+  void testIsSameHdfs(int nnport) throws IOException {
     try {
       Class dfsUtilClazz = Class.forName("org.apache.hadoop.hdfs.DFSUtil");
       dfsUtilClazz.getMethod("getNNServiceRpcAddresses", Configuration.class);
@@ -111,7 +110,7 @@ public class TestFSHDFSUtils {
     }
 
     Configuration conf = HBaseConfiguration.create();
-    Path srcPath = new Path("hdfs://localhost:8020/");
+    Path srcPath = new Path("hdfs://localhost:" + nnport + "/");
     Path desPath = new Path("hdfs://127.0.0.1/");
     FileSystem srcFs = srcPath.getFileSystem(conf);
     FileSystem desFs = desPath.getFileSystem(conf);
@@ -122,7 +121,7 @@ public class TestFSHDFSUtils {
     desFs = desPath.getFileSystem(conf);
     assertTrue(!FSHDFSUtils.isSameHdfs(conf, srcFs, desFs));
 
-    desPath = new Path("hdfs://127.0.1.1:8020/");
+    desPath = new Path("hdfs://127.0.1.1:" + nnport + "/");
     desFs = desPath.getFileSystem(conf);
     assertTrue(!FSHDFSUtils.isSameHdfs(conf, srcFs, desFs));
 
@@ -130,21 +129,35 @@ public class TestFSHDFSUtils {
     conf.set("dfs.nameservices", "haosong-hadoop");
     conf.set("dfs.ha.namenodes.haosong-hadoop", "nn1,nn2");
     conf.set("dfs.client.failover.proxy.provider.haosong-hadoop",
-            "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider");
+        "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider");
 
-    conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn1", "127.0.0.1:8020");
+    conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn1", "127.0.0.1:"+ nnport);
     conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn2", "127.10.2.1:8000");
     desPath = new Path("/");
     desFs = desPath.getFileSystem(conf);
     assertTrue(FSHDFSUtils.isSameHdfs(conf, srcFs, desFs));
 
-    conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn1", "127.10.2.1:8020");
+    conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn1", "127.10.2.1:"+nnport);
     conf.set("dfs.namenode.rpc-address.haosong-hadoop.nn2", "127.0.0.1:8000");
     desPath = new Path("/");
     desFs = desPath.getFileSystem(conf);
     assertTrue(!FSHDFSUtils.isSameHdfs(conf, srcFs, desFs));
   }
 
+  @Test
+  public void testIsSameHdfs() throws IOException {
+    String hadoopVersion = org.apache.hadoop.util.VersionInfo.getVersion();
+    LOG.info("hadoop version is: "  + hadoopVersion);
+    boolean isHadoop3 = hadoopVersion.startsWith("3.");
+    if (isHadoop3) {
+      // Hadoop 3.0.0 alpha1+ change default nn port to 9820. See HDFS-9427
+      testIsSameHdfs(9820);
+    } else {
+      // pre hadoop 3.0.0 defaults to port 8020
+      testIsSameHdfs(8020);
+    }
+  }
+
   /**
    * Version of DFS that has HDFS-4525 in it.
    */


[4/4] hbase git commit: HBASE-17962 Improve documentation on Rest interface

Posted by bu...@apache.org.
HBASE-17962 Improve documentation on Rest interface

Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: fc68f23a4889271888ca8ba3fde1f6f86d3f0fce
Parents: 03e8f6b
Author: Niels Basjes <nb...@bol.com>
Authored: Wed Apr 26 11:21:39 2017 +0200
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 28 11:28:29 2017 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/rest/RowResource.java | 8 +++++++-
 src/main/asciidoc/_chapters/external_apis.adoc              | 9 ++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fc68f23a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
index 7be4190..41b465f 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
@@ -139,7 +139,13 @@ public class RowResource extends ResourceBase {
     if (!rowspec.hasColumns() || rowspec.getColumns().length > 1) {
       servlet.getMetrics().incrementFailedGetRequests(1);
       return Response.status(Response.Status.BAD_REQUEST).type(MIMETYPE_TEXT)
-          .entity("Bad request: Either 0 or more than 1 columns specified." + CRLF).build();
+          .entity("Bad request: Default 'GET' method only works if there is exactly 1 column " +
+                  "in the row. Using the 'Accept' header with one of these formats lets you " +
+                  "retrieve the entire row if it has multiple columns: " +
+                  // Same as the @Produces list for the get method.
+                  MIMETYPE_XML + ", " + MIMETYPE_JSON + ", " +
+                  MIMETYPE_PROTOBUF + ", " + MIMETYPE_PROTOBUF_IETF +
+                  CRLF).build();
     }
     MultivaluedMap<String, String> params = uriInfo.getQueryParameters();
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/fc68f23a/src/main/asciidoc/_chapters/external_apis.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/external_apis.adoc b/src/main/asciidoc/_chapters/external_apis.adoc
index 556c4e0..2f85461 100644
--- a/src/main/asciidoc/_chapters/external_apis.adoc
+++ b/src/main/asciidoc/_chapters/external_apis.adoc
@@ -225,14 +225,17 @@ creation or mutation, and `DELETE` for deletion.
 |Description
 |Example
 
-|/_table_/_row_/_column:qualifier_/_timestamp_
+|/_table_/_row_
 |GET
-|Get the value of a single row. Values are Base-64 encoded.
+|Get all columns of a single row. Values are Base-64 encoded. This requires the "Accept" request header with a type that can hold multiple columns (like xml, json or protobuf).
 |curl -vi -X GET \
   -H "Accept: text/xml" \
   "http://example.com:8000/users/row1"
 
-curl -vi -X GET \
+|/_table_/_row_/_column:qualifier_/_timestamp_
+|GET
+|Get the value of a single column. Values are Base-64 encoded.
+|curl -vi -X GET \
   -H "Accept: text/xml" \
   "http://example.com:8000/users/row1/cf:a/1458586888395"