curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Check Peck <comptechge...@gmail.com>
Subject Re: find all the children which are x days old?
Date Wed, 09 Sep 2015 06:22:01 GMT
Yeah I looked at the Stat object. I saw two variables but there is no
documentation in the code at all in Stats class.

long ctime,
long mtime,

What is the difference between these two? From the names, ctime is the
created time and mtime is the modified time and I should be using mtime
right?


On Tue, Sep 8, 2015 at 11:07 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> You can use PathChildrenCache or TreeCache. These classes cache trees of
> ZNodes. You can then iterate over each node and look at the Stat object.
> One of the Stat object’s fields has the value you want (I forget which).
>
> -JZ
>
>
> On September 8, 2015 at 9:03:49 PM, Check Peck (comptechgeeky@gmail.com)
> wrote:
>
> Is there any way we can find childrens of a given znode which is 30 days
> old using curator? I mean the node which doesn't had any activity for last
> 30 days or X days.
>
>     public List<String> getChildrenOfANode(final String path) throws
> Exception {
>         return client.getChildren().forPath(path);
>     }
>
>

Mime
View raw message