Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AF552200CD0 for ; Mon, 10 Jul 2017 12:38:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ADE83166A96; Mon, 10 Jul 2017 10:38:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 03A66166A69 for ; Mon, 10 Jul 2017 12:38:50 +0200 (CEST) Received: (qmail 81671 invoked by uid 500); 10 Jul 2017 10:38:50 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 81616 invoked by uid 99); 10 Jul 2017 10:38:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2017 10:38:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 332561928EB for ; Mon, 10 Jul 2017 10:38:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id DvdNdn-YlOKS for ; Mon, 10 Jul 2017 10:38:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7293661218 for ; Mon, 10 Jul 2017 10:30:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6A3DBE0984 for ; Mon, 10 Jul 2017 10:30:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 810D12469D for ; Mon, 10 Jul 2017 10:30:01 +0000 (UTC) Date: Mon, 10 Jul 2017 10:30:01 +0000 (UTC) From: "Weiwei Yang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-12108) Hdfs tail -f command keeps printing the last line in loop when more data is not available MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 10 Jul 2017 10:38:51 -0000 [ 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: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org