boolean shouldRetryInit() { if (hasBlockPoolId()) { // One of the namenode registered successfully. lets continue retry for // other. return true; } return isAlive(); }
synchronized void remove(BPOfferService t) { offerServices.remove(t); if (t.hasBlockPoolId()) { // It's possible that the block pool never successfully registered // with any NN, so it was never added it to this map bpByBlockPoolId.remove(t.getBlockPoolId()); } boolean removed = false; for (Iterator<BPOfferService> it = bpByNameserviceId.values().iterator(); it.hasNext() && !removed;) { BPOfferService bpos = it.next(); if (bpos == t) { it.remove(); LOG.info("Removed " + bpos); removed = true; } } if (!removed) { LOG.warn("Couldn't remove BPOS " + t + " from bpByNameserviceId map"); } }
/** * Remove the given block pool from the block scanner, dataset, and storage. */ void shutdownBlockPool(BPOfferService bpos) { blockPoolManager.remove(bpos); if (bpos.hasBlockPoolId()) { // Possible that this is shutting down before successfully // registering anywhere. If that's the case, we wouldn't have // a block pool id String bpId = bpos.getBlockPoolId(); blockScanner.disableBlockPoolId(bpId); if (data != null) { data.shutdownBlockPool(bpId); } if (storage != null) { storage.removeBlockPoolStorage(bpId); } } }
boolean shouldRetryInit() { if (hasBlockPoolId()) { // One of the namenode registered successfully. lets continue retry for // other. return true; } return isAlive(); }
boolean shouldRetryInit() { if (hasBlockPoolId()) { // One of the namenode registered successfully. lets continue retry for // other. return true; } return isAlive(); }
synchronized void remove(BPOfferService t) { offerServices.remove(t); if (t.hasBlockPoolId()) { // It's possible that the block pool never successfully registered // with any NN, so it was never added it to this map bpByBlockPoolId.remove(t.getBlockPoolId()); } boolean removed = false; for (Iterator<BPOfferService> it = bpByNameserviceId.values().iterator(); it.hasNext() && !removed;) { BPOfferService bpos = it.next(); if (bpos == t) { it.remove(); LOG.info("Removed " + bpos); removed = true; } } if (!removed) { LOG.warn("Couldn't remove BPOS " + t + " from bpByNameserviceId map"); } }
synchronized void remove(BPOfferService t) { offerServices.remove(t); if (t.hasBlockPoolId()) { // It's possible that the block pool never successfully registered // with any NN, so it was never added it to this map bpByBlockPoolId.remove(t.getBlockPoolId()); } boolean removed = false; for (Iterator<BPOfferService> it = bpByNameserviceId.values().iterator(); it.hasNext() && !removed;) { BPOfferService bpos = it.next(); if (bpos == t) { it.remove(); LOG.info("Removed " + bpos); removed = true; } } if (!removed) { LOG.warn("Couldn't remove BPOS " + t + " from bpByNameserviceId map"); } }
/** * Remove the given block pool from the block scanner, dataset, and storage. */ void shutdownBlockPool(BPOfferService bpos) { blockPoolManager.remove(bpos); if (bpos.hasBlockPoolId()) { // Possible that this is shutting down before successfully // registering anywhere. If that's the case, we wouldn't have // a block pool id String bpId = bpos.getBlockPoolId(); blockScanner.disableBlockPoolId(bpId); if (data != null) { data.shutdownBlockPool(bpId); } if (storage != null) { storage.removeBlockPoolStorage(bpId); } } }
/** * Remove the given block pool from the block scanner, dataset, and storage. */ void shutdownBlockPool(BPOfferService bpos) { blockPoolManager.remove(bpos); if (bpos.hasBlockPoolId()) { // Possible that this is shutting down before successfully // registering anywhere. If that's the case, we wouldn't have // a block pool id String bpId = bpos.getBlockPoolId(); blockScanner.disableBlockPoolId(bpId); if (data != null) { data.shutdownBlockPool(bpId); } if (storage != null) { storage.removeBlockPoolStorage(bpId); } } }