hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nauroth <cnaur...@hortonworks.com>
Subject Re: INotify and atime
Date Wed, 08 Jun 2016 21:54:11 GMT
Hello Rahul,

I don't believe there is any fundamental difference in the handling of the
atime update for HDFS inotify.  I'd expect you to receive an event with
EventType.METADATA and MetadataUpdateEvent.TIMES, and I wouldn't expect
that you'd need to save a new fsimage to trigger the notification.

There is a test in the Hadoop codebase that exercises inotify event
delivery on atime update: TestDFSInotifyEventInputStream#testBasic.  You
might try looking at the source of that test and comparing it to what your
code is doing to see if there is any difference.

--Chris Nauroth




On 6/8/16, 2:17 PM, "rahul gidwani" <rahul.gidwani@gmail.com> wrote:

>I was testing Inotify locally and noticed that unless I save the FSImage I
>can't get a MetadataUpdateEvent to get fired.
>
>The test is pretty basic:
>
>I setup a minicluster with
>conf.setLong("dfs.access.time.precision", 1);
>
>create a file (verify I get a EventType.Create)
>
>I read that file and verify on the filesystem that the atime has changed
>for that file.
>I poll 1 minute for an event to get fired, nothing happens.
>I save the namespace for that fsImage, the event gets fired and I get a
>EventType.METADATA
>
>Is this logic correct?  All the other events I have tested do not require
>saving the FSImage to get fired, is the atime event handled differently
>somehow?
>
>thank you
>rahul


---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Mime
View raw message