You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mubarak Seyed (JIRA)" <ji...@apache.org> on 2012/07/16 11:01:36 UTC

[jira] [Created] (FLUME-1373) Remove hardcoded file separator in HDFSEventSink

Mubarak Seyed created FLUME-1373:
------------------------------------

             Summary: Remove hardcoded file separator in HDFSEventSink
                 Key: FLUME-1373
                 URL: https://issues.apache.org/jira/browse/FLUME-1373
             Project: Flume
          Issue Type: Bug
          Components: Sinks+Sources
            Reporter: Mubarak Seyed
            Priority: Trivial


configure() in HDFSEventSink hardcodes the file separator

{code}
    // FIXME: Not portable to Windows
    this.path = dirpath + "/" + fileName;
{code}

Fix is very simple, just to use 

{code}
    this.path = dirpath + System.getProperty("file.separator") + fileName;
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLUME-1373) Remove hardcoded file separator in HDFSEventSink

Posted by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415002#comment-13415002 ] 

Jarek Jarcec Cecho commented on FLUME-1373:
-------------------------------------------

Hi Mubarak,
do you have use case where you had issues and this change solve them?

I was exploring the source code and the "path" variable seems to be used only for HDFS access. I'm not sure whether hdfs will actually support windows file separator (even when running on windows).

Jarcec
                
> Remove hardcoded file separator in HDFSEventSink
> ------------------------------------------------
>
>                 Key: FLUME-1373
>                 URL: https://issues.apache.org/jira/browse/FLUME-1373
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Mubarak Seyed
>            Priority: Trivial
>         Attachments: FLUME-1373.trunk.v1.patch
>
>
> configure() in HDFSEventSink hardcodes the file separator
> {code}
>     // FIXME: Not portable to Windows
>     this.path = dirpath + "/" + fileName;
> {code}
> Fix is very simple, just to use 
> {code}
>     this.path = dirpath + System.getProperty("file.separator") + fileName;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FLUME-1373) Remove hardcoded file separator in HDFSEventSink

Posted by "Mubarak Seyed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mubarak Seyed updated FLUME-1373:
---------------------------------

    Attachment: FLUME-1373.trunk.v1.patch

The attached file is a patch. Thanks.
                
> Remove hardcoded file separator in HDFSEventSink
> ------------------------------------------------
>
>                 Key: FLUME-1373
>                 URL: https://issues.apache.org/jira/browse/FLUME-1373
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Mubarak Seyed
>            Priority: Trivial
>         Attachments: FLUME-1373.trunk.v1.patch
>
>
> configure() in HDFSEventSink hardcodes the file separator
> {code}
>     // FIXME: Not portable to Windows
>     this.path = dirpath + "/" + fileName;
> {code}
> Fix is very simple, just to use 
> {code}
>     this.path = dirpath + System.getProperty("file.separator") + fileName;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FLUME-1373) Remove hardcoded file separator in HDFSEventSink

Posted by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Jarcec Cecho resolved FLUME-1373.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: v1.3.0
         Assignee: Mubarak Seyed

Committed revision 1363294.

Hi Mubarak,
I've manually changed the file separator to back slash and tried flume with it. Everything seemed to be working and therefore I've committed your patch.

Thank you for your contribution!

Jarcec
                
> Remove hardcoded file separator in HDFSEventSink
> ------------------------------------------------
>
>                 Key: FLUME-1373
>                 URL: https://issues.apache.org/jira/browse/FLUME-1373
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Mubarak Seyed
>            Assignee: Mubarak Seyed
>            Priority: Trivial
>             Fix For: v1.3.0
>
>         Attachments: FLUME-1373.trunk.v1.patch
>
>
> configure() in HDFSEventSink hardcodes the file separator
> {code}
>     // FIXME: Not portable to Windows
>     this.path = dirpath + "/" + fileName;
> {code}
> Fix is very simple, just to use 
> {code}
>     this.path = dirpath + System.getProperty("file.separator") + fileName;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLUME-1373) Remove hardcoded file separator in HDFSEventSink

Posted by "Mubarak Seyed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415621#comment-13415621 ] 

Mubarak Seyed commented on FLUME-1373:
--------------------------------------

Hi Jarec,
I don't have an use-case to run on windows. I believe hadoop can be installed on windows. When i ran PMD/Findbugs to analyze the code, i had seen the hardcoded file separator violation. Thought of fixing it. Thanks.

>From hadoop-common [quick start|http://hadoop.apache.org/common/docs/r0.20.2/quickstart.html]
{quote}
Win32 is supported as a development platform. Distributed operation has not been well tested on Win32, so it is not supported as a production platform
{quote}
                
> Remove hardcoded file separator in HDFSEventSink
> ------------------------------------------------
>
>                 Key: FLUME-1373
>                 URL: https://issues.apache.org/jira/browse/FLUME-1373
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Mubarak Seyed
>            Priority: Trivial
>         Attachments: FLUME-1373.trunk.v1.patch
>
>
> configure() in HDFSEventSink hardcodes the file separator
> {code}
>     // FIXME: Not portable to Windows
>     this.path = dirpath + "/" + fileName;
> {code}
> Fix is very simple, just to use 
> {code}
>     this.path = dirpath + System.getProperty("file.separator") + fileName;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira