You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/08/02 07:41:27 UTC

[04/14] ignite git commit: IGNITE-3343: cosmetic cleanup.

IGNITE-3343: cosmetic cleanup.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ba7af8c9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ba7af8c9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ba7af8c9

Branch: refs/heads/ignite-3343
Commit: ba7af8c9adc61759e54091e485f48dbf07ce18c2
Parents: e7dfc17
Author: iveselovskiy <iv...@gridgain.com>
Authored: Tue Jul 26 13:47:54 2016 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Tue Jul 26 13:47:54 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/igfs/IgfsImpl.java      | 12 ++++++++++--
 .../hadoop/HadoopAbstractMapReduceTest.java     | 20 +++++++++++---------
 2 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ba7af8c9/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index ce5273d..3779e68 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -1030,8 +1030,16 @@ public final class IgfsImpl implements IgfsEx {
                     await(path);
 
                 // Perform create.
-                IgfsCreateResult res = meta.create(path, dirProps, overwrite, cfg.getBlockSize(), affKey,
-                    evictExclude(path, mode == PRIMARY), fileProps, secondaryCtx);
+                IgfsCreateResult res = meta.create(
+                    path,
+                    dirProps,
+                    overwrite,
+                    cfg.getBlockSize(),
+                    affKey,
+                    evictExclude(path, mode == PRIMARY),
+                    fileProps,
+                    secondaryCtx
+                );
 
                 assert res != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ba7af8c9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractMapReduceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractMapReduceTest.java
index c0a8d2c..3731213 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractMapReduceTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractMapReduceTest.java
@@ -169,8 +169,8 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
      * @param useNewCombiner flag to use new combiner API.
      * @param useNewReducer flag to use new reducer API.
      */
-    protected final void doTest(IgfsPath inFile, boolean useNewMapper, boolean useNewCombiner,
-        boolean useNewReducer) throws Exception {
+    protected final void doTest(IgfsPath inFile, boolean useNewMapper, boolean useNewCombiner, boolean useNewReducer)
+        throws Exception {
         igfs.delete(new IgfsPath(PATH_OUTPUT), true);
 
         JobConf jobConf = new JobConf();
@@ -219,10 +219,13 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
         String actual = readAndSortFile(outFile, job.getConfiguration());
 
         assertEquals("Use new mapper: " + useNewMapper + ", new combiner: " + useNewCombiner + ", new reducer: " +
-                useNewReducer, "blue\t" + blue + "\n" +
+                useNewReducer,
+            "blue\t" + blue + "\n" +
                 "green\t" + green + "\n" +
                 "red\t" + red + "\n" +
-                "yellow\t" + yellow + "\n", actual);
+                "yellow\t" + yellow + "\n",
+            actual
+        );
     }
 
     /**
@@ -245,7 +248,7 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
 
         HadoopPerformanceCounter perfCntr = HadoopPerformanceCounter.getCounter(cntrs, null);
 
-        Map<String, SortedMap<Integer, Long>> tasks = new TreeMap<>();
+        Map<String, SortedMap<Integer,Long>> tasks = new TreeMap<>();
 
         Map<String, Integer> phaseOrders = new HashMap<>();
         phaseOrders.put("submit", 0);
@@ -275,7 +278,7 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
             }
 
             if (!taskId.equals(prevTaskId))
-                tasks.put(taskId, new TreeMap<Integer, Long>());
+                tasks.put(taskId, new TreeMap<Integer,Long>());
 
             Integer pos = phaseOrders.get(taskPhase);
 
@@ -288,7 +291,7 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
             apiEvtCnt++;
         }
 
-        for (Map.Entry<String, SortedMap<Integer, Long>> task : tasks.entrySet()) {
+        for (Map.Entry<String ,SortedMap<Integer,Long>> task : tasks.entrySet()) {
             Map<Integer, Long> order = task.getValue();
 
             long prev = 0;
@@ -350,8 +353,7 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
      * @throws Exception If failed.
      */
     protected Ignite startGridWithIgfs(String gridName, String igfsName, IgfsMode mode,
-        @Nullable IgfsSecondaryFileSystem secondaryFs,
-        @Nullable IgfsIpcEndpointConfiguration restCfg) throws Exception {
+        @Nullable IgfsSecondaryFileSystem secondaryFs, @Nullable IgfsIpcEndpointConfiguration restCfg) throws Exception {
         FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
 
         igfsCfg.setDataCacheName("dataCache");