/** * Called by the DN to report an error to the NNs. */ void trySendErrorReport(int errCode, String errMsg) { for (BPServiceActor actor : bpServices) { ErrorReportAction errorReportAction = new ErrorReportAction (errCode, errMsg); actor.bpThreadEnqueue(errorReportAction); } }
private void processQueueMessages() { LinkedList<BPServiceActorAction> duplicateQueue; synchronized (bpThreadQueue) { duplicateQueue = new LinkedList<BPServiceActorAction>(bpThreadQueue); bpThreadQueue.clear(); } while (!duplicateQueue.isEmpty()) { BPServiceActorAction actionItem = duplicateQueue.remove(); try { actionItem.reportTo(bpNamenode, bpRegistration); } catch (BPServiceActorActionException baae) { LOG.warn(baae.getMessage() + nnAddr , baae); // Adding it back to the queue if not present bpThreadEnqueue(actionItem); } } }
void reportBadBlocks(ExtendedBlock block, String storageUuid, StorageType storageType) { checkBlock(block); for (BPServiceActor actor : bpServices) { ReportBadBlockAction rbbAction = new ReportBadBlockAction (block, storageUuid, storageType); actor.bpThreadEnqueue(rbbAction); } }
/** * Called by the DN to report an error to the NNs. */ void trySendErrorReport(int errCode, String errMsg) { for (BPServiceActor actor : bpServices) { ErrorReportAction errorReportAction = new ErrorReportAction (errCode, errMsg); actor.bpThreadEnqueue(errorReportAction); } }
/** * Called by the DN to report an error to the NNs. */ void trySendErrorReport(int errCode, String errMsg) { for (BPServiceActor actor : bpServices) { ErrorReportAction errorReportAction = new ErrorReportAction (errCode, errMsg); actor.bpThreadEnqueue(errorReportAction); } }
private void processQueueMessages() { LinkedList<BPServiceActorAction> duplicateQueue; synchronized (bpThreadQueue) { duplicateQueue = new LinkedList<BPServiceActorAction>(bpThreadQueue); bpThreadQueue.clear(); } while (!duplicateQueue.isEmpty()) { BPServiceActorAction actionItem = duplicateQueue.remove(); try { actionItem.reportTo(bpNamenode, bpRegistration); } catch (BPServiceActorActionException baae) { LOG.warn(baae.getMessage() + nnAddr , baae); // Adding it back to the queue if not present bpThreadEnqueue(actionItem); } } }
void reportBadBlocks(ExtendedBlock block, String storageUuid, StorageType storageType) { checkBlock(block); for (BPServiceActor actor : bpServices) { ReportBadBlockAction rbbAction = new ReportBadBlockAction (block, storageUuid, storageType); actor.bpThreadEnqueue(rbbAction); } }
void reportBadBlocks(ExtendedBlock block, String storageUuid, StorageType storageType) { checkBlock(block); for (BPServiceActor actor : bpServices) { ReportBadBlockAction rbbAction = new ReportBadBlockAction (block, storageUuid, storageType); actor.bpThreadEnqueue(rbbAction); } }
private void processQueueMessages() { LinkedList<BPServiceActorAction> duplicateQueue; synchronized (bpThreadQueue) { duplicateQueue = new LinkedList<BPServiceActorAction>(bpThreadQueue); bpThreadQueue.clear(); } while (!duplicateQueue.isEmpty()) { BPServiceActorAction actionItem = duplicateQueue.remove(); try { actionItem.reportTo(bpNamenode, bpRegistration); } catch (BPServiceActorActionException baae) { LOG.warn(baae.getMessage() + nnAddr , baae); // Adding it back to the queue if not present bpThreadEnqueue(actionItem); } } }