[67/94] [abbrv] hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-17 Thread appy
HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/HBASE-14070.HLC
Commit: 43492d2d3b2f889273651a2f0159f5071e8ca9ff
Parents: 7d08c78
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:30:06 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:30:06 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 127 +++
 3 files changed, 132 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/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 4c0625a..37d2d22 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
@@ -691,7 +691,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 4570cec..3f56a49 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1226,12 +1226,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..4a81cc2
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;
+import java.util.Arrays;
+import static 

[11/22] hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-12 Thread busbey
HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/HBASE-18147
Commit: 43492d2d3b2f889273651a2f0159f5071e8ca9ff
Parents: 7d08c78
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:30:06 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:30:06 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 127 +++
 3 files changed, 132 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/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 4c0625a..37d2d22 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
@@ -691,7 +691,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 4570cec..3f56a49 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1226,12 +1226,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..4a81cc2
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;
+import java.util.Arrays;
+import static junit.framework.TestCase.assertTrue;

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 8a996e341 -> 56659f342


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/branch-1.2
Commit: 56659f3421dde0670bd9b757076a2d1b74140877
Parents: 8a996e3
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:32:59 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:32:59 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 128 +++
 3 files changed, 133 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/56659f34/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 914467c..0a3b14c 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
@@ -520,7 +520,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 endNonceOperation(m, nonceGroup, success);
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/56659f34/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 1ed866a..0a7eb67 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1259,12 +1259,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/56659f34/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..79cf297
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * 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 

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 29e0e7317 -> 0b31a7300


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/branch-1.3
Commit: 0b31a730065ea4bfb6354646611049dda56350fa
Parents: 29e0e73
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:32:21 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:32:21 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 128 +++
 3 files changed, 133 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0b31a730/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 47e50c7..b6fc5bd 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
@@ -582,7 +582,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b31a730/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 1ed866a..0a7eb67 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1259,12 +1259,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b31a730/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..79cf297
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import 

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 2256aedd3 -> 4d88c460f


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/branch-1.4
Commit: 4d88c460f43983920aa571ac86c46b43ccbbbaf6
Parents: 2256aed
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:31:46 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:31:46 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 128 +++
 3 files changed, 133 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4d88c460/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 68fb1fb..4071fed 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
@@ -593,7 +593,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4d88c460/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 3ecd970..96855b8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1277,12 +1277,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4d88c460/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..79cf297
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import 

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/branch-1 844596e09 -> 44651e52d


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/branch-1
Commit: 44651e52d831328802accd06bd5e93a6f3c15549
Parents: 844596e
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:31:21 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:31:21 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 128 +++
 3 files changed, 133 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/44651e52/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 68fb1fb..4071fed 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
@@ -593,7 +593,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/44651e52/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 3ecd970..96855b8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1277,12 +1277,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/44651e52/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..79cf297
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import 

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f2e5727e1 -> 6456c8bf8


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/branch-2
Commit: 6456c8bf84d5341908161be76a0457f89288cb6e
Parents: f2e5727
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:30:42 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:30:42 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 127 +++
 3 files changed, 132 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6456c8bf/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 4c0625a..37d2d22 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
@@ -691,7 +691,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/6456c8bf/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 4570cec..3f56a49 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1226,12 +1226,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/6456c8bf/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..4a81cc2
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import 

hbase git commit: HBASE-18267 The result from the postAppend is ignored

2017-07-10 Thread chia7712
Repository: hbase
Updated Branches:
  refs/heads/master 7d08c7810 -> 43492d2d3


HBASE-18267 The result from the postAppend is ignored


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

Branch: refs/heads/master
Commit: 43492d2d3b2f889273651a2f0159f5071e8ca9ff
Parents: 7d08c78
Author: Chia-Ping Tsai 
Authored: Tue Jul 11 10:30:06 2017 +0800
Committer: Chia-Ping Tsai 
Committed: Tue Jul 11 10:30:06 2017 +0800

--
 .../hbase/regionserver/RSRpcServices.java   |   2 +-
 .../regionserver/RegionCoprocessorHost.java |   7 +-
 .../hbase/client/TestResultFromCoprocessor.java | 127 +++
 3 files changed, 132 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/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 4c0625a..37d2d22 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
@@ -691,7 +691,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 }
   }
   if (region.getCoprocessorHost() != null) {
-region.getCoprocessorHost().postAppend(append, r);
+r = region.getCoprocessorHost().postAppend(append, r);
   }
 }
 if (regionServer.metricsRegionServer != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 4570cec..3f56a49 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1226,12 +1226,13 @@ public class RegionCoprocessorHost
* @param result the result returned by the append
* @throws IOException if an error occurred on the coprocessor
*/
-  public void postAppend(final Append append, final Result result) throws 
IOException {
-execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {
+  public Result postAppend(final Append append, final Result result) throws 
IOException {
+return execOperationWithResult(result,
+coprocessors.isEmpty() ? null : new 
RegionOperationWithResult() {
   @Override
   public void call(RegionObserver oserver, 
ObserverContext ctx)
   throws IOException {
-oserver.postAppend(ctx, append, result);
+setResult(oserver.postAppend(ctx, append, result));
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/43492d2d/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
new file mode 100644
index 000..4a81cc2
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;