Any reason why the supported eviction/expiration does not work for your case...
-Anil. On Wed, Apr 27, 2016 at 1:49 PM, Udo Kohlmeyer <[email protected]> wrote: > Hi there Eugene, > > The free space checking code, is that running as a separate process or as > part of each of the server jvms? > I would run the free space checking as part of each server(deployed as > part of the server code). This way each server will monitor it's own free > space. > > I'm not sure how to get the last access time of each item, but if you can > get hold of that information, then you can run some code that will use the > PartitionRegionHelper.getLocalData(Region) or > PartitionRegionHelper.getLocalPrimaryData(Region) to get the local data. > > Then you could remove/invalidate the data entry. > > Also disk store compaction now plays a role. So you might have to trigger > a compaction of the diskstore in order to avoid unnecessary data being held > in the diskstores. > > The simplest way you could do this is by running the following: (as per > the DiskStore API > <http://geode.incubator.apache.org/releases/latest/javadoc/com/gemstone/gemfire/cache/DiskStore.html> > ) > > Cache cache = CacheFactory.getAnyInstance(); > DiskStore diskstore = cache.findDiskStore("diskStoreName"); > diskstore.forceCompaction(); > > The forceCompaction method is blocking, so please do not make this code as > part of some critical processing step. > > --Udo > > On 28/04/2016 6:25 am, Eugene Strokin wrote: > > I'm running a periodic check of the free space on each node of my cluster. > The cluster contains a partitioned region. > If some node is getting full, I'd like to remove least recently used items > to free up the space. New items are getting loaded constantly. > I've enabled statistics, so it looks like I can get last access time of > each item, but I'd like to iterate through only "local" items, the items > which are stored on the local node only. I'm trying different things, but > none of them seems right. > Is it even possible? If so, could you please point me to the right > direction? > > Thank you, > Eugene > > >
