InvalidClassException


#1

Hello,

I’m a newbie to the Aerospike and trying to move data from Redis and MongoDB. But I couldn’t find any way to drop namespaces and as suggested I tried to use scan API from Java. But since my datatype is updated I get an Exception. In this case how can I drop namespace or scan all keys without serializing all data with using scan API?

Here is the exception I get

Caused by: java.io.InvalidClassException: blahblah; local class incompatible: stream classdesc serialVersionUID = 3501525032824416540, local class serialVersionUID = 2487802786083505283

And in addition when I call client.truncate(new InfoPolicy(), NAMESPACE, null, null);

I get: com.aerospike.client.AerospikeException$Parse: Error Code -2: Info response does not include: truncate:namespace=somenamespace


#2

I’m confused. Are you trying to get all the keys, or drop (delete) a namespace, or just simply trying to delete all the data in that namespace? Also - which version of the aerospike server are you running?


#3

Albot I’m trying this guide for truncating all items and keys from a specific set but getting exception http://www.aerospike.com/launchpad/deleting_sets_and_data.html

My Aerospike version is Community Edition - 3.6.13


#4

You need server 3.12 or higher to use truncate


#5

Worked great with version 3.12.1, thanks a lot!