Search in sources :

Example 6 with ScenarioConfiguration

use of org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration in project hadoop by apache.

the class LargeKVCombinerTest method cleanUp.

@AfterClass
public static void cleanUp() throws IOException {
    final FileSystem fs = FileSystem.get(new ScenarioConfiguration());
    fs.delete(new Path(TestConstants.NATIVETASK_COMBINER_TEST_DIR), true);
    fs.close();
}
Also used : Path(org.apache.hadoop.fs.Path) ScenarioConfiguration(org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 7 with ScenarioConfiguration

use of org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration in project hadoop by apache.

the class OldAPICombinerTest method cleanUp.

@AfterClass
public static void cleanUp() throws IOException {
    final FileSystem fs = FileSystem.get(new ScenarioConfiguration());
    fs.delete(new Path(TestConstants.NATIVETASK_COMBINER_TEST_DIR), true);
    fs.close();
}
Also used : Path(org.apache.hadoop.fs.Path) ScenarioConfiguration(org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 8 with ScenarioConfiguration

use of org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration in project hadoop by apache.

the class OldAPICombinerTest method startUp.

@Before
public void startUp() throws Exception {
    Assume.assumeTrue(NativeCodeLoader.isNativeCodeLoaded());
    Assume.assumeTrue(NativeRuntime.isNativeLibraryLoaded());
    final ScenarioConfiguration conf = new ScenarioConfiguration();
    conf.addcombinerConf();
    this.fs = FileSystem.get(conf);
    this.inputpath = TestConstants.NATIVETASK_COMBINER_TEST_INPUTDIR + "/wordcount";
    if (!fs.exists(new Path(inputpath))) {
        new TestInputFile(conf.getInt(TestConstants.NATIVETASK_COMBINER_WORDCOUNT_FILESIZE, 1000000), Text.class.getName(), Text.class.getName(), conf).createSequenceTestFile(inputpath, 1, (byte) ('a'));
    }
}
Also used : Path(org.apache.hadoop.fs.Path) ScenarioConfiguration(org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration) TestInputFile(org.apache.hadoop.mapred.nativetask.kvtest.TestInputFile) Before(org.junit.Before)

Example 9 with ScenarioConfiguration

use of org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration in project hadoop by apache.

the class CompressTest method startUp.

@Before
public void startUp() throws Exception {
    Assume.assumeTrue(NativeCodeLoader.isNativeCodeLoaded());
    Assume.assumeTrue(NativeRuntime.isNativeLibraryLoaded());
    final ScenarioConfiguration conf = new ScenarioConfiguration();
    final FileSystem fs = FileSystem.get(conf);
    final Path path = new Path(TestConstants.NATIVETASK_COMPRESS_TEST_INPUTDIR);
    fs.delete(path, true);
    if (!fs.exists(path)) {
        new TestInputFile(hadoopConf.getInt(TestConstants.NATIVETASK_COMPRESS_FILESIZE, 100000), Text.class.getName(), Text.class.getName(), conf).createSequenceTestFile(TestConstants.NATIVETASK_COMPRESS_TEST_INPUTDIR);
    }
    fs.close();
}
Also used : Path(org.apache.hadoop.fs.Path) ScenarioConfiguration(org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration) TestInputFile(org.apache.hadoop.mapred.nativetask.kvtest.TestInputFile) FileSystem(org.apache.hadoop.fs.FileSystem) Before(org.junit.Before)

Example 10 with ScenarioConfiguration

use of org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration in project hadoop by apache.

the class CompressTest method cleanUp.

@AfterClass
public static void cleanUp() throws IOException {
    final FileSystem fs = FileSystem.get(new ScenarioConfiguration());
    fs.delete(new Path(TestConstants.NATIVETASK_COMPRESS_TEST_DIR), true);
    fs.close();
}
Also used : Path(org.apache.hadoop.fs.Path) ScenarioConfiguration(org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Aggregations

Path (org.apache.hadoop.fs.Path)13 ScenarioConfiguration (org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration)13 FileSystem (org.apache.hadoop.fs.FileSystem)10 AfterClass (org.junit.AfterClass)7 TestInputFile (org.apache.hadoop.mapred.nativetask.kvtest.TestInputFile)4 Before (org.junit.Before)4 IOException (java.io.IOException)1 Job (org.apache.hadoop.mapreduce.Job)1