Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.6.0
    • Component/s: User Interface
    • Labels:
      None
    • Environment:

      RHEL5 Hadoop 1.0.3 Hbase0.94.0

      Description

      when using Host Selector widget to select one host, like "localhost", in workspace.js code save_host() function

      for(var i=0;i< obj.options.length;i++) {
      if(obj.options[i].selected) {
      if(i!=0)

      { cookie = cookie + "," + obj.options[i].value; }

      else

      { cookie = obj.options[i].value; }

      }
      }
      var myAjax=new Ajax.Request(
      "/hicc/jsp/session.jsp",

      { asynchronous: false, method: 'post', parameters: "hosts="+cookie }

      );
      this code will rise a ajax request to set hosts in session, but the hosts variable in session will be set like ",localhost", a additional comma will be added even there is only one host selected. I think this bug is introduced by above code.

      And this will cause MetricsController.java getSeriesBySessionAttribute() function

      String[] rkeys = (session.getAttribute(skey).toString()).split(",");

      to split this hosts variable to a zero length string, like string "" and string "localhost", using this string "" to get data in HBase which will retrieve no data.

      1. CHUKWA-654.patch
        0.8 kB
        Saisai Shao

        Activity

        Hide
        jerryshao Saisai Shao added a comment -

        this is workaround patch to modify code in MetricsController.java code, the best method is to modify workspace.js save_host() function to set a correct cookie variable

        Show
        jerryshao Saisai Shao added a comment - this is workaround patch to modify code in MetricsController.java code, the best method is to modify workspace.js save_host() function to set a correct cookie variable
        Hide
        eyang Eric Yang added a comment -

        +1 looks good.

        Show
        eyang Eric Yang added a comment - +1 looks good.
        Hide
        eyang Eric Yang added a comment -

        Thanks Saisai, I just committed this.

        Show
        eyang Eric Yang added a comment - Thanks Saisai, I just committed this.
        Hide
        hudson Hudson added a comment -

        Integrated in Chukwa-trunk #456 (See https://builds.apache.org/job/Chukwa-trunk/456/)
        CHUKWA-654. Added additional check for getting row key. (Saisai Shao via Eric Yang) (Revision 1369518)

        Result = SUCCESS
        eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1369518
        Files :

        • /incubator/chukwa/trunk/CHANGES.txt
        • /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java
        Show
        hudson Hudson added a comment - Integrated in Chukwa-trunk #456 (See https://builds.apache.org/job/Chukwa-trunk/456/ ) CHUKWA-654 . Added additional check for getting row key. (Saisai Shao via Eric Yang) (Revision 1369518) Result = SUCCESS eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1369518 Files : /incubator/chukwa/trunk/CHANGES.txt /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java

          People

          • Assignee:
            jerryshao Saisai Shao
            Reporter:
            jerryshao Saisai Shao
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development