http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractSelfTest.java index 83261e8..0158054 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractSelfTest.java @@ -39,19 +39,19 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest protected static final int REST_PORT = 11212; /** IGFS name. */ - protected static final String ggfsName = null; + protected static final String igfsName = null; /** IGFS name. */ - protected static final String ggfsMetaCacheName = "meta"; + protected static final String igfsMetaCacheName = "meta"; /** IGFS name. */ - protected static final String ggfsDataCacheName = "data"; + protected static final String igfsDataCacheName = "data"; /** IGFS block size. */ - protected static final int ggfsBlockSize = 1024; + protected static final int igfsBlockSize = 1024; /** IGFS block group size. */ - protected static final int ggfsBlockGroupSize = 8; + protected static final int igfsBlockGroupSize = 8; /** Initial REST port. */ private int restPort = REST_PORT; @@ -94,10 +94,10 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest cfg.setCommunicationSpi(commSpi); - if (ggfsEnabled()) { + if (igfsEnabled()) { cfg.setCacheConfiguration(metaCacheConfiguration(), dataCacheConfiguration()); - cfg.setIgfsConfiguration(ggfsConfiguration()); + cfg.setIgfsConfiguration(igfsConfiguration()); } if (restEnabled()) { @@ -129,13 +129,13 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest /** * @return IGFS configuration. */ - public IgfsConfiguration ggfsConfiguration() { + public IgfsConfiguration igfsConfiguration() { IgfsConfiguration cfg = new IgfsConfiguration(); - cfg.setName(ggfsName); - cfg.setBlockSize(ggfsBlockSize); - cfg.setDataCacheName(ggfsDataCacheName); - cfg.setMetaCacheName(ggfsMetaCacheName); + cfg.setName(igfsName); + cfg.setBlockSize(igfsBlockSize); + cfg.setDataCacheName(igfsDataCacheName); + cfg.setMetaCacheName(igfsMetaCacheName); cfg.setFragmentizerEnabled(false); return cfg; @@ -147,7 +147,7 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest public CacheConfiguration metaCacheConfiguration() { CacheConfiguration cfg = new CacheConfiguration(); - cfg.setName(ggfsMetaCacheName); + cfg.setName(igfsMetaCacheName); cfg.setCacheMode(REPLICATED); cfg.setAtomicityMode(TRANSACTIONAL); cfg.setWriteSynchronizationMode(FULL_SYNC); @@ -161,10 +161,10 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest private CacheConfiguration dataCacheConfiguration() { CacheConfiguration cfg = new CacheConfiguration(); - cfg.setName(ggfsDataCacheName); + cfg.setName(igfsDataCacheName); cfg.setCacheMode(PARTITIONED); cfg.setAtomicityMode(TRANSACTIONAL); - cfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(ggfsBlockGroupSize)); + cfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(igfsBlockGroupSize)); cfg.setWriteSynchronizationMode(FULL_SYNC); return cfg; @@ -173,7 +173,7 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest /** * @return {@code True} if IGFS is enabled on Hadoop nodes. */ - protected boolean ggfsEnabled() { + protected boolean igfsEnabled() { return false; } @@ -195,7 +195,7 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest * @param cfg Config. */ protected void setupFileSystems(Configuration cfg) { - cfg.set("fs.defaultFS", ggfsScheme()); + cfg.set("fs.defaultFS", igfsScheme()); cfg.set("fs.igfs.impl", org.apache.ignite.igfs.hadoop.v1.IgfsHadoopFileSystem.class.getName()); cfg.set("fs.AbstractFileSystem.igfs.impl", IgfsHadoopFileSystem. class.getName()); @@ -206,7 +206,7 @@ public abstract class GridHadoopAbstractSelfTest extends GridCommonAbstractTest /** * @return IGFS scheme for test. */ - protected String ggfsScheme() { + protected String igfsScheme() { return "igfs://:" + getTestGridName(0) + "@/"; } }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractWordCountTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractWordCountTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractWordCountTest.java index 3aafe5b..ebbc0a6 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractWordCountTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopAbstractWordCountTest.java @@ -37,7 +37,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract protected static final String PATH_OUTPUT = "/output"; /** IGFS instance. */ - protected IgfsEx ggfs; + protected IgfsEx igfs; /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -53,7 +53,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { - ggfs = (IgfsEx)startGrids(gridCount()).fileSystem(ggfsName); + igfs = (IgfsEx)startGrids(gridCount()).fileSystem(igfsName); } /** {@inheritDoc} */ @@ -62,7 +62,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract } /** {@inheritDoc} */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -98,7 +98,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract } //Input file preparing - PrintWriter testInputFileWriter = new PrintWriter(ggfs.create(new IgfsPath(path), true)); + PrintWriter testInputFileWriter = new PrintWriter(igfs.create(new IgfsPath(path), true)); int j = 0; @@ -122,7 +122,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract * @throws Exception If could not read the file. */ protected String readAndSortFile(String fileName) throws Exception { - BufferedReader reader = new BufferedReader(new InputStreamReader(ggfs.open(new IgfsPath(fileName)))); + BufferedReader reader = new BufferedReader(new InputStreamReader(igfs.open(new IgfsPath(fileName)))); List<String> list = new ArrayList<>(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopCommandLineTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopCommandLineTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopCommandLineTest.java index 7e85937..80cd226 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopCommandLineTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopCommandLineTest.java @@ -37,10 +37,10 @@ import java.util.*; */ public class GridHadoopCommandLineTest extends GridCommonAbstractTest { /** IGFS instance. */ - private IgfsEx ggfs; + private IgfsEx igfs; /** */ - private static final String ggfsName = "igfs"; + private static final String igfsName = "igfs"; /** */ private static File testWorkDir; @@ -193,7 +193,7 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { - ggfs = (IgfsEx) Ignition.start("config/hadoop/default-config.xml").fileSystem(ggfsName); + igfs = (IgfsEx) Ignition.start("config/hadoop/default-config.xml").fileSystem(igfsName); } /** {@inheritDoc} */ @@ -307,17 +307,17 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest { assertEquals(0, executeHadoopCmd("fs", "-put", new File(testWorkDir, "test-data").getAbsolutePath(), "/input")); - assertTrue(ggfs.exists(new IgfsPath("/input/test-data"))); + assertTrue(igfs.exists(new IgfsPath("/input/test-data"))); assertEquals(0, executeHadoopCmd("jar", examplesJar.getAbsolutePath(), "wordcount", "/input", "/output")); IgfsPath path = new IgfsPath("/user/" + System.getProperty("user.name") + "/"); - assertTrue(ggfs.exists(path)); + assertTrue(igfs.exists(path)); IgfsPath jobStatPath = null; - for (IgfsPath jobPath : ggfs.listPaths(path)) { + for (IgfsPath jobPath : igfs.listPaths(path)) { assertNull(jobStatPath); jobStatPath = jobPath; @@ -331,9 +331,9 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest { assertTrue(evtCnt >= 22); //It's the minimum amount of events for job with combiner. - assertTrue(ggfs.exists(new IgfsPath("/output"))); + assertTrue(igfs.exists(new IgfsPath("/output"))); - BufferedReader in = new BufferedReader(new InputStreamReader(ggfs.open(new IgfsPath("/output/part-r-00000")))); + BufferedReader in = new BufferedReader(new InputStreamReader(igfs.open(new IgfsPath("/output/part-r-00000")))); List<String> res = new ArrayList<>(); @@ -364,7 +364,7 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest { "location '/result' as " + qry )); - IgfsInputStreamAdapter in = ggfs.open(new IgfsPath("/result/000000_0")); + IgfsInputStreamAdapter in = igfs.open(new IgfsPath("/result/000000_0")); byte[] buf = new byte[(int) in.length()]; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java index 5514f97..54de56d 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java @@ -104,14 +104,14 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testGgfsOneBlockPerNode() throws IgniteCheckedException { + public void testIgfsOneBlockPerNode() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(true, "/file1", 0, 100, HOST_1); GridHadoopFileBlock split2 = split(true, "/file2", 0, 100, HOST_2); GridHadoopFileBlock split3 = split(true, "/file3", 0, 100, HOST_3); - mapGgfsBlock(split1.file(), 0, 100, location(0, 100, ID_1)); - mapGgfsBlock(split2.file(), 0, 100, location(0, 100, ID_2)); - mapGgfsBlock(split3.file(), 0, 100, location(0, 100, ID_3)); + mapIgfsBlock(split1.file(), 0, 100, location(0, 100, ID_1)); + mapIgfsBlock(split2.file(), 0, 100, location(0, 100, ID_2)); + mapIgfsBlock(split3.file(), 0, 100, location(0, 100, ID_3)); plan(1, split1); assert ensureMappers(ID_1, split1); @@ -164,7 +164,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testNonGgfsOneBlockPerNode() throws IgniteCheckedException { + public void testNonIgfsOneBlockPerNode() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(false, "/file1", 0, 100, HOST_1); GridHadoopFileBlock split2 = split(false, "/file2", 0, 100, HOST_2); GridHadoopFileBlock split3 = split(false, "/file3", 0, 100, HOST_3); @@ -220,14 +220,14 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testGgfsSeveralBlocksPerNode() throws IgniteCheckedException { + public void testIgfsSeveralBlocksPerNode() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(true, "/file1", 0, 100, HOST_1, HOST_2); GridHadoopFileBlock split2 = split(true, "/file2", 0, 100, HOST_1, HOST_2); GridHadoopFileBlock split3 = split(true, "/file3", 0, 100, HOST_1, HOST_3); - mapGgfsBlock(split1.file(), 0, 100, location(0, 100, ID_1, ID_2)); - mapGgfsBlock(split2.file(), 0, 100, location(0, 100, ID_1, ID_2)); - mapGgfsBlock(split3.file(), 0, 100, location(0, 100, ID_1, ID_3)); + mapIgfsBlock(split1.file(), 0, 100, location(0, 100, ID_1, ID_2)); + mapIgfsBlock(split2.file(), 0, 100, location(0, 100, ID_1, ID_2)); + mapIgfsBlock(split3.file(), 0, 100, location(0, 100, ID_1, ID_3)); plan(1, split1); assert ensureMappers(ID_1, split1) && ensureReducers(ID_1, 1) && ensureEmpty(ID_2) || @@ -266,7 +266,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testNonGgfsSeveralBlocksPerNode() throws IgniteCheckedException { + public void testNonIgfsSeveralBlocksPerNode() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(false, "/file1", 0, 100, HOST_1, HOST_2); GridHadoopFileBlock split2 = split(false, "/file2", 0, 100, HOST_1, HOST_2); GridHadoopFileBlock split3 = split(false, "/file3", 0, 100, HOST_1, HOST_3); @@ -308,12 +308,12 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testGgfsSeveralComplexBlocksPerNode() throws IgniteCheckedException { + public void testIgfsSeveralComplexBlocksPerNode() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(true, "/file1", 0, 100, HOST_1, HOST_2, HOST_3); GridHadoopFileBlock split2 = split(true, "/file2", 0, 100, HOST_1, HOST_2, HOST_3); - mapGgfsBlock(split1.file(), 0, 100, location(0, 50, ID_1, ID_2), location(51, 100, ID_1, ID_3)); - mapGgfsBlock(split2.file(), 0, 100, location(0, 50, ID_1, ID_2), location(51, 100, ID_2, ID_3)); + mapIgfsBlock(split1.file(), 0, 100, location(0, 50, ID_1, ID_2), location(51, 100, ID_1, ID_3)); + mapIgfsBlock(split2.file(), 0, 100, location(0, 50, ID_1, ID_2), location(51, 100, ID_2, ID_3)); plan(1, split1); assert ensureMappers(ID_1, split1); @@ -344,7 +344,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * @throws IgniteCheckedException If failed. */ - public void testNonGgfsOrphans() throws IgniteCheckedException { + public void testNonIgfsOrphans() throws IgniteCheckedException { GridHadoopFileBlock split1 = split(false, "/file1", 0, 100, INVALID_HOST_1, INVALID_HOST_2); GridHadoopFileBlock split2 = split(false, "/file2", 0, 100, INVALID_HOST_1, INVALID_HOST_3); GridHadoopFileBlock split3 = split(false, "/file3", 0, 100, INVALID_HOST_2, INVALID_HOST_3); @@ -473,15 +473,15 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac /** * Create split. * - * @param ggfs IGFS flag. + * @param igfs IGFS flag. * @param file File. * @param start Start. * @param len Length. * @param hosts Hosts. * @return Split. */ - private static GridHadoopFileBlock split(boolean ggfs, String file, long start, long len, String... hosts) { - URI uri = URI.create((ggfs ? "igfs://igfs@" : "hdfs://") + file); + private static GridHadoopFileBlock split(boolean igfs, String file, long start, long len, String... hosts) { + URI uri = URI.create((igfs ? "igfs://igfs@" : "hdfs://") + file); return new GridHadoopFileBlock(hosts, uri, start, len); } @@ -513,7 +513,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac * @param len Length. * @param locations Locations. */ - private static void mapGgfsBlock(URI file, long start, long len, IgfsBlockLocation... locations) { + private static void mapIgfsBlock(URI file, long start, long len, IgfsBlockLocation... locations) { assert locations != null && locations.length > 0; IgfsPath path = new IgfsPath(file); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopFileSystemsTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopFileSystemsTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopFileSystemsTest.java index ec54f49..18e5c03 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopFileSystemsTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopFileSystemsTest.java @@ -46,7 +46,7 @@ public class GridHadoopFileSystemsTest extends GridHadoopAbstractSelfTest { } /** {@inheritDoc} */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -153,8 +153,8 @@ public class GridHadoopFileSystemsTest extends GridHadoopAbstractSelfTest { * * @throws Exception If fails. */ - public void testGgfs() throws Exception { - testFileSystem(URI.create(ggfsScheme())); + public void testIgfs() throws Exception { + testFileSystem(URI.create(igfsScheme())); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopGroupingTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopGroupingTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopGroupingTest.java index 8d20d99..05ae708 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopGroupingTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopGroupingTest.java @@ -45,7 +45,7 @@ public class GridHadoopGroupingTest extends GridHadoopAbstractSelfTest { } /** {@inheritDoc} */ - protected boolean ggfsEnabled() { + protected boolean igfsEnabled() { return false; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopJobTrackerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopJobTrackerSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopJobTrackerSelfTest.java index f1f316f..b779e93 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopJobTrackerSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopJobTrackerSelfTest.java @@ -58,7 +58,7 @@ public class GridHadoopJobTrackerSelfTest extends GridHadoopAbstractSelfTest { private static final Map<String, CountDownLatch> latch = m.put("latch", new HashMap<String, CountDownLatch>()); /** {@inheritDoc} */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -114,7 +114,7 @@ public class GridHadoopJobTrackerSelfTest extends GridHadoopAbstractSelfTest { job.setReducerClass(TestReducer.class); job.setInputFormatClass(InFormat.class); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_OUTPUT + "1")); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_OUTPUT + "1")); GridHadoopJobId jobId = new GridHadoopJobId(globalId, 1); @@ -161,7 +161,7 @@ public class GridHadoopJobTrackerSelfTest extends GridHadoopAbstractSelfTest { job.setCombinerClass(TestCombiner.class); job.setInputFormatClass(InFormat.class); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_OUTPUT + "2")); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_OUTPUT + "2")); GridHadoopJobId jobId = new GridHadoopJobId(globalId, 1); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java index 642f0ae..dda041c 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java @@ -58,7 +58,7 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest public void testMultiReducerWholeMapReduceExecution() throws Exception { IgfsPath inDir = new IgfsPath(PATH_INPUT); - ggfs.mkdirs(inDir); + igfs.mkdirs(inDir); IgfsPath inFile = new IgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input"); @@ -68,7 +68,7 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest for (int i = 0; i < 2; i++) { boolean useNewAPI = i == 1; - ggfs.delete(new IgfsPath(PATH_OUTPUT), true); + igfs.delete(new IgfsPath(PATH_OUTPUT), true); flags.put("serializationWasConfigured", false); flags.put("partitionerWasConfigured", false); @@ -109,8 +109,8 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); - FileInputFormat.setInputPaths(job, new Path(ggfsScheme() + inFile.toString())); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_OUTPUT)); + FileInputFormat.setInputPaths(job, new Path(igfsScheme() + inFile.toString())); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_OUTPUT)); job.setNumReduceTasks(3); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceTest.java index 2c4a11e..072e764 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopMapReduceTest.java @@ -53,14 +53,14 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest { public void testWholeMapReduceExecution() throws Exception { IgfsPath inDir = new IgfsPath(PATH_INPUT); - ggfs.mkdirs(inDir); + igfs.mkdirs(inDir); IgfsPath inFile = new IgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input"); generateTestFile(inFile.toString(), "red", 100000, "blue", 200000, "green", 150000, "yellow", 70000 ); for (int i = 0; i < 8; i++) { - ggfs.delete(new IgfsPath(PATH_OUTPUT), true); + igfs.delete(new IgfsPath(PATH_OUTPUT), true); boolean useNewMapper = (i & 1) == 0; boolean useNewCombiner = (i & 2) == 0; @@ -90,8 +90,8 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest { job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); - FileInputFormat.setInputPaths(job, new Path(ggfsScheme() + inFile.toString())); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_OUTPUT)); + FileInputFormat.setInputPaths(job, new Path(igfsScheme() + inFile.toString())); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_OUTPUT)); job.setJarByClass(GridHadoopWordCount2.class); @@ -184,11 +184,11 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest { GridTestUtils.waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { - return ggfs.exists(statPath); + return igfs.exists(statPath); } }, 10000); - BufferedReader reader = new BufferedReader(new InputStreamReader(ggfs.open(statPath))); + BufferedReader reader = new BufferedReader(new InputStreamReader(igfs.open(statPath))); assertEquals(apiEvtCnt, GridHadoopTestUtils.simpleCheckJobStatFile(reader)); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSortingTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSortingTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSortingTest.java index a5471c4..b9ccb84 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSortingTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSortingTest.java @@ -49,7 +49,7 @@ public class GridHadoopSortingTest extends GridHadoopAbstractSelfTest { /** * @return {@code True} if IGFS is enabled on Hadoop nodes. */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -89,7 +89,7 @@ public class GridHadoopSortingTest extends GridHadoopAbstractSelfTest { setupFileSystems(job.getConfiguration()); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_INPUT)); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_INPUT)); X.printerrln("Data generation started."); @@ -106,8 +106,8 @@ public class GridHadoopSortingTest extends GridHadoopAbstractSelfTest { job.getConfiguration().set(CommonConfigurationKeys.IO_SERIALIZATIONS_KEY, JavaSerialization.class.getName() + "," + WritableSerialization.class.getName()); - FileInputFormat.setInputPaths(job, new Path(ggfsScheme() + PATH_INPUT)); - FileOutputFormat.setOutputPath(job, new Path(ggfsScheme() + PATH_OUTPUT)); + FileInputFormat.setInputPaths(job, new Path(igfsScheme() + PATH_INPUT)); + FileOutputFormat.setOutputPath(job, new Path(igfsScheme() + PATH_OUTPUT)); job.setSortComparatorClass(JavaSerializationComparator.class); @@ -130,9 +130,9 @@ public class GridHadoopSortingTest extends GridHadoopAbstractSelfTest { X.printerrln("Job complete."); // Check result. - Path outDir = new Path(ggfsScheme() + PATH_OUTPUT); + Path outDir = new Path(igfsScheme() + PATH_OUTPUT); - AbstractFileSystem fs = AbstractFileSystem.get(new URI(ggfsScheme()), job.getConfiguration()); + AbstractFileSystem fs = AbstractFileSystem.get(new URI(igfsScheme()), job.getConfiguration()); for (FileStatus file : fs.listStatus(outDir)) { X.printerrln("__ file: " + file); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java index 82c0ced..40546bb 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java @@ -72,8 +72,8 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest /** {@inheritDoc} */ - @Override public IgfsConfiguration ggfsConfiguration() { - IgfsConfiguration cfg = super.ggfsConfiguration(); + @Override public IgfsConfiguration igfsConfiguration() { + IgfsConfiguration cfg = super.igfsConfiguration(); cfg.setFragmentizerEnabled(false); @@ -81,7 +81,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest } /** {@inheritDoc} */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -101,7 +101,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { - grid(0).fileSystem(ggfsName).format(); + grid(0).fileSystem(igfsName).format(); } /** {@inheritDoc} */ @@ -246,9 +246,9 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest * @throws Exception If failed. */ private void prepareFile(String fileName, int lineCnt) throws Exception { - IgniteFs ggfs = grid(0).fileSystem(ggfsName); + IgniteFs igfs = grid(0).fileSystem(igfsName); - try (OutputStream os = ggfs.create(new IgfsPath(fileName), true)) { + try (OutputStream os = igfs.create(new IgfsPath(fileName), true)) { PrintWriter w = new PrintWriter(new OutputStreamWriter(os)); for (int i = 0; i < lineCnt; i++) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTasksAllVersionsTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTasksAllVersionsTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTasksAllVersionsTest.java index 17d007c..af3f872 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTasksAllVersionsTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/GridHadoopTasksAllVersionsTest.java @@ -59,27 +59,27 @@ abstract class GridHadoopTasksAllVersionsTest extends GridHadoopAbstractWordCoun public void testMapTask() throws Exception { IgfsPath inDir = new IgfsPath(PATH_INPUT); - ggfs.mkdirs(inDir); + igfs.mkdirs(inDir); IgfsPath inFile = new IgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input"); - URI inFileUri = URI.create(ggfsScheme() + inFile.toString()); + URI inFileUri = URI.create(igfsScheme() + inFile.toString()); - try (PrintWriter pw = new PrintWriter(ggfs.create(inFile, true))) { + try (PrintWriter pw = new PrintWriter(igfs.create(inFile, true))) { pw.println("hello0 world0"); pw.println("world1 hello1"); } - GridHadoopFileBlock fileBlock1 = new GridHadoopFileBlock(HOSTS, inFileUri, 0, ggfs.info(inFile).length() - 1); + GridHadoopFileBlock fileBlock1 = new GridHadoopFileBlock(HOSTS, inFileUri, 0, igfs.info(inFile).length() - 1); - try (PrintWriter pw = new PrintWriter(ggfs.append(inFile, false))) { + try (PrintWriter pw = new PrintWriter(igfs.append(inFile, false))) { pw.println("hello2 world2"); pw.println("world3 hello3"); } GridHadoopFileBlock fileBlock2 = new GridHadoopFileBlock(HOSTS, inFileUri, fileBlock1.length(), - ggfs.info(inFile).length() - fileBlock1.length()); + igfs.info(inFile).length() - fileBlock1.length()); - GridHadoopV2Job gridJob = getHadoopJob(ggfsScheme() + inFile.toString(), ggfsScheme() + PATH_OUTPUT); + GridHadoopV2Job gridJob = getHadoopJob(igfsScheme() + inFile.toString(), igfsScheme() + PATH_OUTPUT); GridHadoopTaskInfo taskInfo = new GridHadoopTaskInfo(GridHadoopTaskType.MAP, gridJob.id(), 0, 0, fileBlock1); @@ -136,7 +136,7 @@ abstract class GridHadoopTasksAllVersionsTest extends GridHadoopAbstractWordCoun * @throws Exception If fails. */ public void testReduceTask() throws Exception { - GridHadoopV2Job gridJob = getHadoopJob(ggfsScheme() + PATH_INPUT, ggfsScheme() + PATH_OUTPUT); + GridHadoopV2Job gridJob = getHadoopJob(igfsScheme() + PATH_INPUT, igfsScheme() + PATH_OUTPUT); runTaskWithInput(gridJob, GridHadoopTaskType.REDUCE, 0, "word1", "5", "word2", "10"); runTaskWithInput(gridJob, GridHadoopTaskType.REDUCE, 1, "word3", "7", "word4", "15"); @@ -212,23 +212,23 @@ abstract class GridHadoopTasksAllVersionsTest extends GridHadoopAbstractWordCoun public void testAllTasks() throws Exception { IgfsPath inDir = new IgfsPath(PATH_INPUT); - ggfs.mkdirs(inDir); + igfs.mkdirs(inDir); IgfsPath inFile = new IgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input"); - URI inFileUri = URI.create(ggfsScheme() + inFile.toString()); + URI inFileUri = URI.create(igfsScheme() + inFile.toString()); generateTestFile(inFile.toString(), "red", 100, "blue", 200, "green", 150, "yellow", 70); //Split file into two blocks - long fileLen = ggfs.info(inFile).length(); + long fileLen = igfs.info(inFile).length(); Long l = fileLen / 2; GridHadoopFileBlock fileBlock1 = new GridHadoopFileBlock(HOSTS, inFileUri, 0, l); GridHadoopFileBlock fileBlock2 = new GridHadoopFileBlock(HOSTS, inFileUri, l, fileLen - l); - GridHadoopV2Job gridJob = getHadoopJob(inFileUri.toString(), ggfsScheme() + PATH_OUTPUT); + GridHadoopV2Job gridJob = getHadoopJob(inFileUri.toString(), igfsScheme() + PATH_OUTPUT); GridHadoopTestTaskContext combine1Ctx = runMapCombineTask(fileBlock1, gridJob); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java index 85de25c..52bfa98 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java @@ -39,7 +39,7 @@ import static org.apache.ignite.internal.processors.hadoop.GridHadoopUtils.*; */ public class GridHadoopExternalTaskExecutionSelfTest extends GridHadoopAbstractSelfTest { /** {@inheritDoc} */ - @Override protected boolean ggfsEnabled() { + @Override protected boolean igfsEnabled() { return true; } @@ -147,9 +147,9 @@ public class GridHadoopExternalTaskExecutionSelfTest extends GridHadoopAbstractS * @throws Exception If failed. */ private void prepareTestFile(String filePath) throws Exception { - IgniteFs ggfs = grid(0).fileSystem(ggfsName); + IgniteFs igfs = grid(0).fileSystem(igfsName); - try (IgfsOutputStream out = ggfs.create(new IgfsPath(filePath), true)) { + try (IgfsOutputStream out = igfs.create(new IgfsPath(filePath), true)) { PrintWriter wr = new PrintWriter(new OutputStreamWriter(out)); for (int i = 0; i < 1000; i++) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd1f854b/modules/hadoop/src/test/java/org/apache/ignite/loadtests/igfs/IgfsPerformanceBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/loadtests/igfs/IgfsPerformanceBenchmark.java b/modules/hadoop/src/test/java/org/apache/ignite/loadtests/igfs/IgfsPerformanceBenchmark.java index d564484..b5b309c 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/loadtests/igfs/IgfsPerformanceBenchmark.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/loadtests/igfs/IgfsPerformanceBenchmark.java @@ -64,9 +64,9 @@ public class IgfsPerformanceBenchmark { final String fsPrefix = argument(args, 5, FS_PREFIX); final short replication = (short)intArgument(args, 6, 3); - final Path ggfsHome = new Path(fsPrefix); + final Path igfsHome = new Path(fsPrefix); - final FileSystem fs = ggfs(ggfsHome, cfgPath); + final FileSystem fs = igfs(igfsHome, cfgPath); final AtomicLong progress = new AtomicLong(); @@ -80,7 +80,7 @@ public class IgfsPerformanceBenchmark { if (op == OP_READ) { for (int i = 0; i < threadNum; i++) - benchmarkWrite(fs, new Path(ggfsHome, "in-" + i), fileLen, bufSize, replication, null); + benchmarkWrite(fs, new Path(igfsHome, "in-" + i), fileLen, bufSize, replication, null); } long total = 0; @@ -94,10 +94,10 @@ public class IgfsPerformanceBenchmark { try { for (int i = 0; i < 200; i++) { if (op == OP_WRITE) - benchmarkWrite(fs, new Path(ggfsHome, "out-" + fileIdx), fileLen, bufSize, replication, + benchmarkWrite(fs, new Path(igfsHome, "out-" + fileIdx), fileLen, bufSize, replication, progress); else - benchmarkRead(fs, new Path(ggfsHome, "in-" + fileIdx), bufSize, progress); + benchmarkRead(fs, new Path(igfsHome, "in-" + fileIdx), bufSize, progress); } System.out.println("Finished " + (op == OP_WRITE ? "writing" : "reading") + " data."); @@ -135,11 +135,11 @@ public class IgfsPerformanceBenchmark { * Warms up server side. * * @param fs File system. - * @param ggfsHome IGFS home. + * @param igfsHome IGFS home. * @throws Exception If failed. */ - private static void warmUp(FileSystem fs, Path ggfsHome, int op, long fileLen) throws Exception { - Path file = new Path(ggfsHome, "out-0"); + private static void warmUp(FileSystem fs, Path igfsHome, int op, long fileLen) throws Exception { + Path file = new Path(igfsHome, "out-0"); benchmarkWrite(fs, file, fileLen, 1024 * 1024, (short)1, null); @@ -203,7 +203,7 @@ public class IgfsPerformanceBenchmark { } /** {@inheritDoc} */ - private static FileSystem ggfs(Path home, String cfgPath) throws IOException { + private static FileSystem igfs(Path home, String cfgPath) throws IOException { Configuration cfg = new Configuration(); cfg.addResource(U.resolveIgniteUrl(cfgPath));