Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2032

HDFSEventSink doesn't work in Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: Sinks+Sources, Windows
    • Labels:
      None
    • Environment:

      Windows.

      Description

      Fix for FLUME-1373 (Remove hardcoded file separator in HDFSEventSink ) regressed the HDFS in Windows. The fix was done per PMD/Findbugs alert. The fix was to replace '/' with the OS file separator. The problem is that the code is not trying to build a local path; it's trying to combine strings to form a URI. In Linux, OS separator is '/' and this is not a problem. In windows, OS separator is '\' and therefore you end up with paths like hdfs://foo\var. The best fix would be to use URL objects but new URL("hdfs://..") throws unknown protocol HDFS. The most cost effective fix seems to be revert to hardcoding '/'

      1. FLUME-2032.patch
        1 kB
        Pedro Urbina Escos
      2. FLUME-2032.rebased.patch
        1 kB
        Pedro Urbina Escos

        Activity

        Hide
        hudson Hudson added a comment -

        Integrated in flume-trunk #426 (See https://builds.apache.org/job/flume-trunk/426/)
        FLUME-2032. HDFSEventSink doesn't work in Windows. (Revision a97c04657b4735d6759f7b66bc9b4df451ab3aab)

        Result = SUCCESS
        mpercy : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=a97c04657b4735d6759f7b66bc9b4df451ab3aab
        Files :

        • flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
        Show
        hudson Hudson added a comment - Integrated in flume-trunk #426 (See https://builds.apache.org/job/flume-trunk/426/ ) FLUME-2032 . HDFSEventSink doesn't work in Windows. (Revision a97c04657b4735d6759f7b66bc9b4df451ab3aab) Result = SUCCESS mpercy : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=a97c04657b4735d6759f7b66bc9b4df451ab3aab Files : flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
        Hide
        mpercy Mike Percy added a comment -

        Pushed to trunk and flume-1.4 branches. Thanks for the patch Pedro!

        Show
        mpercy Mike Percy added a comment - Pushed to trunk and flume-1.4 branches. Thanks for the patch Pedro!
        Hide
        mpercy Mike Percy added a comment -

        +1, looks good

        Show
        mpercy Mike Percy added a comment - +1, looks good
        Hide
        pedrou Pedro Urbina Escos added a comment -

        Could a comiter take a look at this changes?

        Show
        pedrou Pedro Urbina Escos added a comment - Could a comiter take a look at this changes?

          People

          • Assignee:
            pedrou Pedro Urbina Escos
            Reporter:
            pedrou Pedro Urbina Escos
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development