ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/4] ignite git commit: IGNITE-4755: Hadoop: print warning in case JOB_SHARED_CLASSLOADER property is enabled. This closes #1579.
Date Wed, 01 Mar 2017 07:46:22 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4705 5163b5c51 -> 8e77bc744


IGNITE-4755: Hadoop: print warning in case JOB_SHARED_CLASSLOADER property is enabled. This
closes #1579.


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

Branch: refs/heads/ignite-4705
Commit: 50f87419e8876c79303d67008619a7d4796286c6
Parents: 3ca46d1
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Tue Feb 28 15:35:17 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Tue Feb 28 15:35:17 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/hadoop/impl/v2/HadoopV2Job.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50f87419/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Job.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Job.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Job.java
index 5d3f22d..2a85cb8 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Job.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Job.java
@@ -124,6 +124,9 @@ public class HadoopV2Job extends HadoopJobEx {
     /** File system cache map. */
     private final HadoopLazyConcurrentMap<FsCacheKey, FileSystem> fsMap = createHadoopLazyConcurrentMap();
 
+    /** Logger. */
+    private final IgniteLogger log;
+
     /** Shared class loader. */
     private volatile HadoopClassLoader sharedClsLdr;
 
@@ -151,6 +154,7 @@ public class HadoopV2Job extends HadoopJobEx {
         this.jobInfo = jobInfo;
         this.libNames = libNames;
         this.helper = helper;
+        this.log = log;
 
         ClassLoader oldLdr = HadoopCommonUtils.setContextClassLoader(getClass().getClassLoader());
 
@@ -323,8 +327,12 @@ public class HadoopV2Job extends HadoopJobEx {
         try {
             rsrcMgr.prepareJobEnvironment(!external, jobLocalDir(igniteWorkDirectory(), locNodeId,
jobId));
 
-            if (HadoopJobProperty.get(jobInfo, JOB_SHARED_CLASSLOADER, true))
+            if (HadoopJobProperty.get(jobInfo, JOB_SHARED_CLASSLOADER, true)) {
+                U.warn(log, JOB_SHARED_CLASSLOADER.propertyName() + " job property is set
to true; please disable " +
+                    "it if job tasks rely on mutable static state.");
+
                 sharedClsLdr = createClassLoader(HadoopClassLoader.nameForJob(jobId));
+            }
         }
         finally {
             HadoopCommonUtils.restoreContextClassLoader(oldLdr);


Mime
View raw message