[
https://issues.apache.org/jira/browse/HDFS-5343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13870582#comment-13870582
]
Uma Maheswara Rao G edited comment on HDFS-5343 at 1/14/14 3:04 PM:
--------------------------------------------------------------------
Thanks Sathish for the updated patch.
I have few comments on the patch.
1) Coding format missing from the following lines:
DFSTestUtil.createFile(hdfs,file1, BLOCKSIZE,REPLICATION,SEED);
...........
assertEquals(fileStatus.getLen(), BLOCKSIZE*2);
..........
assertEquals(fileStatus.getLen(),BLOCKSIZE);
............
assertEquals(bytesRead,BLOCKSIZE);
...........
2) Also you have to assert the return code and expected length for cat command.
{code}
try {
+ ToolRunner.run(conf, shell, new String[] { "-cat",
+ "/TestSnapshotFileLength/sub1/.snapshot/snapshot1/file1" });
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
{code}
I think you need not catch exception here right?
3) I would like to see javadoc for test
4) Also for got to say don't delete your older patches from JIRA
was (Author: umamaheswararao):
Thanks Sathish for the updated patch.
I have few comments on the patch.
1) Coding format missing from the following lines:
DFSTestUtil.createFile(hdfs,file1, BLOCKSIZE,REPLICATION,SEED);
...........
assertEquals(fileStatus.getLen(), BLOCKSIZE*2);
..........
assertEquals(fileStatus.getLen(),BLOCKSIZE);
............
assertEquals(bytesRead,BLOCKSIZE);
...........
2) Also you have to assert the return code and expected length for cat command.
{code}
try {
+ ToolRunner.run(conf, shell, new String[] { "-cat",
+ "/TestSnapshotFileLength/sub1/.snapshot/snapshot1/file1" });
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
{code}
I think you need not catch exception here right?
3) I would like to see javadoc for test
> When cat command is issued on snapshot files getting unexpected result
> ----------------------------------------------------------------------
>
> Key: HDFS-5343
> URL: https://issues.apache.org/jira/browse/HDFS-5343
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Reporter: sathish
> Assignee: sathish
> Attachments: HDFS-5343-002.patch
>
>
> first if we create one file with some file length and take the snapshot of
> that file,and again append some data through append method to that file,then
> if we do cat command operation on snapshot of that file,in general it should
> dispaly the data what we added with create operation,but it is displaying the
> total data i.e. create +_ appended data.
> but if we do the same operation and if we read the contents of snapshot file
> through input stream it is just displaying the data created in snapshoted
> files.
> in this the behaviour of cat command and reading through inputstream is
> getting different
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)