ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [08/11] ignite git commit: IGNITE-2264: Correct HashMap sizes.
Date Sun, 03 Jan 2016 20:17:24 GMT
IGNITE-2264: Correct HashMap sizes.


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

Branch: refs/heads/ignite-2264
Commit: f5bd0487bf00ef5c44900ef78ae5dc59d4aad165
Parents: 4a116bd
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Sun Jan 3 23:21:07 2016 +0400
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Sun Jan 3 23:21:07 2016 +0400

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/GridTaskSessionImpl.java | 8 ++++----
 .../apache/ignite/internal/binary/BinaryReaderHandles.java   | 4 ++--
 .../internal/managers/discovery/GridDiscoveryManager.java    | 8 ++++----
 .../internal/processors/cache/GridCacheMvccManager.java      | 2 +-
 .../ignite/internal/processors/cache/GridCacheUtils.java     | 7 +++----
 .../internal/processors/cache/GridCacheValueCollection.java  | 4 ++--
 .../processors/cache/affinity/GridCacheAffinityImpl.java     | 2 +-
 .../cache/distributed/dht/GridDhtPartitionTopologyImpl.java  | 2 +-
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java     | 2 +-
 .../processors/cache/local/atomic/GridLocalAtomicCache.java  | 3 +--
 .../internal/processors/clock/GridClockDeltaSnapshot.java    | 6 +++---
 .../ignite/internal/processors/igfs/IgfsAttributes.java      | 3 +--
 .../ignite/internal/processors/igfs/IgfsDeleteWorker.java    | 3 +--
 .../ignite/internal/processors/igfs/IgfsMetaManager.java     | 2 +-
 .../platform/compute/PlatformBalancingMultiClosureTask.java  | 4 ++--
 .../platform/compute/PlatformBalancingSingleClosureTask.java | 4 ++--
 .../compute/PlatformBroadcastingMultiClosureTask.java        | 4 ++--
 .../compute/PlatformBroadcastingSingleClosureTask.java       | 4 ++--
 .../internal/processors/plugin/IgnitePluginProcessor.java    | 2 +-
 .../java/org/apache/ignite/internal/util/lang/GridFunc.java  | 3 +--
 .../ignite/spi/deployment/local/LocalDeploymentSpi.java      | 3 +--
 21 files changed, 37 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
index 677d464..6ead990 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
@@ -160,7 +160,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         this.ctx = ctx;
 
         if (attrs != null && !attrs.isEmpty()) {
-            this.attrs = new HashMap<>(attrs.size(), 1.0f);
+            this.attrs = U.newHashMap(attrs.size());
 
             this.attrs.putAll(attrs);
         }
@@ -363,7 +363,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
             if (closed)
                 throw new InterruptedException("Session was closed: " + this);
 
-            Map<Object, Object> retVal = new HashMap<>(keys.size(), 1.0f);
+            Map<Object, Object> retVal = U.newHashMap(keys.size());
 
             if (attrs != null)
                 for (Object key : keys)
@@ -555,7 +555,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         // will happen in 'setInternal(...)' method.
         synchronized (mux) {
             if (this.attrs == null)
-                this.attrs = new HashMap<>(attrs.size(), 1.0f);
+                this.attrs = U.newHashMap(attrs.size());
 
             this.attrs.putAll(attrs);
         }
@@ -594,7 +594,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
 
         synchronized (mux) {
             if (this.attrs == null)
-                this.attrs = new HashMap<>(attrs.size(), 1.0f);
+                this.attrs = U.newHashMap(attrs.size());
 
             this.attrs.putAll(attrs);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
index fddb8aa..bd4aa6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.internal.binary;
 
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
-import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -86,7 +86,7 @@ public class BinaryReaderHandles {
                 break;
 
             case MODE_SINGLE:
-                Map<Integer, Object> newData = new HashMap(3, 1.0f);
+                Map<Integer, Object> newData = U.newHashMap(3);
 
                 newData.put(singlePos, data);
                 newData.put(pos, obj);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index fbf3989..27ff7bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2469,9 +2469,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
             allNodes = Collections.unmodifiableList(all);
 
-            Map<String, Collection<ClusterNode>> cacheMap = new HashMap<>(allNodes.size(),
1.0f);
-            Map<String, Collection<ClusterNode>> rmtCacheMap = new HashMap<>(allNodes.size(),
1.0f);
-            Map<String, Collection<ClusterNode>> dhtNodesMap = new HashMap<>(allNodes.size(),
1.0f);
+            Map<String, Collection<ClusterNode>> cacheMap = U.newHashMap(allNodes.size());
+            Map<String, Collection<ClusterNode>> rmtCacheMap = U.newHashMap(allNodes.size());
+            Map<String, Collection<ClusterNode>> dhtNodesMap = U.newHashMap(allNodes.size());
             Collection<ClusterNode> nodesWithCaches = U.newHashSet(allNodes.size());
             Collection<ClusterNode> rmtNodesWithCaches = U.newHashSet(allNodes.size());
 
@@ -2578,7 +2578,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
             daemonNodes = Collections.unmodifiableList(new ArrayList<>(
                 F.view(F.concat(false, loc, rmts), F.not(daemonFilter))));
 
-            Map<UUID, ClusterNode> nodeMap = new HashMap<>(allNodes().size()
+ daemonNodes.size(), 1.0f);
+            Map<UUID, ClusterNode> nodeMap = U.newHashMap(allNodes().size() + daemonNodes.size());
 
             for (ClusterNode n : F.concat(false, allNodes(), daemonNodes()))
                 nodeMap.put(n.id(), n);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index dbc6992..def5659 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -1209,7 +1209,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter
{
         /** {@inheritDoc} */
         @Override public String toString() {
             if (!pendingLocks.isEmpty()) {
-                Map<GridCacheVersion, IgniteInternalTx> txs = new HashMap<>(1,
1.0f);
+                Map<GridCacheVersion, IgniteInternalTx> txs = U.newHashMap(1);
 
                 for (Collection<GridCacheMvccCandidate> cands : pendingLocks.values())
                     for (GridCacheMvccCandidate c : cands)

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index b7baf7e..c905e3e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -26,7 +26,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -1760,7 +1759,7 @@ public class GridCacheUtils {
      * @return Cache ID to partition ID array map.
      */
     public static Map<Integer, int[]> convertInvalidPartitions(Map<Integer, Set<Integer>>
partsMap) {
-        Map<Integer, int[]> res = new HashMap<>(partsMap.size());
+        Map<Integer, int[]> res = U.newHashMap(partsMap.size());
 
         for (Map.Entry<Integer, Set<Integer>> entry : partsMap.entrySet()) {
             Set<Integer> parts = entry.getValue();
@@ -1859,7 +1858,7 @@ public class GridCacheUtils {
      * @return Neighbors map.
      */
     public static Map<UUID, Collection<ClusterNode>> neighbors(Collection<ClusterNode>
topSnapshot) {
-        Map<String, Collection<ClusterNode>> macMap = new HashMap<>(topSnapshot.size(),
1.0f);
+        Map<String, Collection<ClusterNode>> macMap = U.newHashMap(topSnapshot.size());
 
         // Group by mac addresses.
         for (ClusterNode node : topSnapshot) {
@@ -1873,7 +1872,7 @@ public class GridCacheUtils {
             nodes.add(node);
         }
 
-        Map<UUID, Collection<ClusterNode>> neighbors = new HashMap<>(topSnapshot.size(),
1.0f);
+        Map<UUID, Collection<ClusterNode>> neighbors = U.newHashMap(topSnapshot.size());
 
         for (Collection<ClusterNode> group : macMap.values())
             for (ClusterNode node : group)

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
index 68b54b3..231ba46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.NoSuchElementException;
@@ -28,6 +27,7 @@ import org.apache.ignite.internal.util.GridSerializableCollection;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.jetbrains.annotations.Nullable;
 
@@ -55,7 +55,7 @@ public class GridCacheValueCollection<K, V> extends GridSerializableCollection<V
      */
     public GridCacheValueCollection(GridCacheContext<K, V> ctx, Collection<? extends
Cache.Entry<K, V>> c,
         @Nullable IgnitePredicate<Cache.Entry<K, V>>[] filter) {
-        map = new HashMap<>(c.size(), 1.0f);
+        map = U.newHashMap(c.size());
 
         assert ctx != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
index b9045e9..9384c3a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -173,7 +173,7 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K>
{
         int nodesCnt = cctx.discovery().cacheAffinityNodes(cctx.name(), topVer).size();
 
         // Must return empty map if no alive nodes present or keys is empty.
-        Map<ClusterNode, Collection<K>> res = new HashMap<>(nodesCnt, 1.0f);
+        Map<ClusterNode, Collection<K>> res = U.newHashMap(nodesCnt);
 
         for (K key : keys) {
             ClusterNode primary = cctx.affinity().primary(key, topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index cdf0fc2..5685f9e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -932,7 +932,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
 
             node2part = partMap;
 
-            Map<Integer, Set<UUID>> p2n = new HashMap<>(cctx.affinity().partitions(),
1.0f);
+            Map<Integer, Set<UUID>> p2n = U.newHashMap(cctx.affinity().partitions());
 
             for (Map.Entry<UUID, GridDhtPartitionMap2> e : partMap.entrySet()) {
                 for (Integer p : e.getValue().keySet()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index a34b00e..587d316 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1783,7 +1783,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
 
             if (val == null) {
                 if (needReload == null)
-                    needReload = new HashMap<>(entries.size(), 1.0f);
+                    needReload = U.newHashMap(entries.size());
 
                 needReload.put(entry.key(), i);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 3b60f96..22c8f81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -561,7 +560,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         UUID subjId = ctx.subjectIdPerCall(null, opCtx);
 
-        Map<K, V> vals = new HashMap<>(keys.size(), 1.0f);
+        Map<K, V> vals = U.newHashMap(keys.size());
 
         if (keyCheck)
             validateCacheKeys(keys);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
index 1e675b6..a343494 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.clock;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.UUID;
@@ -28,6 +27,7 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryTopologySnapshot;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
  * Snapshot of time deltas for given topology.
@@ -59,9 +59,9 @@ public class GridClockDeltaSnapshot {
 
         this.ver = ver;
 
-        deltas = new HashMap<>(discoSnap.topologyNodes().size(), 1.0f);
+        deltas = U.newHashMap(discoSnap.topologyNodes().size());
 
-        pendingDeltas = new HashMap<>(discoSnap.topologyNodes().size(), 1.0f);
+        pendingDeltas = U.newHashMap(discoSnap.topologyNodes().size());
 
         for (ClusterNode n : discoSnap.topologyNodes()) {
             if (!locNodeId.equals(n.id()))

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
index af9485e..3f562f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Map;
 import org.apache.ignite.igfs.IgfsMode;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -181,7 +180,7 @@ public class IgfsAttributes implements Externalizable {
         if (in.readBoolean()) {
             int size = in.readInt();
 
-            pathModes = new HashMap<>(size, 1.0f);
+            pathModes = U.newHashMap(size);
 
             for (int i = 0; i < size; i++)
                 pathModes.put(U.readString(in), IgfsMode.fromOrdinal(in.readByte()));

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
index 95a6a5d..1ad8916 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.igfs;
 
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
@@ -271,7 +270,7 @@ public class IgfsDeleteWorker extends IgfsThread {
                 if (listing.isEmpty())
                     return true; // Directory is empty.
 
-                final Map<String, IgfsListingEntry> delListing = new HashMap<>(MAX_DELETE_BATCH,
1.0f);
+                final Map<String, IgfsListingEntry> delListing = U.newHashMap(MAX_DELETE_BATCH);
 
                 final GridCompoundFuture<Object, ?> fut = new GridCompoundFuture<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index ab73e7d..5e4756f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -1382,7 +1382,7 @@ public class IgfsMetaManager extends IgfsManager {
                     // Ensure parent is still in place.
                     if (parentInfo != null) {
                         Map<String, IgfsListingEntry> newListing =
-                            new HashMap<>(parentInfo.listing().size(), 1.0f);
+                            U.newHashMap(parentInfo.listing().size());
 
                         newListing.putAll(parentInfo.listing());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
index 5570586..648aecb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.platform.compute;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.ignite.cluster.ClusterNode;
@@ -28,6 +27,7 @@ import org.apache.ignite.compute.ComputeLoadBalancer;
 import org.apache.ignite.compute.ComputeTaskNoResultCache;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.resources.LoadBalancerResource;
 import org.jetbrains.annotations.Nullable;
 
@@ -63,7 +63,7 @@ public class PlatformBalancingMultiClosureTask extends PlatformAbstractTask
{
         assert !F.isEmpty(jobs) : "Jobs emptiness must be checked in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = new HashMap<>(jobs.size(), 1);
+            Map<ComputeJob, ClusterNode> map = U.newHashMap(jobs.size());
 
             for (PlatformJob job : jobs)
                 map.put(job, lb.getBalancedNode(job, null));

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
index 3f1d66a..a207a5c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.platform.compute;
 
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.ignite.cluster.ClusterNode;
@@ -27,6 +26,7 @@ import org.apache.ignite.compute.ComputeLoadBalancer;
 import org.apache.ignite.compute.ComputeTaskNoResultCache;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.resources.LoadBalancerResource;
 import org.jetbrains.annotations.Nullable;
 
@@ -62,7 +62,7 @@ public class PlatformBalancingSingleClosureTask extends PlatformAbstractTask
{
         assert job != null : "Job null-check must be performed in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = new HashMap<>(1, 1);
+            Map<ComputeJob, ClusterNode> map = U.newHashMap(11);
 
             map.put(job, lb.getBalancedNode(job, null));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
index d2bd0ac..227cf4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.platform.compute;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.ignite.cluster.ClusterNode;
@@ -27,6 +26,7 @@ import org.apache.ignite.compute.ComputeJob;
 import org.apache.ignite.compute.ComputeTaskNoResultCache;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -56,7 +56,7 @@ public class PlatformBroadcastingMultiClosureTask extends PlatformAbstractTask
{
         assert !F.isEmpty(jobs) : "Jobs emptiness must be checked in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = new HashMap<>(jobs.size() * subgrid.size(),
1);
+            Map<ComputeJob, ClusterNode> map = U.newHashMap(jobs.size() * subgrid.size());
 
             for (PlatformJob job : jobs) {
                 boolean first = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
index 0736988..ab82521 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.platform.compute;
 
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.ignite.cluster.ClusterNode;
@@ -26,6 +25,7 @@ import org.apache.ignite.compute.ComputeJob;
 import org.apache.ignite.compute.ComputeTaskNoResultCache;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -55,7 +55,7 @@ public class PlatformBroadcastingSingleClosureTask extends PlatformAbstractTask
         assert job != null : "Job null-check must be performed in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = new HashMap<>(subgrid.size(),
1);
+            Map<ComputeJob, ClusterNode> map = U.newHashMap(subgrid.size());
 
             boolean first = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 560d474..8af76df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -228,7 +228,7 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
          * @return Map extension interface to array of implementation.
          */
         public Map<Class<?>, Object[]> createExtensionMap() {
-            Map<Class<?>, Object[]> extensions = new HashMap<>(extensionsCollector.size()
* 2, 0.5f);
+            Map<Class<?>, Object[]> extensions = U.newHashMap(extensionsCollector.size());
 
             for (Map.Entry<Class<?>, List<Object>> entry : extensionsCollector.entrySet())
{
                 Class<?> extensionItf = entry.getKey();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 015be5c..7175446 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -22,7 +22,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.ConcurrentModificationException;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -3045,7 +3044,7 @@ public class GridFunc {
     public static <K, V> Map<K, V> zip(Collection<? extends K> keys, V
dfltVal) {
         A.notNull(keys, "keys");
 
-        Map<K, V> m = new HashMap<>(keys.size(), 1.0f);
+        Map<K, V> m = U.newHashMap(keys.size());
 
         for (K k : keys)
             m.put(k, dfltVal);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f5bd0487/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
index 68ef178..62ff304 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
@@ -19,7 +19,6 @@ package org.apache.ignite.spi.deployment.local;
 
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -231,7 +230,7 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp
 
         // Maps resources to classes.
         // Map may contain 2 entries for one class.
-        Map<String, String> regRsrcs = new HashMap<>(2, 1.0f);
+        Map<String, String> regRsrcs = U.newHashMap(2);
 
         // Check alias collision for added classes.
         String alias = null;


Mime
View raw message