[
https://issues.apache.org/jira/browse/HDFS-12108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080130#comment-16080130
]
Weiwei Yang commented on HDFS-12108:
------------------------------------
Hi [~nitiraj.rathore]
Thanks for reporting this issue. I am trying to reproduce it but seem cannot
{noformat}
[wwei@localhost]$ echo "this is a line without ending char" > /tmp/test.log
[wwei@localhost]$ tr -d '\n' < /tmp/test.log > /tmp/test1.log
[wwei@localhost]$ cat -A /tmp/test1.log
this is a line without ending char[wwei@localhost]$
// put to hdfs and then tail
[wwei@localhost]$ ./bin/hdfs dfs -tail -f /test1.log
this is a line without ending char
{noformat}
can you help to provide more steps how to reproduce this? Thanks
> Hdfs tail -f command keeps printing the last line in loop when more data is
> not available
> -----------------------------------------------------------------------------------------
>
> Key: HDFS-12108
> URL: https://issues.apache.org/jira/browse/HDFS-12108
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 2.7.3
> Reporter: Nitiraj Singh Rathore
>
> I tried to do the simple tail -f expecting that new data will keep appearing
> on console, but I found out that in the absence of new data the last line of
> the file keeps printing again and again. See the below output. For
> clarification I have also pasted the output of cat command for the same file.
> bq. [hdfs@c6401 lib]$ hdfs dfs -tail -f
> /ats/active/application_1499594381431_0001/appattempt_1499594381431_0001_000001/domainlog-appattempt_1499594381431_0001_000001
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001","readers":"*","writers":"hive"}
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001_1","readers":"*","writers":"hive"}
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001_1","readers":"*","writers":"hive"}
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001_1","readers":"*","writers":"hive"}
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001_1","readers":"*","writers":"hive"}
> bq.
> bq. [hdfs@c6401 lib]$ hdfs dfs -cat
> /ats/active/application_1499594381431_0001/appattempt_1499594381431_0001_000001/domainlog-appattempt_1499594381431_0001_000001
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001","readers":"*","writers":"hive"}
> bq.
> {"id":"Tez_ATS_application_1499594381431_0001_1","readers":"*","writers":"hive"}[hdfs@c6401
> lib]$
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]