@Test
public void testSubmit() throws Exception {

	Configuration jobConfig = new Configuration(false);
	Configuration hadoopConfig = mrCmds.getHadoopConfiguration();
	
	FsShell shell = new FsShell(hadoopConfig);
	List<String> argv = new ArrayList<String>();
	argv.add("-rmr");
	argv.add("/tmp/wc-input");
	shell.run(argv.toArray(new String[0]));
	
	argv = new ArrayList<String>();
	argv.add("-put");
	File f = new File("src/test/resources/wordcount-conf.xml");		
	argv.add(f.getAbsolutePath());
	argv.add("/tmp/wc-input/");
	shell.run(argv.toArray(new String[0]));
	
	argv = new ArrayList<String>();
	argv.add("-rmr");
	argv.add("/tmp/wc-output");
	shell.run(argv.toArray(new String[0]));
	
	String hadoopFsName = hadoopConfig.get("fs.default.name");
	String hadoopJT = hadoopConfig.get("mapred.job.tracker");
	File jarFile = new File(hadoopExampleJarFile);
	
	jobConfig.set("fs.default.name", hadoopFsName);
	jobConfig.set("mapred.job.tracker", hadoopJT);
	jobConfig.set("mapred.jar", jarFile.getAbsolutePath());
	jobConfig.set("mapred.input.dir", "/tmp/wc-input");
	jobConfig.set("mapred.output.dir", "/tmp/wc-output");
	jobConfig.set("mapreduce.map.class", "org.apache.hadoop.examples.WordCount.TokenizerMapper");
	jobConfig.set("mapreduce.reduce.class", "org.apache.hadoop.examples.WordCount.IntSumReducer");
	
	String tmpFile = "/tmp/impala-test-wordcount-conf.xml";
	try {
		jobConfig.writeXml(new FileOutputStream(new File(tmpFile)));
	} catch (Exception e) {
		Assert.fail("fail to write temp MR configuration file");
	}
	
	mrCmds.submit(tmpFile);
}