Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ void register(NamespaceInfo nsInfo) throws IOException {
// off disk - so update the bpRegistration object from that info
DatanodeRegistration newBpRegistration = bpos.createRegistration();

LOG.info(this + " beginning handshake with NN");
LOG.info("{} beginning handshake with NN: {}.", this, nnAddr);

while (shouldRun()) {
try {
Expand All @@ -826,15 +826,14 @@ void register(NamespaceInfo nsInfo) throws IOException {
bpRegistration = newBpRegistration;
break;
} catch(EOFException e) { // namenode might have just restarted
LOG.info("Problem connecting to server: " + nnAddr + " :"
+ e.getLocalizedMessage());
LOG.info("Problem connecting to server: {} : {}.", nnAddr, e.getLocalizedMessage());
} catch(SocketTimeoutException e) { // namenode is busy
LOG.info("Problem connecting to server: " + nnAddr);
LOG.info("Problem connecting to server: {}.", nnAddr);
} catch(RemoteException e) {
LOG.warn("RemoteException in register", e);
LOG.warn("RemoteException in register to server: {}.", nnAddr, e);
throw e;
} catch(IOException e) {
LOG.warn("Problem connecting to server: " + nnAddr);
LOG.warn("Problem connecting to server: {}.", nnAddr);
}
// Try again in a second
sleepAndLogInterrupts(1000, "connecting to server");
Expand All @@ -844,7 +843,7 @@ void register(NamespaceInfo nsInfo) throws IOException {
throw new IOException("DN shut down before block pool registered");
}

LOG.info(this + " successfully registered with NN");
LOG.info("{} successfully registered with NN: {}.", this, nnAddr);
bpos.registrationSucceeded(this, bpRegistration);

// reset lease id whenever registered to NN.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void setUp() throws IOException {
actor = new BPServiceActor("test", "test", INVALID_ADDR, null, mockBPOS);

fakeNsInfo = mock(NamespaceInfo.class);
// Return a a good software version.
// Return a good software version.
doReturn(VersionInfo.getVersion()).when(fakeNsInfo).getSoftwareVersion();
// Return a good layout version for now.
doReturn(HdfsServerConstants.NAMENODE_LAYOUT_VERSION).when(fakeNsInfo)
Expand Down Expand Up @@ -144,7 +144,7 @@ public void testDNShutdwonBeforeRegister() throws Exception {
DataNode dn = new DataNode(conf, locations, null, null);
BPOfferService bpos = new BPOfferService("test_ns",
Lists.newArrayList("nn0"), Lists.newArrayList(nnADDR),
Collections.<InetSocketAddress>nCopies(1, null), dn);
Collections.nCopies(1, null), dn);
DatanodeProtocolClientSideTranslatorPB fakeDnProt =
mock(DatanodeProtocolClientSideTranslatorPB.class);
when(fakeDnProt.versionRequest()).thenReturn(fakeNsInfo);
Expand Down