]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Hadoop:Stubs for new append method
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 21 Jul 2009 21:54:44 +0000 (14:54 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 22 Jul 2009 18:37:01 +0000 (11:37 -0700)
src/client/hadoop/ceph/CephFileSystem.java

index a488a4d6d2113fcd025a8126031f913a74b73d87..95690164765f439270d396f0cc44f1a67d02e231 100644 (file)
@@ -67,6 +67,7 @@ public class CephFileSystem extends FileSystem {
   private boolean ceph_isfile(String path) { return ceph_isfile(clientPointer, path); }
   private String[] ceph_getdir(String path) { return ceph_getdir(clientPointer, path); }
   private int ceph_mkdirs(String path, int mode) { return ceph_mkdirs(clientPointer, path, mode); }
+  private int ceph_open_for_append(String path) { return ceph_open_for_append(clientPointer, path); }
   private int ceph_open_for_read(String path) { return ceph_open_for_read(clientPointer, path); }
   private int ceph_open_for_overwrite(String path, int mode) { return ceph_open_for_overwrite(clientPointer, path, mode); }
 
@@ -91,6 +92,7 @@ public class CephFileSystem extends FileSystem {
   private native boolean ceph_isfile            (long client, String path);
   private native String[]ceph_getdir            (long client, String path);
   private native int     ceph_mkdirs            (long client, String path, int mode);
+  private native int     ceph_open_for_append   (long client, String path, int mode);
   private native int     ceph_open_for_read     (long client, String path);
   private native int     ceph_open_for_overwrite(long client, String path, int mode);
   private native boolean ceph_kill_client       (long client);
@@ -140,6 +142,12 @@ public class CephFileSystem extends FileSystem {
                       + ". Not really doing anything.");
   }
 
+  public FsDataOutputStream append (Path file, int bufferSize,
+                                   Progressable progress) throws IOException {
+    ceph_open_for_append(....);
+    return new CephDataOutstream(...);
+  }
+
   @Override
     public String getName() {
     return getUri().toString();