Rashmi,

Use FileSystem#getFileStatus(Path) [0] and then get the epoch mtime
via FileStatus#getModificationTime() [1]

[0] - 
http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html#getFileStatus(org.apache.hadoop.fs.Path)

[1] - 
http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileStatus.html#getModificationTime()

On Mon, Nov 5, 2012 at 4:19 AM, Nataraj Rashmi - rnatar
<rashmi.nata...@acxiom.com> wrote:
> Hello,
>
>
>
> What is the best way to get the date a file was created on hdfs using java
> hdfs API?
>
>
>
> Thanks
>
> Rashmi
>
> ***************************************************************************
> The information contained in this communication is confidential, is
> intended only for the use of the recipient named above, and may be legally
> privileged.
>
> If the reader of this message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.
>
> If you have received this communication in error, please resend this
> communication to the sender and delete the original message or any copy
> of it from your computer system.
>
> Thank You.
> ****************************************************************************



-- 
Harsh J

Reply via email to