// Path: src/test/java/com/github/mlk/junit/rules/helpers/hadoop/BasicTestJob.java
// public class BasicTestJob extends Configured implements Tool {
// 
//   @Override
//   public int run(String... args) throws Exception {
//     Job job = Job.getInstance(getConf(), "BasicTestJob");
//     TextInputFormat.addInputPath(job, new Path(args[0]));
//     job.setInputFormatClass(TextInputFormat.class);
// 
//     job.setMapperClass(WordCounterMapper.class);
//     job.setCombinerClass(WordCounterReducer.class);
//     job.setReducerClass(WordCounterReducer.class);
// 
//     TextOutputFormat.setOutputPath(job, new Path(args[1]));
//     job.setOutputFormatClass(TextOutputFormat.class);
//     job.setOutputKeyClass(Text.class);
//     job.setOutputValueClass(IntWritable.class);
// 
//     return job.waitForCompletion(true) ? 0 : 1;
//   }
// }


import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import com.github.mlk.junit.rules.helpers.hadoop.BasicTestJob;
import java.util.HashMap;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
package com.github.mlk.junit.rules;



public class TestHadoopYarnRule {

  @Rule
  public HadoopYarnRule subject = new HadoopYarnRule("test-hadoop");

  /**
   * "Hello World" YARN job that counts the number of each word in a text file.
   */
  @Test
  public void helloWorld() throws Exception {
    subject.copyResource("/hello.txt", "/testfile.txt");

// Path: src/test/java/com/github/mlk/junit/rules/helpers/hadoop/BasicTestJob.java
// public class BasicTestJob extends Configured implements Tool {
// 
//   @Override
//   public int run(String... args) throws Exception {
//     Job job = Job.getInstance(getConf(), "BasicTestJob");
//     TextInputFormat.addInputPath(job, new Path(args[0]));
//     job.setInputFormatClass(TextInputFormat.class);
// 
//     job.setMapperClass(WordCounterMapper.class);
//     job.setCombinerClass(WordCounterReducer.class);
//     job.setReducerClass(WordCounterReducer.class);
// 
//     TextOutputFormat.setOutputPath(job, new Path(args[1]));
//     job.setOutputFormatClass(TextOutputFormat.class);
//     job.setOutputKeyClass(Text.class);
//     job.setOutputValueClass(IntWritable.class);
// 
//     return job.waitForCompletion(true) ? 0 : 1;
//   }
// }


// Path: src/test/java/com/github/mlk/junit/rules/TestHadoopYarnRule.java
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import com.github.mlk.junit.rules.helpers.hadoop.BasicTestJob;
import java.util.HashMap;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;

package com.github.mlk.junit.rules;



public class TestHadoopYarnRule {

  @Rule
  public HadoopYarnRule subject = new HadoopYarnRule("test-hadoop");

  /**
   * "Hello World" YARN job that counts the number of each word in a text file.
   */
  @Test
  public void helloWorld() throws Exception {
    subject.copyResource("/hello.txt", "/testfile.txt");

    BasicTestJob job = new BasicTestJob();