Need some help with the RBD Java bindings

2013-08-15 Thread Wido den Hollander
Hi, I'm having some issues with the Java bindings for librbd and I'm not sure what the problem is here. The problem is with listing snapshot of a RBD image. I test it in this test case: public void testCreateAndClone() { try { .. .. image.snapCreate(snapName);

Re: Need some help with the RBD Java bindings

2013-08-15 Thread Noah Watkins
On Thu, Aug 15, 2013 at 8:51 AM, Wido den Hollander wrote: > > public List snapList() throws RbdException { > IntByReference numSnaps = new IntByReference(16); > PointerByReference snaps = new PointerByReference(); > List list = new ArrayList(); > RbdSnapInfo snapInfo, snapInfos[];

Re: Need some help with the RBD Java bindings

2013-08-20 Thread Noah Watkins
Wido, I pushed up a patch to https://github.com/ceph/rados-java/commit/ca16d82bc5b596620609880e429ec9f4eaa4d5ce That includes a fix for this problem. The fix is a bit hacky, but the tests pass now. I included more details about the hack in the code. On Thu, Aug 15, 2013 at 9:57 AM, Noah Wat

Re: Need some help with the RBD Java bindings

2013-08-21 Thread Wido den Hollander
On 08/20/2013 11:26 PM, Noah Watkins wrote: Wido, I pushed up a patch to https://github.com/ceph/rados-java/commit/ca16d82bc5b596620609880e429ec9f4eaa4d5ce That includes a fix for this problem. The fix is a bit hacky, but the tests pass now. I included more details about the hack in the c

Re: Need some help with the RBD Java bindings

2013-08-21 Thread Noah Watkins
Wido, How would you feel about creating two RbdSnapInfo objects. The first would be something like ceph.rbd.RbdSnapInfo and the second would be ceph.rbd.jna.RbdSnapInfo. The former is what will be exposed through the API, and the later is used only internally. That should address the hacky-ness of

Re: Need some help with the RBD Java bindings

2013-08-21 Thread Wido den Hollander
On 08/21/2013 09:47 PM, Noah Watkins wrote: Wido, How would you feel about creating two RbdSnapInfo objects. The first would be something like ceph.rbd.RbdSnapInfo and the second would be ceph.rbd.jna.RbdSnapInfo. The former is what will be exposed through the API, and the later is used only int

Re: Need some help with the RBD Java bindings

2013-08-22 Thread Noah Watkins
On Wed, Aug 21, 2013 at 11:20 PM, Wido den Hollander wrote: > > Yes, seems like a good thing to do. I wasn't sure myself when I was writing > the bindings on how the packaging should be. I'm not entirely sure either. With JNI it's pretty simple, but JNA introduces all sorts of additional classes.