@Override public void handleCheckedException(Exception e) { LOGGER.error(errorUtils.getStackTrace(e)); } }
@Override public void onFailure(Throwable throwable) { LOGGER.error("[FEDERATION][SCHEDULER] processor failed: transferMetaId: {}, exception: {}", transferMetaId, errorUtils.getStackTrace(throwable)); countDownLatch.countDown(); }
@Override public void onFailure(Throwable throwable) { LOGGER.error("[FEDERATION][RECV][CONSUMER][DTABLE] putAll failed for data: {}, error: {}", transferMetaId, errorUtils.getStackTrace(throwable)); putAllFinishLatch.countDown(); }
@Override public void onFailure(Throwable ex) { LOGGER.warn("[ROLL][PROCESS][Count][Callback] {}:{}: error: {}", ip, port, errorUtils.getStackTrace(ex)); errorContainer.add(ex); finishLatch.countDown(); }
@Override public void onFailure(Throwable ex) { LOGGER.error("[CALLBACK][ONFAILURE] {}:{}: error: {}", ip, port, errorUtils.getStackTrace(ex)); errorContainer.add(ex); finishLatch.countDown(); }
@Override public void onError(Throwable throwable) { super.onError(throwable); LOGGER.error("[ROLL][KV][PUTALL] put all onError: {}", errorUtils.getStackTrace(throwable)); }
@Override public void onError(Throwable throwable) { finishLatch.countDown(); this.throwable = errorUtils.toGrpcRuntimeException(throwable); this.LOGGER.info("{} source streaming error: {}", this.classSimpleName, errorUtils.getStackTrace(this.throwable)); }
@Override public void onError(Throwable throwable) { LOGGER.error(errorUtils.getStackTrace(throwable)); super.onError(throwable); }
@Override public void onFailure(Throwable throwable) { LOGGER.fatal("[FEDERATION][MAIN][FATAL] job scheduler failed: {}", errorUtils.getStackTrace(throwable)); }
@Override public void onFailure(Throwable throwable) { LOGGER.error("[ROLL][KV][PUTALL][ONFAILURE] storeInfo: {}, latch count: {}, {}:{}: error: {}", storeInfoWithFragment, finishLatch.getCount(), ip, port, errorUtils.getStackTrace(throwable)); errorContainer.add(throwable); finishedFragments.add(storeInfoWithFragment.getFragment()); finishLatch.countDown(); }
public void onError(Federation.TransferMeta transferMeta, int code, Throwable throwable) { onError(transferMeta, code, errorUtils.getStackTrace(throwable)); }
@Override public void onError(Throwable throwable) { LOGGER.info("[SEND][SERVER][OBSERVER] onError: {}", errorUtils.getStackTrace(throwable)); transferBroker.setError(throwable); super.onError(throwable); }
@Override public void onError(Throwable throwable) { Exception e = errorUtils.toGrpcRuntimeException(throwable); delayedResult.setError(e); delayedResult.getLatch().countDown(); LOGGER.error(errorUtils.getStackTrace(e)); }
public <T> T wrapGrpcServerCallable(StreamObserver responseObserver, GrpcServerCallable<T> target) { T result = null; try { result = target.run(); } catch (Throwable t) { LOGGER.error(errorUtils.getStackTrace(t)); responseObserver.onError(errorUtils.toGrpcRuntimeException(t)); } return result; } }
public void wrapGrpcServerRunnable(StreamObserver responseObserver, GrpcServerRunnable target) { try { target.run(); } catch (Throwable t) { LOGGER.error(errorUtils.getStackTrace(t)); responseObserver.onError(errorUtils.toGrpcRuntimeException(t)); } }
@Override public void onError(Throwable throwable) { this.throwable = errorUtils.toGrpcRuntimeException(throwable); for (StreamObserver streamObserver : errorListeners) { if (streamObserver != null) { streamObserver.onError(throwable); } } callerNotifier.onError(this.throwable); LOGGER.debug("{} dest streaming error: {}", this.classSimpleName, errorUtils.getStackTrace(throwable)); }
@PostConstruct public void init() { // todo: init with parameters try { LOGGER.info("[FEDERATION][BASE][PROCESSOR] init"); storageMetaClient.init(federationServerUtils.getMetaServiceEndpoint()); clusterMetaClient.init(federationServerUtils.getMetaServiceEndpoint()); transferMetaId = transferPojoUtils.generateTransferId(transferMeta); } catch (Exception e) { LOGGER.error(errorUtils.getStackTrace(e)); } } }
@Override public BasicMeta.ReturnStatus call() throws Exception { BasicMeta.ReturnStatus returnStatus = returnStatusFactory.createSucessful("async send to storageService successful"); try { storageServiceClient.putAll(operandBroker, storeInfo, node); } catch (Exception e) { returnStatus = returnStatusFactory.create(500, errorUtils.getStackTrace(e)); } return returnStatus; } }
@Override public Node dispatch(StoreInfo storeInfo, ByteString dataKey) { Node result = null; StoreInfo duplicate = StoreInfo.copy(storeInfo); try { Dtable dtable = storeInfoDtableCache.get(duplicate); if (dtable == null) { throw new StorageNotExistsException(duplicate); } int dispatchResult = dispatchPolicy.executePolicy(dtable.getTotalFragments(), dataKey); duplicate.setFragment(dispatchResult); result = storeInfoNodeCache.get(duplicate); } catch (ExecutionException e) { LOGGER.error(errorUtils.getStackTrace(e)); } return result; } }
public Kv.Operand putIfAbsent(Kv.Operand request, StoreInfo storeInfo, Node node) { DelayedResult<Kv.Operand> delayedResult = new SingleDelayedResult<>(); GrpcAsyncClientContext<KVServiceGrpc.KVServiceStub, Kv.Operand, Kv.Operand> context = rollKvCallModelFactory.createOperandToOperandContext(); context.setLatchInitCount(1) .setEndpoint(typeConversionUtils.toEndpoint(node)) .setFinishTimeout(RuntimeConstants.DEFAULT_WAIT_TIME, RuntimeConstants.DEFAULT_TIMEUNIT) .setCalleeStreamingMethodInvoker(KVServiceGrpc.KVServiceStub::putIfAbsent) .setCallerStreamObserverClassAndArguments(StorageKvOperandToOperandObserver.class, delayedResult) .setGrpcMetadata(MetaConstants.createMetadataFromStoreInfo(storeInfo)); Kv.Operand result = null; GrpcStreamingClientTemplate<KVServiceGrpc.KVServiceStub, Kv.Operand, Kv.Operand> template = rollKvCallModelFactory.createOperandToOperandTemplate(); template.setGrpcAsyncClientContext(context); try { result = template.calleeStreamingRpcWithImmediateDelayedResult(request, delayedResult); } catch (InvocationTargetException e) { LOGGER.error(errorUtils.getStackTrace(e)); } return result; }