[Pvfs2-cvs] commit by slang in pvfs2/test/io/job: job-client-example.c job-server-example.c trove-job-create-toy.c trove-job-io.c trove-job-ls.c trove-job-mkfs.c trove-job-touch.c

CVS commit program cvs at parl.clemson.edu
Wed Oct 18 12:01:15 EDT 2006


Update of /projects/cvsroot/pvfs2/test/io/job
In directory parlweb1:/tmp/cvs-serv4951/test/io/job

Modified Files:
	job-client-example.c job-server-example.c 
	trove-job-create-toy.c trove-job-io.c trove-job-ls.c 
	trove-job-mkfs.c trove-job-touch.c 
Log Message:

commit of trove method capabilities.  We should now be able to support multiple trove methods.  The TroveMethod option to the config file can set the method to something other than the default (dbpf).



Index: job-client-example.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/job-client-example.c,v
diff -p -u -r1.10 -r1.11
--- job-client-example.c	25 Aug 2004 13:09:08 -0000	1.10
+++ job-client-example.c	18 Oct 2006 16:01:14 -0000	1.11
@@ -37,7 +37,6 @@ int main(int argc, char **argv)	
 	job_status_s status1;
 	job_id_t tmp_id;
 	job_context_id context;
-	char* method_name = NULL;
 
 	/* set debugging level */
 	gossip_enable_stderr();
@@ -51,8 +50,8 @@ int main(int argc, char **argv)	
 		return(-1);
 	}
 
-	ret = trove_initialize("/tmp/pvfs2-test-space",
-	    0, &method_name, 0);
+	ret = trove_initialize(
+	    TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", 0);
 	if(ret < 0)
 	{
 		fprintf(stderr, "trove_initialize failure.\n");
@@ -164,7 +163,7 @@ int main(int argc, char **argv)	
 	job_close_context(context);
 	job_finalize();
 	BMI_finalize();
-	trove_finalize();
+	trove_finalize(TROVE_METHOD_DBPF);
 
 	return(0);
 }

Index: job-server-example.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/job-server-example.c,v
diff -p -u -r1.16 -r1.17
--- job-server-example.c	22 Aug 2006 15:41:17 -0000	1.16
+++ job-server-example.c	18 Oct 2006 16:01:14 -0000	1.17
@@ -39,7 +39,6 @@ int main(int argc, char **argv)	
 	struct BMI_unexpected_info req_info;
 	job_id_t job_id;
 	int outcount;
-	char* method_name = NULL;
 	job_id_t tmp_id;
 	job_context_id context;
 
@@ -56,8 +55,8 @@ int main(int argc, char **argv)	
 		return(-1);
 	}
 
-	ret = trove_initialize("/tmp/pvfs2-test-space",
-	    0, &method_name, 0);
+	ret = trove_initialize(
+	    TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", 0);
 	if(ret < 0)
 	{
 		fprintf(stderr, "trove_initialize failure.\n");
@@ -181,7 +180,7 @@ int main(int argc, char **argv)	
 	job_finalize();
 	PINT_flow_finalize();
 	BMI_finalize();
-	trove_finalize();
+	trove_finalize(TROVE_METHOD_DBPF);
 
 	return(0);
 }

Index: trove-job-create-toy.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-create-toy.c,v
diff -p -u -r1.10 -r1.11
--- trove-job-create-toy.c	28 Jul 2004 14:33:06 -0000	1.10
+++ trove-job-create-toy.c	18 Oct 2006 16:01:14 -0000	1.11
@@ -26,7 +26,6 @@ int main(int argc, char **argv)
 {
     int ret, i;
     TROVE_coll_id coll_id;
-    char *method_name;
     job_id_t foo_id;
     job_status_s job_stat;
     job_context_id context;
@@ -39,7 +38,8 @@ int main(int argc, char **argv)
 	return -1;
     }
 
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+        TROVE_METHOD_DBPF, NULL, storage_space, 0);
     if (ret < 0) {
 	fprintf(stderr, "initialize failed.\n");
 	return -1;

Index: trove-job-io.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-io.c,v
diff -p -u -r1.12 -r1.13
--- trove-job-io.c	14 Jun 2006 18:41:28 -0000	1.12
+++ trove-job-io.c	18 Oct 2006 16:01:14 -0000	1.13
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
     TROVE_coll_id coll_id;
     TROVE_handle file_handle, parent_handle;
     TROVE_keyval_s key, val;
-    char *method_name, *file_name;
+    char *file_name;
     char path_name[PATH_SIZE];
     job_id_t foo_id;
     job_status_s job_stat;
@@ -48,7 +48,8 @@ int main(int argc, char **argv)
 	return -1;
     }
 
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+        TROVE_METHOD_DBPF, NULL, storage_space, 0);
     if (ret < 0) {
 	fprintf(stderr, "initialize failed.\n");
 	return -1;
@@ -344,7 +345,7 @@ int main(int argc, char **argv)
 
 	job_close_context(context);
 	job_finalize();
-    trove_finalize();
+        trove_finalize(TROVE_METHOD_DBPF);
 
     return 0;
 }

Index: trove-job-ls.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-ls.c,v
diff -p -u -r1.11 -r1.12
--- trove-job-ls.c	11 Nov 2005 21:31:17 -0000	1.11
+++ trove-job-ls.c	18 Oct 2006 16:01:15 -0000	1.12
@@ -31,7 +31,6 @@ int main(int argc, char **argv)
     TROVE_handle handle;
     TROVE_keyval_s key[KEYVAL_ARRAY_LEN], val[KEYVAL_ARRAY_LEN];
     TROVE_ds_position pos = TROVE_ITERATE_START;
-    char *method_name;
     char path_name[PATH_SIZE];
 	 job_status_s job_stat;
 	 job_id_t foo_id;
@@ -47,7 +46,8 @@ int main(int argc, char **argv)
 	return -1;
     }
 
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+        TROVE_METHOD_DBPF, NULL, storage_space, 0);
     if (ret < 0) {
 	fprintf(stderr, "initialize failed.\n");
 	return -1;
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
 
 	job_close_context(context);
 	job_finalize();
-    trove_finalize();
+        trove_finalize(TROVE_METHOD_DBPF);
 
     return 0;
 }

Index: trove-job-mkfs.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-mkfs.c,v
diff -p -u -r1.13 -r1.14
--- trove-job-mkfs.c	22 Sep 2006 19:27:33 -0000	1.13
+++ trove-job-mkfs.c	18 Oct 2006 16:01:15 -0000	1.14
@@ -27,7 +27,6 @@ int main(int argc, char **argv)
     TROVE_coll_id coll_id;
     TROVE_handle root_handle;
     TROVE_keyval_s key, val;
-    char *method_name;
     job_status_s job_stat;
     job_id_t foo_id;
     job_context_id context;
@@ -71,20 +70,23 @@ int main(int argc, char **argv)
 
 
     /* try to initialize; fails if storage space isn't there? */
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+        TROVE_METHOD_DBPF, NULL, storage_space, 0);
     if (ret < 0) {
 	fprintf(stderr, "warning: initialize failed.  trying to create storage space.\n");
 
 	/* create the storage space */
 	/* Q: what good is the op_id here if we have to match on coll_id in test fn? */
-	ret = trove_storage_create(storage_space, NULL, &op_id);
+	ret = trove_storage_create(
+            TROVE_METHOD_DBPF, storage_space, NULL, &op_id);
 	if (ret < 0) {
 	    fprintf(stderr, "storage create failed.\n");
 	    return -1;
 	}
 
 	/* second try at initialize, in case it failed first try. */
-	ret = trove_initialize(storage_space, 0, &method_name, 0);
+	ret = trove_initialize(
+            TROVE_METHOD_DBPF, NULL, storage_space, 0);
 	if (ret < 0) {
 	    fprintf(stderr, "initialized failed second time.\n");
 	    return -1;
@@ -232,7 +234,7 @@ int main(int argc, char **argv)
 
 	job_close_context(context);
 	 job_finalize();
-	 trove_finalize();
+	 trove_finalize(TROVE_METHOD_DBPF);
     
     return 0;
 }

Index: trove-job-touch.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-touch.c,v
diff -p -u -r1.11 -r1.12
--- trove-job-touch.c	28 Jul 2004 14:33:06 -0000	1.11
+++ trove-job-touch.c	18 Oct 2006 16:01:15 -0000	1.12
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
     TROVE_coll_id coll_id;
     TROVE_handle file_handle, parent_handle;
     TROVE_keyval_s key, val;
-    char *method_name, *file_name;
+    char *file_name;
     char path_name[PATH_SIZE];
     job_id_t foo_id;
     job_status_s job_stat;
@@ -42,7 +42,8 @@ int main(int argc, char **argv)
 	return -1;
     }
 
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+        TROVE_METHOD_DBPF, NULL, storage_space, 0);
     if (ret < 0) {
 	fprintf(stderr, "initialize failed.\n");
 	return -1;
@@ -190,7 +191,7 @@ int main(int argc, char **argv)
 
 	job_close_context(context);
 	job_finalize();
-    trove_finalize();
+        trove_finalize(TROVE_METHOD_DBPF);
 
     return 0;
 }



More information about the Pvfs2-cvs mailing list