openinx commented on a change in pull request #126: HBASE-21718 Implement Admin
based on AsyncAdmin
URL: https://github.com/apache/hbase/pull/126#discussion_r273429878
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java
##########
@@ -684,4 +685,21 @@ static void shutdownPool(ExecutorService pool) {
pool.shutdownNow();
}
}
+
+ static void setCoprocessorError(com.google.protobuf.RpcController
controller, Throwable error) {
+ if (controller == null) {
+ return;
+ }
+ if (controller instanceof ServerRpcController) {
+ if (error instanceof IOException) {
+ ((ServerRpcController) controller).setFailedOn((IOException) error);
+ } else {
+ ((ServerRpcController) controller).setFailedOn(new IOException(error));
+ }
+ } else if (controller instanceof ClientCoprocessorRpcController) {
+ ((ClientCoprocessorRpcController) controller).setFailed(error);
+ } else {
+ controller.setFailed(error.toString());
Review comment:
set an string of exception here, it will hide the internal stack trace ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services