Skip to content

Commit 5bac93c

Browse files
committed
HDFS-326 SFOS-1270 strip the ping operation from the service lifecycle proposal.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/branches/HDFS-326@808125 13f79535-47bb-0310-9956-ffa450edef68
1 parent a1cd17c commit 5bac93c

File tree

2 files changed

+2
-48
lines changed

2 files changed

+2
-48
lines changed

src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -251,27 +251,7 @@ static long now() {
251251
public void innerStart() throws IOException {
252252
startDataNode(getConf(), dataDirs);
253253
}
254-
255-
/**
256-
* {@inheritDoc}.
257-
*
258-
* This implementation checks for the IPC server running and the
259-
* DataNode being registered to a namenode.
260-
*
261-
* @param status the initial status
262-
* @throws IOException for any ping failure
263-
* @throws LivenessException if the IPC server is not defined
264-
*/
265-
@Override
266-
public void innerPing(ServiceStatus status) throws IOException {
267-
if (ipcServer == null) {
268-
status.addThrowable(new LivenessException("No IPC Server running"));
269-
}
270-
if (dnRegistration == null) {
271-
status.addThrowable(
272-
new LivenessException("Not registered to a namenode"));
273-
}
274-
}
254+
275255

276256
/**
277257
* This method starts the data node with the specified conf.

src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -473,33 +473,7 @@ protected boolean goLiveAtTheEndOfStart() {
473473
return true;
474474
}
475475

476-
/**
477-
* {@inheritDoc}.
478-
*
479-
* This implementation checks for the name system being non-null and live
480-
*
481-
* @param status status response to build up
482-
* @throws IOException for IO failure; this will be caught and included
483-
* in the status message
484-
*/
485-
@Override
486-
public void innerPing(ServiceStatus status) throws IOException {
487-
if (namesystem == null) {
488-
status.addThrowable(new LivenessException("No name system"));
489-
} else {
490-
try {
491-
namesystem.ping();
492-
} catch (IOException e) {
493-
status.addThrowable(e);
494-
}
495-
}
496-
if (httpServer == null || !httpServer.isAlive()) {
497-
status.addThrowable(
498-
new LivenessException("NameNode HttpServer is not running"));
499-
}
500-
}
501-
502-
/**
476+
/**
503477
* Wait for service to finish.
504478
* (Normally, it runs forever.)
505479
*/

0 commit comments

Comments
 (0)