Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: Sinks+Sources
    • Labels:
      None

      Description

      Flume 1.7 depends on joda-time version 2.1 which uses outdated tz database.
      For example following code

      new org.joda.time.DateTime(
          org.joda.time.DateTimeZone.forID("Europe/Moscow")
      ).toString()
      

      returns time with offset +04:00, but Moscow timezone is UTC+3 since 2014.

      Furthermore this version of joda-time does not allow to specify custom tz databse folder in contrast to newer versions.

      It affects RegexExtractorInterceptorMillisSerializer. Test to reproduce the bug:

      public void testMoscowTimezone() throws Exception {
          TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow"));
      
          String pattern = "yyyy-MM-dd HH:mm:ss";
          SimpleDateFormat format = new SimpleDateFormat(pattern);
          String dateStr = "2017-09-10 10:00:00";
          Date expectedDate = format.parse(dateStr);
      
          RegexExtractorInterceptorMillisSerializer sut = new RegexExtractorInterceptorMillisSerializer();
          Context context = new Context();
          context.put("pattern", pattern);
          sut.configure(context);
      
          assertEquals(String.valueOf(expectedDate.getTime()), sut.serialize(dateStr));
      }
      

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Jenkins build Flume-trunk-hbase-1 #320 (See https://builds.apache.org/job/Flume-trunk-hbase-1/320/)
          FLUME-3173. Upgrade joda-time to 2.9.9 (denes: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d434d23dadc411e5d7486447316172c495d70f22)

          • (edit) pom.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Flume-trunk-hbase-1 #320 (See https://builds.apache.org/job/Flume-trunk-hbase-1/320/ ) FLUME-3173 . Upgrade joda-time to 2.9.9 (denes: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=d434d23dadc411e5d7486447316172c495d70f22 ) (edit) pom.xml
          Hide
          denes Denes Arvay added a comment -

          Thank you Azat Nizametdinov for reporting it, Miklos Csanady for the patch and Marcell Hegedus for the review.

          Show
          denes Denes Arvay added a comment - Thank you Azat Nizametdinov for reporting it, Miklos Csanady for the patch and Marcell Hegedus for the review.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d434d23dadc411e5d7486447316172c495d70f22 in flume's branch refs/heads/trunk from Miklos Csanady
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=d434d23 ]

          FLUME-3173. Upgrade joda-time to 2.9.9

          This closes #169

          Reviewers: Marcell Hegedus

          (Miklos Csanady via Denes Arvay)

          Show
          jira-bot ASF subversion and git services added a comment - Commit d434d23dadc411e5d7486447316172c495d70f22 in flume's branch refs/heads/trunk from Miklos Csanady [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=d434d23 ] FLUME-3173 . Upgrade joda-time to 2.9.9 This closes #169 Reviewers: Marcell Hegedus (Miklos Csanady via Denes Arvay)
          Hide
          mcsanady Miklos Csanady added a comment -

          The upgrade seems not to raise any new issues in 1.8 flume.
          I made a follow-up jira (FLUME-3177) for the long term solution to replace joda-time in 2.0 Flume version.

          Show
          mcsanady Miklos Csanady added a comment - The upgrade seems not to raise any new issues in 1.8 flume. I made a follow-up jira ( FLUME-3177 ) for the long term solution to replace joda-time in 2.0 Flume version.
          Hide
          Azat Azat Nizametdinov added a comment -

          Alternatively joda-time can be replaced by Java 8 Date and Time API.

          Show
          Azat Azat Nizametdinov added a comment - Alternatively joda-time can be replaced by Java 8 Date and Time API.

            People

            • Assignee:
              mcsanady Miklos Csanady
              Reporter:
              Azat Azat Nizametdinov
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development