diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/FederationUtil.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/FederationUtil.java index d2eec04cd4..9af9f9a441 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/FederationUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/FederationUtil.java @@ -98,13 +98,14 @@ public static JSONArray getJmx(String beanQuery, String webAddress, JSONObject json = new JSONObject(jmxOutput); ret = json.getJSONArray("beans"); } catch (IOException e) { - LOG.error("Cannot read JMX bean {} from server {}: {}", - beanQuery, webAddress, e.getMessage()); + LOG.error("Cannot read JMX bean {} from server {}", + beanQuery, webAddress, e); } catch (JSONException e) { + // We shouldn't need more details if the JSON parsing fails. LOG.error("Cannot parse JMX output for {} from server {}: {}", beanQuery, webAddress, e.getMessage()); } catch (Exception e) { - LOG.error("Cannot parse JMX output for {} from server {}: {}", + LOG.error("Cannot parse JMX output for {} from server {}", beanQuery, webAddress, e); } finally { if (reader != null) {