Example usage for org.apache.hadoop.mapreduce Job getJar

List of usage examples for org.apache.hadoop.mapreduce Job getJar

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce Job getJar.

Prototype

public String getJar() 

Source Link

Document

Get the pathname of the job's jar.

Usage

From source file:org.springframework.data.hadoop.mapreduce.JobTests.java

License:Apache License

@Test
public void testJarJob() throws Exception {
    Job job = ctx.getBean("jar-job", Job.class);
    assertTrue(ctx.isPrototype("jar-job"));
    assertNotNull(job.getJar());
    assertEquals("true", job.getConfiguration().get("mapred.used.genericoptionsparser"));
}

From source file:org.springframework.data.hadoop.mapreduce.JobTests.java

License:Apache License

@Test
public void testCustomJarJob() throws Exception {
    Job job = ctx.getBean("custom-jar-job", Job.class);
    assertTrue(ctx.isPrototype("custom-jar-job"));
    assertNotNull(job.getJar());
    assertEquals("true", job.getConfiguration().get("mapred.used.genericoptionsparser"));

    ClassLoader loader = job.getConfiguration().getClassLoader();
    assertFalse(Thread.currentThread().getContextClassLoader().equals(loader));
}