Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Don't Fully Understand GigaSpace.clean()

Hello,

I think I am missing something basic about how to use GigaSpace.clean() When I call it from a non-PU client against an unpartitioned space then the space gets cleaned. When I call it from a non-PU client against a partitioned space then only one partition gets cleaned. Can someone explain how this method should be used?

I have attached a simple demo program to illustrate the behavior I am seeing. If you want to try it, run it twice - once with an unpartitioned space and once with a partitioned space - and compare the results. You will need to specify the location of the context file as a command line argument to CleanDemoMain.

Many thanks for your help.

-Dan h4. Attachments

[cleanDemo.jar|/upfiles/13759709815770377.jar]

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3060]{quote}

asked 2009-05-03 16:13:34 -0500

subuta gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

Do u have the gigaspace clustered tag as true?

answered 2009-05-03 16:21:03 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Hi Shay,

Thank you for your reply.

I was not using the clustered flag:

<os-core:space id="cleanDemo" url="jini://*/*/cleanDemo" />
<os-core:giga-space id="gigaSpace" space="cleanDemo"  />

Now I have added it:

<os-core:space id="cleanDemo" url="jini://*/*/cleanDemo" />
<os-core:giga-space id="gigaSpace" space="cleanDemo" clustered="true" />

But I am still getting the same results:

03-May-2009 22:36:29
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.springframework.context.support.FileSystemXmlApplicationContext@78b5f53a:
display name
[org.springframework.context.support.FileSystemXmlApplicationContext@78b5f53a];
startup date [Sun May 03 22:36:29 BST 2009]; root of context hierarchy
03-May-2009 22:36:29
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from file
[/home/dan/workspace/cleanDemo/cleanDemo.xml]
03-May-2009 22:36:29
org.springframework.context.support.AbstractApplicationContext

obtainFreshBeanFactory
INFO: Bean factory for application context
[org.springframework.context.support.FileSystemXmlApplicationContext@78b5f53a]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@6ba7508a

About to clean

There are: 0

About to write 'em

There are: 5000

About to clean

There are: 2500

-Dan

subuta gravatar imagesubuta ( 2009-05-03 16:40:00 -0500 )edit

Make sure your template routing field is null.
Shay

shay hassidim gravatar imageshay hassidim ( 2009-05-03 17:18:03 -0500 )edit

Small correction: space.clean does not support clustered partitioned space. Use: space.clear (null ) instead. Sorry for missing this. Shay Sent on the Sprint® Now Network from my BlackBerry®

shay hassidim gravatar imageshay hassidim ( 2009-05-03 17:20:00 -0500 )edit

Thanks Shay, that did it.

Sorry I missed this in the doc. Where is it?

-Dan

subuta gravatar imagesubuta ( 2009-05-03 17:25:18 -0500 )edit

Here is it : http://www.gigaspaces.com/wiki/displa...

This is a page that was part of XAP 6.0 and was revived recently with XAP 6.6 doc.

Shay

shay hassidim gravatar imageshay hassidim ( 2009-05-05 06:26:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2009-05-03 16:13:34 -0500

Seen: 38 times

Last updated: May 03 '09