static void setCoprocessorError(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());
    }
  }
Select the priority for the rpc call.
<p/>
The rules are:
<ol>
<li>If user set a priority explicitly, then just use it.</li>
<li>For system table, use {@link HConstants#SYSTEMTABLE_QOS}.</li>
<li>For other tables, use {@link HConstants#NORMAL_QOS}.</li>
</ol>
@param priority  the priority set by user, can be {@link HConstants#PRIORITY_UNSET}.
@param tableName the table we operate on
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java