HDFS-11333. Print a user friendly error message when plugins are not found. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 859bd159ae554174200334b5eb1d7e8dbef958ad) (cherry picked from commit a8531d5d52fb219c2adb5b6025cfc3fad264e8aa) (cherry picked from commit 4c47cb68e88505d5fdc6830a4789e78a974cb9cf)
This commit is contained in:
parent
18dfff8a3c
commit
f133e0161c
@ -70,6 +70,8 @@ Release 2.7.4 - UNRELEASED
|
|||||||
HDFS-10534. NameNode WebUI should display DataNode usage histogram.
|
HDFS-10534. NameNode WebUI should display DataNode usage histogram.
|
||||||
(Kai Sasaki via zhz)
|
(Kai Sasaki via zhz)
|
||||||
|
|
||||||
|
HDFS-11333. Print a user friendly error message when plugins are not found. (Wei-Chiu Chuang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-10896. Move lock logging logic from FSNamesystem into FSNamesystemLock.
|
HDFS-10896. Move lock logging logic from FSNamesystem into FSNamesystemLock.
|
||||||
|
@ -769,7 +769,15 @@ private void startInfoServer(Configuration conf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startPlugins(Configuration conf) {
|
private void startPlugins(Configuration conf) {
|
||||||
plugins = conf.getInstances(DFS_DATANODE_PLUGINS_KEY, ServicePlugin.class);
|
try {
|
||||||
|
plugins = conf.getInstances(DFS_DATANODE_PLUGINS_KEY,
|
||||||
|
ServicePlugin.class);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
String pluginsValue = conf.get(DFS_DATANODE_PLUGINS_KEY);
|
||||||
|
LOG.error("Unable to load DataNode plugins. Specified list of plugins: " +
|
||||||
|
pluginsValue, e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
for (ServicePlugin p: plugins) {
|
for (ServicePlugin p: plugins) {
|
||||||
try {
|
try {
|
||||||
p.start(this);
|
p.start(this);
|
||||||
|
@ -684,8 +684,15 @@ private void startCommonServices(Configuration conf) throws IOException {
|
|||||||
httpServer.setFSImage(getFSImage());
|
httpServer.setFSImage(getFSImage());
|
||||||
}
|
}
|
||||||
rpcServer.start();
|
rpcServer.start();
|
||||||
|
try {
|
||||||
plugins = conf.getInstances(DFS_NAMENODE_PLUGINS_KEY,
|
plugins = conf.getInstances(DFS_NAMENODE_PLUGINS_KEY,
|
||||||
ServicePlugin.class);
|
ServicePlugin.class);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
String pluginsValue = conf.get(DFS_NAMENODE_PLUGINS_KEY);
|
||||||
|
LOG.error("Unable to load NameNode plugins. Specified list of plugins: " +
|
||||||
|
pluginsValue, e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
for (ServicePlugin p: plugins) {
|
for (ServicePlugin p: plugins) {
|
||||||
try {
|
try {
|
||||||
p.start(this);
|
p.start(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user