HDFS-15100. RBF: Print stacktrace when DFSRouter fails to fetch/parse JMX output from NameNode. (#1800)

This commit is contained in:
Akira Ajisaka 2020-01-10 13:16:57 +09:00 committed by Takanobu Asanuma
parent b32757c616
commit 0315ef8448
1 changed files with 4 additions and 3 deletions

View File

@ -98,13 +98,14 @@ public final class FederationUtil {
JSONObject json = new JSONObject(jmxOutput); JSONObject json = new JSONObject(jmxOutput);
ret = json.getJSONArray("beans"); ret = json.getJSONArray("beans");
} catch (IOException e) { } catch (IOException e) {
LOG.error("Cannot read JMX bean {} from server {}: {}", LOG.error("Cannot read JMX bean {} from server {}",
beanQuery, webAddress, e.getMessage()); beanQuery, webAddress, e);
} catch (JSONException e) { } catch (JSONException e) {
// We shouldn't need more details if the JSON parsing fails.
LOG.error("Cannot parse JMX output for {} from server {}: {}", LOG.error("Cannot parse JMX output for {} from server {}: {}",
beanQuery, webAddress, e.getMessage()); beanQuery, webAddress, e.getMessage());
} catch (Exception e) { } catch (Exception e) {
LOG.error("Cannot parse JMX output for {} from server {}: {}", LOG.error("Cannot parse JMX output for {} from server {}",
beanQuery, webAddress, e); beanQuery, webAddress, e);
} finally { } finally {
if (reader != null) { if (reader != null) {