]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
hadoop: get hadoop bindings to build again
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 22 Apr 2011 22:10:57 +0000 (15:10 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 25 Apr 2011 18:05:44 +0000 (11:05 -0700)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/client/hadoop/CephFSInterface.cc
src/client/hadoop/ceph/CephTalker.java
src/client/hadoop/org_apache_hadoop_fs_ceph_CephTalker.h

index ac30b8ea520e12361727fd285c5f8ba41c029e59..907785987cb80e08d05b0dfb870cb3bf20abd225 100644 (file)
@@ -101,8 +101,9 @@ JNIEXPORT jboolean JNICALL Java_org_apache_hadoop_fs_ceph_CephTalker_ceph_1initi
   ret = ceph_mount(cmount, mount_root.c_str());
   if (ret)
     return false;
-  if (set_local_writes)
-    ceph_set_default_preferred_pg(cmount, ceph_get_local_osd(cmount));
+  if (set_local_writes) {
+    // ???
+  }
 
   set_ceph_mount_t(env, obj, cmount);
   return true;
@@ -726,15 +727,10 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_fs_ceph_CephTalker_ceph_1statfs
  * Returns: an int containing the number of times replicated.
  */
 JNIEXPORT jint JNICALL Java_org_apache_hadoop_fs_ceph_CephTalker_ceph_1replication
-(JNIEnv *env, jobject obj, jstring j_path)
+(JNIEnv *env, jobject obj, jint fh)
 {
-  //get c-string of path, send off to libceph, release c-string, return
-  const char *c_path = env->GetStringUTFChars(j_path, 0);
-  if (c_path == NULL)
-    return -ENOMEM;
   ceph_mount_t *cmount = get_ceph_mount_t(env, obj);
-  int replication = ceph_get_file_replication(cmount, c_path);
-  env->ReleaseStringUTFChars(j_path, c_path);
+  int replication = ceph_get_file_replication(cmount, (int)fh);
   return replication;
 }
 
index 9df4e94eac6d231d3c07773e811ab6c32c0d8468..4bda160d19f8ffb06c85e77723083ccc721887d8 100644 (file)
@@ -78,7 +78,7 @@ class CephTalker extends CephFS {
 
   protected native int ceph_statfs(String Path, CephFileSystem.CephStat fill);
 
-  protected native int ceph_replication(String path);
+  protected native int ceph_replication(int fh);
 
   protected native String ceph_hosts(int fh, long offset);
 
index 55854549b8c2d7576b42d01125cdb862d59fbf2d..e1051a7e44c05a36e6843d6aae6cedbb4176ffdb 100644 (file)
@@ -170,10 +170,10 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_fs_ceph_CephTalker_ceph_1statfs
 /*
  * Class:     org_apache_hadoop_fs_ceph_CephTalker
  * Method:    ceph_replication
- * Signature: (Ljava/lang/String;)I
+ * Signature: (I)I
  */
 JNIEXPORT jint JNICALL Java_org_apache_hadoop_fs_ceph_CephTalker_ceph_1replication
-  (JNIEnv *, jobject, jstring);
+  (JNIEnv *, jobject, jint);
 
 /*
  * Class:     org_apache_hadoop_fs_ceph_CephTalker