hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5765) Snapshot file is broken after appending to original file
Date Tue, 14 Jan 2014 09:10:52 GMT

    [ https://issues.apache.org/jira/browse/HDFS-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13870550#comment-13870550
] 

Suresh Srinivas commented on HDFS-5765:
---------------------------------------

This is most likely to be cat command not stopping at the snapshot length.

> Snapshot file is broken after appending to original file
> --------------------------------------------------------
>
>                 Key: HDFS-5765
>                 URL: https://issues.apache.org/jira/browse/HDFS-5765
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.2.0
>            Reporter: Guo Ruijing
>
> Reproduce Step
> 1)  cat snapshot.sh 
> sudo -u hdfs hdfs dfs -mkdir /test
> sudo -u hdfs hdfs dfsadmin -allowSnapshot /test
> rm -rf /tmp/mytest
> echo mytest > /tmp/mytest
> rm -rf /tmp/myappend
> echo myappend > /tmp/myappend
> sudo -u hdfs hdfs dfs -copyFromLocal /tmp/mytest /test
> sudo -u hdfs hdfs dfs -createSnapshot /test snap1
> sudo -u hdfs hdfs dfs -cat /test/.snapshot/snap1/mytest
> sudo -u hdfs hdfs dfs -appendToFile /tmp/myappend /test/mytest
> echo "expect mytest"
> sudo -u hdfs hdfs dfs -cat /test/.snapshot/snap1/mytest
> sudo -u hdfs hdfs dfs -deleteSnapshot /test/ snap1
> sudo -u hdfs hdfs dfsadmin -disallowSnapshot /test/
> sudo -u hdfs hdfs dfs -rm /test/mytest
> sudo -u hdfs hdfs dfs -rmdir /test/
> 2. Test result:
> [hadoop@localhost ~]$ ./snapshot.sh 
> Allowing snaphot on /test succeeded
> Created snapshot /test/.snapshot/snap1
> mytest
> expect mytest
> mytest
> myappend   <<< myappend is not expected



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message