Can anyone please suggest how I can retrieve data stored in Raw format in Aerospike using Aerospike client, I'm able to fetch all other sort of data from aerospike, but not the data stored in raw format.
Equivalent functions in C language are present, but not able to found its equivalence in Java.
C-Language function name for setting data in Aerospike as_record_set_raw
C-Language function name for getting data in Aerospike as_record_get_bytes
While fetching data from Java, using Aerospike client, I'm getting {msg=[B@6d3163a6, length=10}, while the message is stored in raw format.
Expected Output :- {msg=66 65 78 44, length=10}
Already checked the encoding part of workspace
PS :- getBytes() not working, getting following exception :- java.lang.ClassCastException: class [B cannot be cast to class java.lang.Long ([B and java.lang.Long are in module java.base of loader 'bootstrap')
code
userKey = new Key("test", "testset", key);
userRecord = client.get(null, userKey);
if (userRecord != null) {
System.out.println("\nINFO: User record read successfully! Here are the details:\n");
System.out.println("msg: " + userRecord.getValue("msg")+ "\n");
}