You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Sumit Deshinge <su...@gmail.com> on 2022/06/28 12:14:33 UTC

Cache directory full path on disk

How do I get a full cache directory path?
E.g. ignite_storage_path/host/cache_name

I want this full directory path from the machine where cache data is
physically being stored. (not only storage directory path, but actual cache
data directory)
Is there any ignite API for the same?

-- 
Regards,
Sumit Deshinge

Re: Cache directory full path on disk

Posted by Gianluca Bonetti <gi...@gmail.com>.
Hello

Linux rmdir command deletes only non-empty directories.

Another option for you is to commit the cleaning source code to Apache
Ignite as open source contributor, either as fix on the destroy cache API,
or other new APIs.

To my humble point of view, removing the empty directory is not mission
critical fix for the core team to work on, as I suppose they are mainly
working on Apache Ignite 3.0

Thanks
Gianluca

On Mon, 11 Jul 2022 at 09:16, Sumit Deshinge <su...@gmail.com>
wrote:

> Hi,
> Thanks for your suggestion.
>
> Before I go with custom delete logic with checking each directory empty or
> not and based on that deleting it, I wanted to see if ignite gives any such
> functionality out of the box through its APIs.
>
> On Fri, Jul 8, 2022 at 9:19 PM Gianluca Bonetti <
> gianluca.bonetti@gmail.com> wrote:
>
>> Hello Sumit
>>
>> You can simply clean up with a scheduled cronjob does executes rmdir, if
>> the directory is not empty rmdir will not proceed.
>>
>> Cheers
>> Gianluca
>>
>> On Fri, 8 Jul 2022 at 15:38, Sumit Deshinge <su...@gmail.com>
>> wrote:
>>
>>> Any pointers here?
>>>
>>> On Wed, Jun 29, 2022 at 12:55 PM Sumit Deshinge <
>>> sumit.deshinge@gmail.com> wrote:
>>>
>>>> After cache.destroy operation is performed, it clears all the cache
>>>> data, but directory for that cache exists with empty data.
>>>> I am creating many caches for specific workflow and destroy them, same
>>>> keeps repeating for each workflow.
>>>> This results into cache directories lying on the machine and that count
>>>> goes on increasing.
>>>> So I want to cleanup them.
>>>>
>>>> On Tue, Jun 28, 2022 at 6:38 PM Stephen Darlington <
>>>> stephen.darlington@gridgain.com> wrote:
>>>>
>>>>> What are you trying to achieve?
>>>>>
>>>>> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> How do I get a full cache directory path?
>>>>> E.g. ignite_storage_path/host/cache_name
>>>>>
>>>>> I want this full directory path from the machine where cache data is
>>>>> physically being stored. (not only storage directory path, but actual cache
>>>>> data directory)
>>>>> Is there any ignite API for the same?
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Sumit Deshinge
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Sumit Deshinge
>>>>
>>>>
>>>
>>> --
>>> Regards,
>>> Sumit Deshinge
>>>
>>>
>
> --
> Regards,
> Sumit Deshinge
>
>

Re: Cache directory full path on disk

Posted by Sumit Deshinge <su...@gmail.com>.
Hi,
Thanks for your suggestion.

Before I go with custom delete logic with checking each directory empty or
not and based on that deleting it, I wanted to see if ignite gives any such
functionality out of the box through its APIs.

On Fri, Jul 8, 2022 at 9:19 PM Gianluca Bonetti <gi...@gmail.com>
wrote:

> Hello Sumit
>
> You can simply clean up with a scheduled cronjob does executes rmdir, if
> the directory is not empty rmdir will not proceed.
>
> Cheers
> Gianluca
>
> On Fri, 8 Jul 2022 at 15:38, Sumit Deshinge <su...@gmail.com>
> wrote:
>
>> Any pointers here?
>>
>> On Wed, Jun 29, 2022 at 12:55 PM Sumit Deshinge <su...@gmail.com>
>> wrote:
>>
>>> After cache.destroy operation is performed, it clears all the cache
>>> data, but directory for that cache exists with empty data.
>>> I am creating many caches for specific workflow and destroy them, same
>>> keeps repeating for each workflow.
>>> This results into cache directories lying on the machine and that count
>>> goes on increasing.
>>> So I want to cleanup them.
>>>
>>> On Tue, Jun 28, 2022 at 6:38 PM Stephen Darlington <
>>> stephen.darlington@gridgain.com> wrote:
>>>
>>>> What are you trying to achieve?
>>>>
>>>> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com>
>>>> wrote:
>>>>
>>>> How do I get a full cache directory path?
>>>> E.g. ignite_storage_path/host/cache_name
>>>>
>>>> I want this full directory path from the machine where cache data is
>>>> physically being stored. (not only storage directory path, but actual cache
>>>> data directory)
>>>> Is there any ignite API for the same?
>>>>
>>>> --
>>>> Regards,
>>>> Sumit Deshinge
>>>>
>>>>
>>>>
>>>
>>> --
>>> Regards,
>>> Sumit Deshinge
>>>
>>>
>>
>> --
>> Regards,
>> Sumit Deshinge
>>
>>

-- 
Regards,
Sumit Deshinge

Re: Cache directory full path on disk

Posted by Gianluca Bonetti <gi...@gmail.com>.
Hello Sumit

You can simply clean up with a scheduled cronjob does executes rmdir, if
the directory is not empty rmdir will not proceed.

Cheers
Gianluca

On Fri, 8 Jul 2022 at 15:38, Sumit Deshinge <su...@gmail.com>
wrote:

> Any pointers here?
>
> On Wed, Jun 29, 2022 at 12:55 PM Sumit Deshinge <su...@gmail.com>
> wrote:
>
>> After cache.destroy operation is performed, it clears all the cache data,
>> but directory for that cache exists with empty data.
>> I am creating many caches for specific workflow and destroy them, same
>> keeps repeating for each workflow.
>> This results into cache directories lying on the machine and that count
>> goes on increasing.
>> So I want to cleanup them.
>>
>> On Tue, Jun 28, 2022 at 6:38 PM Stephen Darlington <
>> stephen.darlington@gridgain.com> wrote:
>>
>>> What are you trying to achieve?
>>>
>>> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com>
>>> wrote:
>>>
>>> How do I get a full cache directory path?
>>> E.g. ignite_storage_path/host/cache_name
>>>
>>> I want this full directory path from the machine where cache data is
>>> physically being stored. (not only storage directory path, but actual cache
>>> data directory)
>>> Is there any ignite API for the same?
>>>
>>> --
>>> Regards,
>>> Sumit Deshinge
>>>
>>>
>>>
>>
>> --
>> Regards,
>> Sumit Deshinge
>>
>>
>
> --
> Regards,
> Sumit Deshinge
>
>

Re: Cache directory full path on disk

Posted by Sumit Deshinge <su...@gmail.com>.
Any pointers here?

On Wed, Jun 29, 2022 at 12:55 PM Sumit Deshinge <su...@gmail.com>
wrote:

> After cache.destroy operation is performed, it clears all the cache data,
> but directory for that cache exists with empty data.
> I am creating many caches for specific workflow and destroy them, same
> keeps repeating for each workflow.
> This results into cache directories lying on the machine and that count
> goes on increasing.
> So I want to cleanup them.
>
> On Tue, Jun 28, 2022 at 6:38 PM Stephen Darlington <
> stephen.darlington@gridgain.com> wrote:
>
>> What are you trying to achieve?
>>
>> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com>
>> wrote:
>>
>> How do I get a full cache directory path?
>> E.g. ignite_storage_path/host/cache_name
>>
>> I want this full directory path from the machine where cache data is
>> physically being stored. (not only storage directory path, but actual cache
>> data directory)
>> Is there any ignite API for the same?
>>
>> --
>> Regards,
>> Sumit Deshinge
>>
>>
>>
>
> --
> Regards,
> Sumit Deshinge
>
>

-- 
Regards,
Sumit Deshinge

Re: Cache directory full path on disk

Posted by Sumit Deshinge <su...@gmail.com>.
After cache.destroy operation is performed, it clears all the cache data,
but directory for that cache exists with empty data.
I am creating many caches for specific workflow and destroy them, same
keeps repeating for each workflow.
This results into cache directories lying on the machine and that count
goes on increasing.
So I want to cleanup them.

On Tue, Jun 28, 2022 at 6:38 PM Stephen Darlington <
stephen.darlington@gridgain.com> wrote:

> What are you trying to achieve?
>
> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com> wrote:
>
> How do I get a full cache directory path?
> E.g. ignite_storage_path/host/cache_name
>
> I want this full directory path from the machine where cache data is
> physically being stored. (not only storage directory path, but actual cache
> data directory)
> Is there any ignite API for the same?
>
> --
> Regards,
> Sumit Deshinge
>
>
>

-- 
Regards,
Sumit Deshinge

Re: Cache directory full path on disk

Posted by Stephen Darlington <st...@gridgain.com>.
What are you trying to achieve?

> On 28 Jun 2022, at 13:14, Sumit Deshinge <su...@gmail.com> wrote:
> 
> How do I get a full cache directory path?
> E.g. ignite_storage_path/host/cache_name
> 
> I want this full directory path from the machine where cache data is physically being stored. (not only storage directory path, but actual cache data directory)
> Is there any ignite API for the same?
> 
> -- 
> Regards,
> Sumit Deshinge
>