aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Key not Serializable problem when mocking IAerospikeClient.java #90

Closed fpopic closed 6 years ago

fpopic commented 6 years ago

Hi,

Is there a possibility to mock somehow IAerospikeClient interface in Scala/Java using any mocking library like mock<IAerospikeClient> avoiding

Caused by: java.io.NotSerializableException: com.aerospike.client.Key not Serializable

when sending the client over the network (for example, sending the client to Google Dataflow workers)

Would pull request with:

public interface IAerospikeClient extends Closeable, Serializable

solve the problem (of course all object that client uses need to be also Serializable)?

BrianNichols commented 6 years ago

I recommend trying to fix the java client to handle your use-case. If it works, issue a pull request.