From 12adbb9beaafa8403bca61279921e523c5e22a0c Mon Sep 17 00:00:00 2001 From: sageweil Date: Fri, 23 Mar 2007 20:27:34 +0000 Subject: [PATCH] * hadoop: minor cleanup git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1297 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/client/hadoop/CephFSInterface.cc | 47 ++++++++------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/trunk/ceph/client/hadoop/CephFSInterface.cc b/trunk/ceph/client/hadoop/CephFSInterface.cc index 4834893881221..3202c662153dc 100644 --- a/trunk/ceph/client/hadoop/CephFSInterface.cc +++ b/trunk/ceph/client/hadoop/CephFSInterface.cc @@ -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 args; env_to_vec(args); parse_config_options(args); - g_clock.tare(); - // crap for getting args from the command line - //vector 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 -- 2.39.5