]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
uClient: Change file data function names for clarity;
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 4 Aug 2009 23:56:23 +0000 (16:56 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 5 Aug 2009 22:48:23 +0000 (15:48 -0700)
add function stubs for Hadoop use.

src/client/Client.cc
src/client/Client.h
src/client/hadoop/CephFSInterface.cc
src/client/libceph.cc
src/client/libceph.h

index a4f5da06caeb9948917a9e76a25c73c643c6e0c2..ae6c86fbc49c2a70b52a7776e71920814e230657 100644 (file)
@@ -5192,27 +5192,37 @@ int Client::describe_layout(int fd, ceph_file_layout *lp)
   return 0;
 }
 
-int Client::get_stripe_unit(int fd)
+int Client::get_file_stripe_unit(int fd)
 {
   ceph_file_layout layout;
   describe_layout(fd, &layout);
   return ceph_file_layout_su(layout);
 }
 
-int Client::get_stripe_width(int fd)
+int Client::get_file_stripe_width(int fd)
 {
   ceph_file_layout layout;
   describe_layout(fd, &layout);
   return ceph_file_layout_stripe_width(layout);
 }
 
-int Client::get_stripe_period(int fd)
+int Client::get_file_stripe_period(int fd)
 {
   ceph_file_layout layout;
   describe_layout(fd, &layout);
   return ceph_file_layout_period(layout);
 }
 
+int Client::get_file_replication(int fd)
+{
+  return 0;
+}
+
+int Client::get_file_stripe_address(int fd, loff_t offset, string& address)
+{
+  return 0;
+}
+
 int Client::enumerate_layout(int fd, vector<ObjectExtent>& result,
                             loff_t length, loff_t offset)
 {
index 5758c02bd653e52bc0cecc6c2a13ab396b5dd01f..e1dd1a414a62ac09f01a39356138ce5848b482e3 100644 (file)
@@ -1118,9 +1118,12 @@ public:
 
   // expose file layout
   int describe_layout(int fd, ceph_file_layout* layout);
-  int get_stripe_unit(int fd);
-  int get_stripe_width(int fd);
-  int get_stripe_period(int fd);
+  int get_file_stripe_unit(int fd);
+  int get_file_stripe_width(int fd);
+  int get_file_stripe_period(int fd);
+  int get_file_replication(int fd);
+  int get_file_stripe_address(int fd, loff_t offset, string& address);
+
   int enumerate_layout(int fd, vector<ObjectExtent>& result,
                       loff_t length, loff_t offset);
 
index 273d87fe4a5efd735c70dde990ec44cc37ddf4cd..ea1e6eeef26baaf1844821b4203e331d934d8071 100644 (file)
@@ -332,7 +332,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_fs_ceph_CephFileSystem_ceph_1getb
     return -1;
   }
 
-  result = ceph_get_stripe_unit(fh);
+  result = ceph_get_file_stripe_unit(fh);
 
   int close_result = ceph_close(fh);
   assert (close_result > -1);
index 5aa8d5190faa82c48502e2c45ff1011f7754a5c0..a7dd4d63ccdcca591a1861404024118a8a3a3986 100644 (file)
@@ -256,9 +256,9 @@ extern "C" int ceph_sync_fs()
   return client->sync_fs();
 }
 
-extern "C" int ceph_get_stripe_unit(int fh)
+extern "C" int ceph_get_file_stripe_unit(int fh)
 {
-  return client->get_stripe_unit(fh);
+  return client->get_file_stripe_unit(fh);
 }
 
 int ceph_getdir(const char *relpath, std::list<std::string>& names)
index c23a5e73a5cb988496e6bc2f5955567b80897326..5ebb40a4ddc1cc0b68b1198597178b9d39f28e1d 100644 (file)
@@ -68,7 +68,7 @@ int ceph_fsync(int fd, bool syncdataonly);
 int ceph_fstat(int fd, struct stat *stbuf);
 
 int ceph_sync_fs();
-int ceph_get_stripe_unit(int fh);
+int ceph_get_file_stripe_unit(int fh);
 #ifdef __cplusplus
 //not for C, sorry!
 int ceph_getdir(const char *relpath, std::list<std::string>& names);