@Test public void ErrorReceived() throws Exception { mWriteHandler.onError(new IOException("test exception")); }
public void onError(Throwable cause) { if (cause instanceof StatusRuntimeException && ((StatusRuntimeException) cause).getStatus().getCode() == Status.Code.CANCELLED) { return; } mSerializingExecutor.execute(() -> { LogUtils.warnWithException(LOG, "Exception thrown while handling write request {}", mContext == null ? "unknown" : mContext.getRequest(), cause); abort(new Error(AlluxioStatusException.fromThrowable(cause), false)); }); }
AbstractWriteHandler { public void onError(Throwable cause) { if (cause instanceof StatusRuntimeException && ((StatusRuntimeException) cause).getStatus().getCode() == Status.Code.CANCELLED) { return; } mSerializingExecutor.execute(() -> { LogUtils.warnWithException(LOG, "Exception thrown while handling write request {}", mContext == null ? "unknown" : mContext.getRequest(), cause); abort(new Error(AlluxioStatusException.fromThrowable(cause), false)); }); } }
AbstractWriteHandler { public void onError(Throwable cause) { if (cause instanceof StatusRuntimeException && ((StatusRuntimeException) cause).getStatus().getCode() == Status.Code.CANCELLED) { return; } mSerializingExecutor.execute(() -> { LogUtils.warnWithException(LOG, "Exception thrown while handling write request {}", mContext == null ? "unknown" : mContext.getRequest(), cause); abort(new Error(AlluxioStatusException.fromThrowable(cause), false)); }); } AbstractWriteHandler(StreamObserver<WriteResponse> responseObserver,
      AuthenticatedUserInfo userInfo); }
AbstractWriteHandler { public void onError(Throwable cause) { if (cause instanceof StatusRuntimeException && ((StatusRuntimeException) cause).getStatus().getCode() == Status.Code.CANCELLED) { return; } mSerializingExecutor.execute(() -> { LogUtils.warnWithException(LOG, "Exception thrown while handling write request {}", mContext == null ? "unknown" : mContext.getRequest(), cause); abort(new Error(AlluxioStatusException.fromThrowable(cause), false)); }); } AbstractWriteHandler(StreamObserver<WriteResponse> responseObserver,
      AuthenticatedUserInfo userInfo); void write(WriteRequest writeRequest); void writeDataMessage(WriteRequest request, DataBuffer buffer); void onCompleted(); void onCancel(); void onError(Throwable cause); }
AbstractWriteHandler { public void onError(Throwable cause) { if (cause instanceof StatusRuntimeException && ((StatusRuntimeException) cause).getStatus().getCode() == Status.Code.CANCELLED) { return; } mSerializingExecutor.execute(() -> { LogUtils.warnWithException(LOG, "Exception thrown while handling write request {}", mContext == null ? "unknown" : mContext.getRequest(), cause); abort(new Error(AlluxioStatusException.fromThrowable(cause), false)); }); } AbstractWriteHandler(StreamObserver<WriteResponse> responseObserver,
      AuthenticatedUserInfo userInfo); void write(WriteRequest writeRequest); void writeDataMessage(WriteRequest request, DataBuffer buffer); void onCompleted(); void onCancel(); void onError(Throwable cause);  }