Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-16576

Fix encoding of intervals when fetching select query candidates from druid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Druid integration
    • None

    Description

      Debug logs on HIVE side -

      2017-05-03T23:49:00,672 DEBUG [HttpClient-Netty-Worker-0] client.NettyHttpClient: [GET http://localhost:8082/druid/v2/datasources/cmv_basetable_druid/candidates?intervals=1900-01-01T00:00:00.000+05:53:20/3000-01-01T00:00:00.000+05:30] Got response: 500 Server Error
      

      Druid exception stack trace -

      2017-05-03T18:56:58,928 WARN [qtp1651318806-158] org.eclipse.jetty.servlet.ServletHandler - /druid/v2/datasources/cmv_basetable_druid/candidates
      java.lang.IllegalArgumentException: Invalid format: ""1900-01-01T00:00:00.000 05:53:20"
      	at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:899) ~[joda-time-2.8.2.jar:2.8.2]
      	at org.joda.time.convert.StringConverter.setInto(StringConverter.java:212) ~[joda-time-2.8.2.jar:2.8.2]
      	at org.joda.time.base.BaseInterval.<init>(BaseInterval.java:200) ~[joda-time-2.8.2.jar:2.8.2]
      	at org.joda.time.Interval.<init>(Interval.java:193) ~[joda-time-2.8.2.jar:2.8.2]
      	at org.joda.time.Interval.parse(Interval.java:69) ~[joda-time-2.8.2.jar:2.8.2]
      	at io.druid.server.ClientInfoResource.getQueryTargets(ClientInfoResource.java:320) ~[classes/:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92]
      

      Note that intervals being sent as part of the HTTP request URL are not encoded properly when not using UTC timezone.

      Attachments

        1. HIVE-16576.patch
          2 kB
          Nishant Bangarwa

        Activity

          People

            nishantbangarwa Nishant Bangarwa
            nishantbangarwa Nishant Bangarwa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: