You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Pete Wyckoff (JIRA)" <ji...@apache.org> on 2008/10/23 20:12:44 UTC

[jira] Created: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
-----------------------------------------------------------------------------------------

                 Key: HADOOP-4508
                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
             Project: Hadoop Core
          Issue Type: Bug
          Components: fs
    Affects Versions: 0.19.0, 0.20.0
            Reporter: Pete Wyckoff


does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

Pete Wyckoff updated HADOOP-4508:
---------------------------------

    Attachment: HADOOP-4508.txt

attaching a diff for TestAppend2::testSimpleAppend that demonstrates the issue with a simple assertTrue(stm.getPos() > 0);



> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>         Attachments: HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Attachment: appendGetPos.patch

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-4508:
-------------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Dhruba!

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>             Fix For: 0.19.1
>
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646656#action_12646656 ] 

dhruba borthakur commented on HADOOP-4508:
------------------------------------------

can some hdfs contributor pl review this one?

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647359#action_12647359 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4508:
------------------------------------------------

> I am not finding i very elegant to make it final because it is set inside one constructor invokes the other constructor

yeah, you need to change all constructors to make it work.  I am fine with the current code.

+1 new patch looks good

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur reassigned HADOOP-4508:
----------------------------------------

    Assignee: dhruba borthakur

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646701#action_12646701 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4508:
------------------------------------------------

How about make initialFileSize final and then getInitialLen() don't need to be synchronized?

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644901#action_12644901 ] 

dhruba borthakur commented on HADOOP-4508:
------------------------------------------

Hi Konstantin, it would be nice if you could review this one. Thanks.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Pete Wyckoff (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653503#action_12653503 ] 

Pete Wyckoff commented on HADOOP-4508:
--------------------------------------

any update on this? looks ready to commit to 20 and 19.1.  I think as dhruba said it really is a blocker since it is a bad bug when opening a file in append mode.

thanks, pete


> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>             Fix For: 0.19.1
>
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642529#action_12642529 ] 

dhruba borthakur commented on HADOOP-4508:
------------------------------------------

Yes, we should avoid returning an array of size 1. That part was mostly a hack to determine if this was this works.

We need to the size of the file returned to the caller.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Attachment: appendGetPos3.patch

Removed the "synchronized" on getInitialLength() because the initialFileSize is initialized in the constructor itself. (I am not finding i very elegant to make it final because it is set inside one constructor invokes the other constructor)

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Fix Version/s: 0.19.1

I would like this to go into 0.19 branch. 

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>             Fix For: 0.19.1
>
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644874#action_12644874 ] 

Hadoop QA commented on HADOOP-4508:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12393206/appendGetPos2.patch
  against trunk revision 709609.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3520/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3520/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3520/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3520/console

This message is automatically generated.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Pete Wyckoff (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643331#action_12643331 ] 

Pete Wyckoff commented on HADOOP-4508:
--------------------------------------

applied the patch and ran libhdfs and fuse-dfs unit tests and all passed!!


> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654087#action_12654087 ] 

Hudson commented on HADOOP-4508:
--------------------------------

Integrated in Hadoop-trunk #680 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/680/])
    

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>             Fix For: 0.19.1
>
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Status: Patch Available  (was: Open)

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Status: Open  (was: Patch Available)

Work on Nicholas's review comments.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Status: Patch Available  (was: Open)

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

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

dhruba borthakur updated HADOOP-4508:
-------------------------------------

    Attachment: appendGetPos2.patch

Incorporated Konstantin's review comments.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647521#action_12647521 ] 

Hadoop QA commented on HADOOP-4508:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12393858/appendGetPos3.patch
  against trunk revision 713893.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3589/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3589/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3589/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3589/console

This message is automatically generated.

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, appendGetPos2.patch, appendGetPos3.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-4508) FSDataOutputStream.getPos() == 0when appending to existing file and should be file length

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642514#action_12642514 ] 

Konstantin Shvachko commented on HADOOP-4508:
---------------------------------------------

Dhruba, can we do something to avoid returning FileStatus as an array of size one.
You just need the number of block out of it right?

> FSDataOutputStream.getPos() == 0when appending to existing file and should be file length
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4508
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Pete Wyckoff
>            Assignee: dhruba borthakur
>         Attachments: appendGetPos.patch, HADOOP-4508.txt
>
>
> does not seem getPos is set correctly when opening an existing file with non-zero length in append mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.