]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
* hadoop: minor cleanup
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 23 Mar 2007 20:27:34 +0000 (20:27 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 23 Mar 2007 20:27:34 +0000 (20:27 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1297 29311d96-e01e-0410-9327-a35deaab8ce9

trunk/ceph/client/hadoop/CephFSInterface.cc

index 4834893881221241b28bb444419fe57b30bc0bd8..3202c662153dcd007a3bf33bbbf6c92d4d25990e 100644 (file)
@@ -13,22 +13,15 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_fs_ceph_CephFileSystem_ceph_1init
 {
 
   cout << "Initializing Ceph client:" << endl;
-  //cout.flush();
+
   // parse args from CEPH_ARGS 
   vector<char*> args; 
   env_to_vec(args);
   parse_config_options(args);
-  g_clock.tare();
 
-  // crap for getting args from the command line
-  //vector<char*> args;
-  //argv_to_vec(argc, argv, args);
-  //parse_config_options(args);
+  if (g_conf.clock_tare) g_clock.tare();
 
-  // args for fuse
-  // vec_to_argv(args, argc, argv);
-
-  // FUSE will chdir("/"); be ready.
+  // be safe
   g_conf.use_abspaths = true;
 
   // load monmap
@@ -38,7 +31,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_fs_ceph_CephFileSystem_ceph_1init
     cout << "could not find .ceph_monmap" << endl; 
     return 0;
   }
-  //assert(r >= 0);
+  assert(r >= 0);
 
   // start up network
   rank.start_rank();
@@ -48,30 +41,24 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_fs_ceph_CephFileSystem_ceph_1init
   client = new Client(rank.register_entity(MSG_ADDR_CLIENT_NEW), &monmap);
   client->init();
     
-  // start up fuse
-  // use my argc, argv (make sure you pass a mount point!)
-  cout << "mounting client to filesystem..." << endl;
+  // mount
   client->mount();
-  
-  //cerr << "starting fuse on pid " << getpid() << endl;
-  //ceph_fuse_main(client, argc, argv);
-  //cerr << "fuse finished on pid " << getpid() << endl;
-  
-  //client->unmount();
-  //cout << "unmounted" << endl;
-  //client->shutdown();
-  
-  //delete client;
-  
-  // wait for messenger to finish
-  //rank.wait();
-  
+   
   jlong clientp = *(jlong*)&client;
   return clientp;
-  //return (jlong)client;
-
 }
 
+/* on shutdown,
+
+client->unmount();
+client->shutdown();
+delete client;
+  
+// wait for messenger to finish
+rank.wait();
+
+*/
+
 
 /*
  * Class:     org_apache_hadoop_fs_ceph_CephFileSystem