Uploaded image for project: 'Chukwa'
  1. Chukwa
  2. CHUKWA-552

HICC+ HBase + options with % sign = bug

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: User Interface
    • Labels:
      None
    • Release Note:
      fixed the problem, calling encodeURI() on uris so that they can be decoded correctly.

      Description

      If you have an option name with a percent sign in it, that will cause hicc to fail.

      1. CHUKWA-552.patch
        4 kB
        Michael Chang
      2. CHUKWA-552.patch
        4 kB
        Michael Chang

        Activity

        Hide
        asrabkin Ari Rabkin added a comment -

        Stack trace:

        2010-11-10 11:01:01.365::WARN: /hicc/v1/metrics/schema/SystemMetrics/Df/Df:Use%
        java.lang.IllegalArgumentException
        at java.net.URI.create(URI.java:842)
        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:95)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:553)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        ....
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
        Caused by: java.net.URISyntaxException: Malformed escape pair at index 62: http://r11:4080/hicc/v1/metrics/schema/SystemMetrics/Df/Df:Use%
        ...

        Show
        asrabkin Ari Rabkin added a comment - Stack trace: 2010-11-10 11:01:01.365::WARN: /hicc/v1/metrics/schema/SystemMetrics/Df/Df:Use% java.lang.IllegalArgumentException at java.net.URI.create(URI.java:842) at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:95) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:553) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) .... at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Caused by: java.net.URISyntaxException: Malformed escape pair at index 62: http://r11:4080/hicc/v1/metrics/schema/SystemMetrics/Df/Df:Use% ...
        Hide
        asrabkin Ari Rabkin added a comment -

        Not quite sure where the appropriate stage is to fix this:

        Before data gets into HBase?
        In the HICC code to pull data out of HBase?
        Somewhere else?

        Eric, thoughts?

        Show
        asrabkin Ari Rabkin added a comment - Not quite sure where the appropriate stage is to fix this: Before data gets into HBase? In the HICC code to pull data out of HBase? Somewhere else? Eric, thoughts?
        Hide
        eyang Eric Yang added a comment -

        I think this is improper handling of html encode on the javascript. Javascript should send URL as:

        /hicc/v1/metrics/schema/SystemMetrics/Df/Df%3AUse%25

        Hence jersey can decode it properly.

        Show
        eyang Eric Yang added a comment - I think this is improper handling of html encode on the javascript. Javascript should send URL as: /hicc/v1/metrics/schema/SystemMetrics/Df/Df%3AUse%25 Hence jersey can decode it properly.
        Hide
        eyang Eric Yang added a comment -

        FYI, try out SystemMetrics adaptor, it works much better than scrapping df output, and it supports all major unix platforms.

        Show
        eyang Eric Yang added a comment - FYI, try out SystemMetrics adaptor, it works much better than scrapping df output, and it supports all major unix platforms.
        Hide
        mcchang Michael Chang added a comment -

        calls encodeURI() on the generated URIs so that jersey can decode them correctly.

        Show
        mcchang Michael Chang added a comment - calls encodeURI() on the generated URIs so that jersey can decode them correctly.
        Hide
        eyang Eric Yang added a comment -

        +1 looks good.

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

        Missing a $ from the previous patch

        Show
        mcchang Michael Chang added a comment - Missing a $ from the previous patch
        Hide
        mcchang Michael Chang added a comment -

        Whoops, this is the correct one.

        Show
        mcchang Michael Chang added a comment - Whoops, this is the correct one.
        Hide
        asrabkin Ari Rabkin added a comment -

        I just committed this. Thanks, Michael.

        Show
        asrabkin Ari Rabkin added a comment - I just committed this. Thanks, Michael.

          People

          • Assignee:
            mcchang Michael Chang
            Reporter:
            asrabkin Ari Rabkin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development