Is there way to get the records are in a set?


#1

by peter » Wed Jul 16, 2014 4:52 pm

Yes there is, by using an “info” call. Try this from the linux command prompt\

CODE: SELECT ALL
asinfo -v “sets<your namespace>”

This will return a string with data about each set. The “objects” value is the number of objects in a set. You can call this from the client API, parse the string that is returned and get the number of objects


#2

by Hanson » Tue Jul 29, 2014 7:26 pm

Shall be:

CODE: SELECT ALL
asinfo -v “sets/<your namespace>”
or:
asinfo -v “sets/<your namespace>/<your set name>”

Examples:
[root@localhost data]# asinfo -v "sets/test"
requested value  sets/test
value is  ns_name=test:set_name=testset:n_objects=29110779:set-stop-write-count=0:set-evict-hwm-count=0:set-enable-xdr=use-default:set-delete=false;ns_name=test:set_name=mytable:n_objects=1:set-stop-write-count=0:set-evict-hwm-count=0:set-enable-xdr=use-default:set-delete=false;
[root@localhost data]# asinfo -v "sets/test/testset"
requested value  sets/test/testset
value is  n_objects=29110779:set-stop-write-count=0:set-evict-hwm-count=0:set-enable-xdr=use-default:set-delete=false;