|
@@ -767,15 +767,16 @@ class BPServiceActor implements Runnable {
|
|
|
void register(NamespaceInfo nsInfo) throws IOException {
|
|
|
// The handshake() phase loaded the block pool storage
|
|
|
// off disk - so update the bpRegistration object from that info
|
|
|
- bpRegistration = bpos.createRegistration();
|
|
|
+ DatanodeRegistration newBpRegistration = bpos.createRegistration();
|
|
|
|
|
|
LOG.info(this + " beginning handshake with NN");
|
|
|
|
|
|
while (shouldRun()) {
|
|
|
try {
|
|
|
// Use returned registration from namenode with updated fields
|
|
|
- bpRegistration = bpNamenode.registerDatanode(bpRegistration);
|
|
|
- bpRegistration.setNamespaceInfo(nsInfo);
|
|
|
+ newBpRegistration = bpNamenode.registerDatanode(newBpRegistration);
|
|
|
+ newBpRegistration.setNamespaceInfo(nsInfo);
|
|
|
+ bpRegistration = newBpRegistration;
|
|
|
break;
|
|
|
} catch(EOFException e) { // namenode might have just restarted
|
|
|
LOG.info("Problem connecting to server: " + nnAddr + " :"
|