HDFS-7154. Fix returning value of starting reconfiguration task (Lei Xu via Colin P. McCabe)
This commit is contained in:
parent
4799570dfd
commit
7aab5fa1bd
|
@ -1215,6 +1215,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-7167. NPE while running Mover if the given path is for a file. (jing9)
|
HDFS-7167. NPE while running Mover if the given path is for a file. (jing9)
|
||||||
|
|
||||||
|
HDFS-7154. Fix returning value of starting reconfiguration task (Lei Xu via
|
||||||
|
Colin P. McCabe)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -1396,11 +1396,12 @@ public class DFSAdmin extends FsShell {
|
||||||
ClientDatanodeProtocol dnProxy = getDataNodeProxy(address);
|
ClientDatanodeProtocol dnProxy = getDataNodeProxy(address);
|
||||||
dnProxy.startReconfiguration();
|
dnProxy.startReconfiguration();
|
||||||
System.out.println("Started reconfiguration task on DataNode " + address);
|
System.out.println("Started reconfiguration task on DataNode " + address);
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
System.err.println("Node type " + nodeType +
|
System.err.println("Node type " + nodeType +
|
||||||
" does not support reconfiguration.");
|
" does not support reconfiguration.");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int getReconfigurationStatus(String nodeType, String address,
|
int getReconfigurationStatus(String nodeType, String address,
|
||||||
|
@ -1438,11 +1439,11 @@ public class DFSAdmin extends FsShell {
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
err.println("DataNode reloading configuration: " + e + ".");
|
err.println("DataNode reloading configuration: " + e + ".");
|
||||||
return -1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
err.println("Node type " + nodeType + " does not support reconfiguration.");
|
err.println("Node type " + nodeType + " does not support reconfiguration.");
|
||||||
return -1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
@ -109,7 +108,7 @@ public class TestDFSAdmin {
|
||||||
final int port = datanode.getIpcPort();
|
final int port = datanode.getIpcPort();
|
||||||
final String address = "localhost:" + port;
|
final String address = "localhost:" + port;
|
||||||
|
|
||||||
admin.startReconfiguration("datanode", address);
|
assertThat(admin.startReconfiguration("datanode", address), is(0));
|
||||||
|
|
||||||
List<String> outputs = null;
|
List<String> outputs = null;
|
||||||
int count = 100;
|
int count = 100;
|
||||||
|
|
Loading…
Reference in New Issue