HBASE-21485 Add more debug logs for remote procedure execution
This commit is contained in:
parent
d0c2e60e36
commit
e5758e86a8
|
@ -3809,6 +3809,7 @@ public class HMaster extends HRegionServer implements MasterServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remoteProcedureCompleted(long procId) {
|
public void remoteProcedureCompleted(long procId) {
|
||||||
|
LOG.debug("Remote procedure done, pid={}", procId);
|
||||||
RemoteProcedure<MasterProcedureEnv, ?> procedure = getRemoteProcedure(procId);
|
RemoteProcedure<MasterProcedureEnv, ?> procedure = getRemoteProcedure(procId);
|
||||||
if (procedure != null) {
|
if (procedure != null) {
|
||||||
procedure.remoteOperationCompleted(procedureExecutor.getEnvironment());
|
procedure.remoteOperationCompleted(procedureExecutor.getEnvironment());
|
||||||
|
@ -3816,6 +3817,7 @@ public class HMaster extends HRegionServer implements MasterServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remoteProcedureFailed(long procId, RemoteProcedureException error) {
|
public void remoteProcedureFailed(long procId, RemoteProcedureException error) {
|
||||||
|
LOG.debug("Remote procedure failed, pid={}", procId, error);
|
||||||
RemoteProcedure<MasterProcedureEnv, ?> procedure = getRemoteProcedure(procId);
|
RemoteProcedure<MasterProcedureEnv, ?> procedure = getRemoteProcedure(procId);
|
||||||
if (procedure != null) {
|
if (procedure != null) {
|
||||||
procedure.remoteOperationFailed(procedureExecutor.getEnvironment(), error);
|
procedure.remoteOperationFailed(procedureExecutor.getEnvironment(), error);
|
||||||
|
|
|
@ -57,9 +57,11 @@ class RemoteProcedureResultReporter extends Thread {
|
||||||
public void complete(long procId, Throwable error) {
|
public void complete(long procId, Throwable error) {
|
||||||
RemoteProcedureResult.Builder builder = RemoteProcedureResult.newBuilder().setProcId(procId);
|
RemoteProcedureResult.Builder builder = RemoteProcedureResult.newBuilder().setProcId(procId);
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
LOG.debug("Failed to complete execution of proc pid={}", procId, error);
|
||||||
builder.setStatus(RemoteProcedureResult.Status.ERROR).setError(
|
builder.setStatus(RemoteProcedureResult.Status.ERROR).setError(
|
||||||
ForeignExceptionUtil.toProtoForeignException(server.getServerName().toString(), error));
|
ForeignExceptionUtil.toProtoForeignException(server.getServerName().toString(), error));
|
||||||
} else {
|
} else {
|
||||||
|
LOG.debug("Successfully complete execution of proc pid={}", procId);
|
||||||
builder.setStatus(RemoteProcedureResult.Status.SUCCESS);
|
builder.setStatus(RemoteProcedureResult.Status.SUCCESS);
|
||||||
}
|
}
|
||||||
results.add(builder.build());
|
results.add(builder.build());
|
||||||
|
|
|
@ -42,13 +42,14 @@ public class RSProcedureHandler extends EventHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process() {
|
public void process() {
|
||||||
Exception error = null;
|
Throwable error = null;
|
||||||
try {
|
try {
|
||||||
callable.call();
|
callable.call();
|
||||||
} catch (Exception e) {
|
} catch (Throwable t) {
|
||||||
LOG.error("Catch exception when call RSProcedureCallable: ", e);
|
LOG.error("Error when call RSProcedureCallable: ", t);
|
||||||
error = e;
|
error = t;
|
||||||
|
} finally {
|
||||||
|
((HRegionServer) server).remoteProcedureComplete(procId, error);
|
||||||
}
|
}
|
||||||
((HRegionServer) server).remoteProcedureComplete(procId, error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue