Hi sandeep, This should have worked. Please look at a sample program that used modification time /src/test/org/apache/hadoop/hdfs/TestModTime.java.
If you can write any sort of test that demonstrates the exact problem you are seeing, it will help in debugging. thanks, dhruba On Tue, Dec 30, 2008 at 11:35 PM, Sandeep Dhawan <[email protected]> wrote: > > Hi Dhruba, > > The file is being closed properly but the timestamp does not get modified. > The modification timestamp > still shows the file creation time. > I am creating a new file and writing data into this file. > > Thanks, > Sandeep > > > Dhruba Borthakur-2 wrote: > > > > I believe that file modification times are updated only when the file is > > closed. Are you "appending" to a preexisting file? > > > > thanks, > > dhruba > > > > > > On Tue, Dec 30, 2008 at 3:14 AM, Sandeep Dhawan <[email protected]> wrote: > > > >> > >> Hi, > >> > >> I have a application which creates a simple text file on hdfs. There is > a > >> second application which processes this file. The second application > >> picks > >> up the file for processing only when the file has not been modified for > >> 10 > >> mins. In this way, the second application is sure that this file is > ready > >> for processing. > >> > >> But, what is happening is that the Hadoop is not updating the > >> modification > >> timestamp of the file even when the file is being written into. The > >> modification timestamp of the file is same as the timestamp when the > file > >> was created. > >> > >> I am using hadoop 0.18.2. > >> > >> 1. Is this a bug in hadoop or is this way hadoop works > >> 2. Is there way by which I can programmitically set the modification > >> timestamp of the file > >> > >> Thanks, > >> Sandeep > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/File-Modification-timestamp-tp21215824p21215824.html > >> Sent from the Hadoop core-user mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/File-Modification-timestamp-tp21215824p21228299.html > Sent from the Hadoop core-user mailing list archive at Nabble.com. > >
