package nl.vu.datalayer.hbase.bulkload;

import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

public class TripleToResourceLocal extends Configured implements Tool {

	@Override
	public int run(String[] arg0) throws Exception {

		Path resourceIds = new Path("./" + TripleToResource.RESOURCE_IDS_DIR);
		Job j1 = BulkLoad.createTripleToResourceJob(new Path("input"), resourceIds, 100);
		j1.getConfiguration().set("outputPath", "./");
		j1.waitForCompletion(true);

		/*
		 * JobConf j1 = BulkLoad.createTripleToResourceJob(new Path("input"),
		 * resourceIds, 2); j1.set("outputPath", "./"); RunningJob runningJ1 =
		 * JobClient.runJob(j1);
		 */
		BulkLoad.retrieveTripleToResourceCounters(j1);

		Path convertedTripletsPath = new Path("./" + ResourceToTriple.TEMP_TRIPLETS_DIR);
		Job j2 = BulkLoad.createResourceToTripleJob(resourceIds, convertedTripletsPath);
		j2.waitForCompletion(true);

		/*
		 * Path convertedTripletsPath = new Path("tempTriplets"); Job j2 =
		 * BulkLoad.createResourceToTripleJob(resourceIds,
		 * convertedTripletsPath); j2.waitForCompletion(true);
		 */

		// Path id2String = new Path("id2String");
		// JobConf j2 = BulkLoadNew.createResourceToTripleJob(resourceIds,
		// id2String);
		// JobClient.runJob(j2);

		return 0;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int ret;
		try {
			ret = ToolRunner.run(new TripleToResourceLocal(), args);
			System.exit(ret);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}

@@ -229,16 +229,28 @@
 unner;%0A%0A
+@Deprecated%0A
 public c
@@ -374,24 +374,26 @@
 eption %7B%0A%0A%09%09
+/*
 Path resourc
@@ -795,18 +795,16 @@
 j1);%0A%09%09 
-*/
 %0A%09%09BulkL

mark deprecated