Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D2FF1043E for ; Thu, 5 Sep 2013 10:08:17 +0000 (UTC) Received: (qmail 41427 invoked by uid 500); 5 Sep 2013 10:08:10 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 40995 invoked by uid 500); 5 Sep 2013 10:08:09 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 40986 invoked by uid 99); 5 Sep 2013 10:08:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Sep 2013 10:08:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.223.180 as permitted sender) Received: from [209.85.223.180] (HELO mail-ie0-f180.google.com) (209.85.223.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Sep 2013 10:08:01 +0000 Received: by mail-ie0-f180.google.com with SMTP id 10so262246ied.11 for ; Thu, 05 Sep 2013 03:07:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=1E9zA9PIWQTkwk5V0VBG/ZwlNai+nFuv8F7BRUlU6rw=; b=Qon3h5lnWIVTl8jidjPyz0Fep8Lhz++9lTi9g5HRBYxDCzFyBTC17LNeBq2FPoOTwN OOpAQa4BzO6IygtlCEElfyF1unp6Uy2DVXrsqQX6lu2H6/DnLfhhOK1u34xbjvIuiqs8 LSFqpthRYSgnY9Vmpyx2bjf+9iDt7PDSOZHMZSs1cbfovg5EH5sea+TbNCSrN0Y9Q09Y tHufHSgSXmLc9j4UtPMSGtUdCf6S9OVk112jhdfE9AoMb4OfisRiVogXj8KML3XlNPCf bewqJ1CjAaLnZm5bKxojHeG71AAkqOwoekZAi4sITES3gCXSVb6ZYxAwjnWSmJfoLEY1 NmyQ== X-Gm-Message-State: ALoCoQnM2em9XQihGcZIySuH2zmehTYQKAsaMIyKmaJ0DOodsuxhX65oxspuH3PVZNRDvQ2aLsZ5 X-Received: by 10.50.130.106 with SMTP id od10mr5400241igb.1.1378375660394; Thu, 05 Sep 2013 03:07:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.56.105 with HTTP; Thu, 5 Sep 2013 03:07:20 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Thu, 5 Sep 2013 15:37:20 +0530 Message-ID: Subject: Re: How to update the timestamp of a file in HDFS To: "" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Murali, The touchz creates a zero sized file. It does not allow modifying a timestamp like Linux's touch command does, which is what the OP seems to be asking about. On Thu, Sep 5, 2013 at 12:14 PM, murali adireddy wrote: > right usage of command is: > > hadoop fs - touchz filename > > > On Thu, Sep 5, 2013 at 12:14 PM, murali adireddy > wrote: >> >> Hi , >> >> Try this "touchz" hadoop command. >> >> hadoop -touchz filename >> >> >> Thanks and Regards, >> Adi Reddy Murali >> >> >> On Thu, Sep 5, 2013 at 11:06 AM, Harsh J wrote: >>> >>> There's no shell command (equivalent to Linux's touch) but you can use >>> the Java API: >>> http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html#setTimes(org.apache.hadoop.fs.Path,%20long,%20long) >>> >>> On Thu, Sep 5, 2013 at 10:58 AM, Ramasubramanian Narayanan >>> wrote: >>> > Hi, >>> > >>> > Can you please help on to update the date & timestamp of a file in >>> > HDFS. >>> > >>> > regards, >>> > Rams >>> >>> >>> >>> -- >>> Harsh J >> >> > -- Harsh J