ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [05/50] [abbrv] incubator-ignite git commit: ignite-370 review
Date Fri, 13 Mar 2015 13:09:10 GMT
ignite-370 review


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

Branch: refs/heads/ignite-gg-9858
Commit: 98b6643f74b34bf68f0b417687ff2d06e85acf35
Parents: ebfbcc4
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Wed Mar 11 18:43:33 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Wed Mar 11 18:43:33 2015 +0300

----------------------------------------------------------------------
 .../datastreamer/DataStreamerImpl.java          | 26 +++++++++-----------
 1 file changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98b6643f/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index c79268a..dd8df35 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -294,20 +294,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K,
V>, Delayed
 
     /** {@inheritDoc} */
     @Override public boolean allowOverwrite() {
-        boolean allow = updater != ISOLATED_UPDATER;
-
-        if (!allow && !isWarningPrinted) {
-            synchronized (this) {
-                if (!isWarningPrinted) {
-                    log.warning("Data streamer will not overwrite existing cache entries
for better performance " +
-                        "(to change, set allowOverwrite to true)");
-
-                    isWarningPrinted = true;
-                }
-            }
-        }
-
-        return allow;
+        return updater != ISOLATED_UPDATER;
     }
 
     /** {@inheritDoc} */
@@ -524,6 +511,17 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K,
V>, Delayed
     ) {
         assert entries != null;
 
+        if (!isWarningPrinted) {
+            synchronized (this) {
+                if (!allowOverwrite() && !isWarningPrinted) {
+                    U.warn(log, "Data streamer will not overwrite existing cache entries
for better performance " +
+                        "(to change, set allowOverwrite to true)");
+                }
+
+                isWarningPrinted = true;
+            }
+        }
+
         Map<ClusterNode, Collection<DataStreamerEntry>> mappings = new HashMap<>();
 
         boolean initPda = ctx.deploy().enabled() && jobPda == null;


Mime
View raw message