hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brahma Reddy Battula (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7377) [ DataNode Web UI ] Metric page will not display anything..
Date Fri, 07 Nov 2014 13:38:33 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202034#comment-14202034
] 

Brahma Reddy Battula commented on HDFS-7377:
--------------------------------------------

As format will  come as null when we access from http://<DN_IP>:<http port>/dataNodeHome.jsp,
resonse will be null...Please check the following code for same..

{code}
public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    if (!HttpServer2.isInstrumentationAccessAllowed(getServletContext(),
                                                   request, response)) {
      return;
    }

    String format = request.getParameter("format");
    Collection<MetricsContext> allContexts = 
      ContextFactory.getFactory().getAllContexts();
    if ("json".equals(format)) {
      response.setContentType("application/json; charset=utf-8");
      PrintWriter out = response.getWriter();
      try {
        // Uses Jetty's built-in JSON support to convert the map into JSON.
        out.print(new JSON().toJSON(makeMap(allContexts)));
      } finally {
        out.close();
      }
    } else {
      PrintWriter out = response.getWriter();
      try {
        printMap(out, makeMap(allContexts));
      } finally {
        out.close();
      }
    }
  }
{code}


can we add like blow..as we are handling the json format...
{code}
if (null == format) {
      format = FORMAT_JSON;
    }
{code}


> [ DataNode Web UI ] Metric page will not display anything..
> -----------------------------------------------------------
>
>                 Key: HDFS-7377
>                 URL: https://issues.apache.org/jira/browse/HDFS-7377
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Brahma Reddy Battula
>            Priority: Critical
>
> Scenario :
> ======
> Go to http://<DN_IP>:<http port>/dataNodeHome.jsp
> and click on metrics link..
> we will not able to see any thing..
> Did not find reason..do we need to implent metric page..?
> Checked the HDFS-2933,but did not find any clue...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message