Locate Aerospike node id from a record

Hm, again this isn’t something that the client exposes by default so you will need to extend the WriteCommand and expose the protected partition so that you can access partition.replicas.

public class MyCommand extends WriteCommand {
    public AtomicReferenceArray<Node>[] getReplicas() {
        return this.partition.replicas;
    }
}

Could you share what it is you need this information for? I assume this is for testing?

1 Like