Nitiraj Singh Rathore created HDFS-12108:
--------------------------------------------

             Summary: 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: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to