]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
hadoop: get the right class member, and ask for it properly.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Sun, 9 Oct 2011 23:28:00 +0000 (16:28 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Sun, 9 Oct 2011 23:28:00 +0000 (16:28 -0700)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/hadoop/CephFSInterface.cc

index f9c349d22b2ba3cc03775e0fb6ccd9c50e6d8603..b8a6a3bd1e6b48f86adcbd7900a690035740be31 100644 (file)
@@ -16,11 +16,13 @@ union ceph_mount_union_t {
 static void set_ceph_mount_info(JNIEnv *env, jobject obj, struct ceph_mount_info *cmount)
 {
   jclass cls = env->GetObjectClass(obj);
-  jfieldID fid = env->GetFieldID(cls, "cmount", "Ljava/lang/Long;");
+  if (cls == NULL)
+    return;
+  jfieldID fid = env->GetFieldID(cls, "cluster", "J");
   if (fid == NULL)
     return;
   ceph_mount_union_t ceph_mount_union;
-  ceph_mount_union.cjlong= 0;
+  ceph_mount_union.cjlong = 0;
   ceph_mount_union.cmount = cmount;
   env->SetLongField(obj, fid, ceph_mount_union.cjlong);
 }
@@ -28,7 +30,7 @@ static void set_ceph_mount_info(JNIEnv *env, jobject obj, struct ceph_mount_info
 static struct ceph_mount_info *get_ceph_mount_t(JNIEnv *env, jobject obj)
 {
   jclass cls = env->GetObjectClass(obj);
-  jfieldID fid = env->GetFieldID(cls, "cmount", "Ljava/lang/Long;");
+  jfieldID fid = env->GetFieldID(cls, "cluster", "J");
   if (fid == NULL)
     return NULL;
   ceph_mount_union_t ceph_mount_union;