@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		// Set PigUnit in MR mode
		System.getProperties().setProperty("pigunit.exectype.cluster", "true");
		// make sure the log dir exists
		File logPath = new File(LOG_DIR);
		if (!logPath.exists()){
			logPath.mkdirs();
		}
		// configure and start the cluster
		System.setProperty("hadoop.log.dir", LOG_DIR);
		System.setProperty("javax.xml.parsers.SAXParserFactory",
				"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
		System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
				"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
		Properties props = new Properties();
		props.setProperty("dfs.datanode.data.dir.perm", "775");
		conf = new JobConf();
		String hadoopConfDir = "test" + File.separator + "resources" + File.separator + "hadoop" + File.separator + "conf";
		String coreSitePath = hadoopConfDir + File.separator + "core-site.xml";
		conf.addResource(new Path(coreSitePath));
		String hdfsSitePath = hadoopConfDir + File.separator + "hdfs-site.xml";
		conf.addResource(new Path(hdfsSitePath));
		String mrSitePath = hadoopConfDir + File.separator + "mapred-site.xml";
		conf.addResource(new Path(mrSitePath));
		startCluster(true, conf, props);
	}