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

Ask Your Question
0

Space Dump for post analysis of bugs during development

It would be helpfull for developers to have a dump of the space when analysing a bug which was reported from a tester.

Therefor I am currently investigating how I can create a dump of the "current" state of a clustered space to give our testers a simple tool which they can use to create a space snapshot whenever they create a bug report. I few things to note:

  1. We have only a couple of MBytes of data in the whole cluster (max 15MB)
  2. Some of the objects in the space are changed very often (every ms) and new ones are written very often (every ms)
  3. This is only necessary in the development environment, a performance degration when creating this dump is ok.
  4. This snapshot is used to later analyse a problem so it should by as accurate as possible while not affecting the behavior of the system too much.

My first try was as simple as:

Object[] objects = clusteredSpace.readMultiple(new Object(), ReadModifiers.EXCLUSIVE_READ_LOCK);
for (Object object : objects) {
        System.out.print(object.toString());
        System.out.println();
    }

Which actually got me the output I expected (I also think its quite consistent).
This is a preview from what i got:

com.xxx.ps.configuration.service.activation.ConfigurationParticipant@3c73951[serviceName=ps-radio-emergency-service]       
com.xxx.ps.configuration.service.activation.ConfigurationParticipant@3d5c822d[serviceName=ps-talkgroup-service]
com.xxx.ps.core.saga.PendingSagaTimeout@6f46426d[sagaId=3872ec31-331d-4b31-9016-fbc4157547da,serviceId=ps-account-service,name=LoggedOnUserCountSaga,data=com.xxx.ps.core.saga.TimeoutData@73700b80[routingKey=1,timeoutId=Tc6d04e73-9354-4d61-a560-92c00f20b9aa,data=com.xxx.ps.core.saga.SpaceSagaState@49c7b90e[sagaId=3872ec31-331d-4b31-9016-fbc4157547da,sagaType=com.xxx.ps.account.service.audit.LoggedOnUserCountSaga,instanceKeys=[],startingMessage=com.xxx.ps.core.service.startup.ConnectedToSelfEvent@10d307f1[eventId=EVbe8cf930-867f-4527-8ad8-f98e84933d2a],messageTransportInfoMap={EVbe8cf930-867f-4527-8ad8-f98e84933d2a=com.xxx.ps.core.messaging.transport.MessageTransportInfo@4d5b6aac[origin=psi://ps-account-service,destination=psi://ps-account-service,correlationId=23248a1c-43eb-455d-bc25-ed2ae8cd19fb,payloadRoutingKey=1,sourcePartitionRoutingKey=0,returnRoutingKey=<null>,skipReturnMessage=false]},startingDomainEvent=<null>,startingDomainEventPublishInfo=<null>,pendingTimeoutIds=[Tc6d04e73-9354-4d61-a560-92c00f20b9aa]]],expiresAt=2015-02-20T15:19:54.194Z,routingKey=1,correlationId=23248a1c-43eb-455d-bc25-ed2ae8cd19fb]
com.xxx.ps.publisher.Subscription@3e84448c[topicId=PrivilegesTopic,serviceName=ps-account-service,subscribersSize=4]

My question is:
Is there a better way of doing this? or is there already something like this in the management UI?
Is my current approch flawed? or does it really give me a snapshot of the complete space cluster at a given point in time?

asked 2015-02-20 09:44:26 -0600

leozilla gravatar image

updated 2015-02-20 11:01:37 -0600

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-02-20 12:30:55 -0600

jb gravatar image
edit flag offensive delete link more

Comments

This looks very promissing, i will try it out. Thanks.

leozilla gravatar imageleozilla ( 2015-02-26 04:35:04 -0600 )edit
0

The GS UI will allow you to export space data into CSV file.

Just run a query and click the export button. It will take you to a simple wizard that will export your data.

answered 2015-02-23 23:01:05 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Its not possible to run a query that matches all objects in the selected cluster. I would like to export all data in the cluster via one tool/script.

leozilla gravatar imageleozilla ( 2015-02-26 04:34:37 -0600 )edit

@shay hassidim: Is it possible to export the toString() representation of all objects in a specific cluster via the GS UI?

leozilla gravatar imageleozilla ( 2015-03-04 02:40:49 -0600 )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: 2015-02-20 09:44:26 -0600

Seen: 258 times

Last updated: Feb 23 '15