Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B37FDAB7 for ; Sun, 4 Nov 2012 23:41:08 +0000 (UTC) Received: (qmail 72499 invoked by uid 500); 4 Nov 2012 23:41:03 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 72218 invoked by uid 500); 4 Nov 2012 23:41:03 -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 72211 invoked by uid 99); 4 Nov 2012 23:41:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Nov 2012 23:41:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [198.160.111.226] (HELO mx2out.acxiom.com) (198.160.111.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Nov 2012 23:40:57 +0000 X-IronPort-AV: E=Sophos;i="4.80,712,1344229200"; d="scan'208";a="40285925" Received: from unknown (HELO CWYIGHCCRP02.Corp.Acxiom.net) ([10.98.6.170]) by mx2out.acxiom.com with ESMTP; 04 Nov 2012 17:32:27 -0600 Received: from CWYIGMBCRP01.Corp.Acxiom.net ([fe80::7828:a9c4:1647:a1ea]) by cwyighccrp02 ([10.98.6.170]) with mapi id 14.01.0289.001; Sun, 4 Nov 2012 17:40:35 -0600 From: Nataraj Rashmi - rnatar To: "user@hadoop.apache.org" Subject: RE: How to get the file creation date/time of a hdfs file using java hdfs API Thread-Topic: How to get the file creation date/time of a hdfs file using java hdfs API Thread-Index: Ac263o9yVnSgLx3ZQf+k+56Miy8XDAANQCkAAAt+4LA= Date: Sun, 4 Nov 2012 23:40:35 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [139.61.238.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thank you. Is this is the best way to get the time stamp for a inputSplit a= lso in my mapper? Basically I have to skip the splits that don't have yeste= rday's timestamp in my mapper. Can that be done? Thanks Rashmi -----Original Message----- From: Harsh J [mailto:harsh@cloudera.com]=20 Sent: Sunday, November 04, 2012 5:08 PM To: user@hadoop.apache.org Subject: Re: How to get the file creation date/time of a hdfs file using ja= va hdfs API Rashmi, Use FileSystem#getFileStatus(Path) [0] and then get the epoch mtime via Fil= eStatus#getModificationTime() [1] [0] - http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSy= stem.html#getFileStatus(org.apache.hadoop.fs.Path) [1] - http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSt= atus.html#getModificationTime() On Mon, Nov 5, 2012 at 4:19 AM, Nataraj Rashmi - rnatar wrote: > Hello, > > > > What is the best way to get the date a file was created on hdfs using=20 > java hdfs API? > > > > Thanks > > Rashmi > > ********************************************************************** > ***** The information contained in this communication is confidential,=20 > is intended only for the use of the recipient named above, and may be=20 > legally privileged. > > If the reader of this message is not the intended recipient, you are=20 > hereby notified that any dissemination, distribution or copying of=20 > this communication is strictly prohibited. > > If you have received this communication in error, please resend this=20 > communication to the sender and delete the original message or any=20 > copy of it from your computer system. > > Thank You. > ********************************************************************** > ****** -- Harsh J