Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94982195B6 for ; Tue, 26 Apr 2016 06:04:39 +0000 (UTC) Received: (qmail 65423 invoked by uid 500); 26 Apr 2016 06:04:39 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 65379 invoked by uid 500); 26 Apr 2016 06:04:39 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 65366 invoked by uid 99); 26 Apr 2016 06:04:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Apr 2016 06:04:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CC04E012C; Tue, 26 Apr 2016 06:04:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.apache.org Date: Tue, 26 Apr 2016 06:04:39 -0000 Message-Id: <205b53d4c24b4c539019c8c7b2a40a96@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] ignite git commit: IGNITE-2115: Hadoop: Added warning when Hadoop module is not loaded due to enabled peer-class-loading. This closes #615. Repository: ignite Updated Branches: refs/heads/ignite-2523-1 0f282b2e6 -> 53d9c2c76 IGNITE-2115: Hadoop: Added warning when Hadoop module is not loaded due to enabled peer-class-loading. This closes #615. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97cf2b31 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97cf2b31 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97cf2b31 Branch: refs/heads/ignite-2523-1 Commit: 97cf2b31ef5a818e10e1cf838016359d6a6926ca Parents: 2ff64c2 Author: iveselovskiy Authored: Mon Apr 25 10:39:54 2016 +0300 Committer: vozerov-gridgain Committed: Mon Apr 25 10:39:54 2016 +0300 ---------------------------------------------------------------------- examples/config/filesystem/example-igfs.xml | 3 -- .../apache/ignite/internal/IgniteKernal.java | 31 ++++++++++++++++++-- modules/core/src/test/config/igfs-loopback.xml | 7 ----- modules/core/src/test/config/igfs-shmem.xml | 7 ----- 4 files changed, 28 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/97cf2b31/examples/config/filesystem/example-igfs.xml ---------------------------------------------------------------------- diff --git a/examples/config/filesystem/example-igfs.xml b/examples/config/filesystem/example-igfs.xml index 0a0b1b4..a72ddce 100644 --- a/examples/config/filesystem/example-igfs.xml +++ b/examples/config/filesystem/example-igfs.xml @@ -50,9 +50,6 @@ Configuration below demonstrates how to setup a IgniteFs node with file data. --> - - - http://git-wip-us.apache.org/repos/asf/ignite/blob/97cf2b31/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java index d6655d9..5094415 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java @@ -113,6 +113,7 @@ import org.apache.ignite.internal.processors.continuous.GridContinuousProcessor; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessor; import org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor; import org.apache.ignite.internal.processors.hadoop.Hadoop; +import org.apache.ignite.internal.processors.hadoop.HadoopNoopProcessor; import org.apache.ignite.internal.processors.job.GridJobProcessor; import org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessor; import org.apache.ignite.internal.processors.nodevalidation.DiscoveryNodeValidationProcessor; @@ -872,9 +873,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { startProcessor(new DataStreamProcessor(ctx)); startProcessor((GridProcessor)IGFS.create(ctx, F.isEmpty(cfg.getFileSystemConfiguration()))); startProcessor(new GridContinuousProcessor(ctx)); - startProcessor((GridProcessor)(cfg.isPeerClassLoadingEnabled() ? - IgniteComponentType.HADOOP.create(ctx, true): // No-op when peer class loading is enabled. - IgniteComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration() != null))); + startProcessor((GridProcessor)createHadoopComponent()); startProcessor(new DataStructuresProcessor(ctx)); startProcessor(createComponent(PlatformProcessor.class, ctx)); @@ -1105,6 +1104,32 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { } /** + * Create Hadoop component. + * + * @return Non-null Hadoop component: workable or no-op. + * @throws IgniteCheckedException if the component is mandatory and cannot be initialized. + */ + private GridComponent createHadoopComponent() throws IgniteCheckedException { + GridComponent cmp; + + if (cfg.isPeerClassLoadingEnabled()) { + cmp = IgniteComponentType.HADOOP.createIfInClassPath(ctx, false); + + if (!(cmp instanceof HadoopNoopProcessor)) { + U.warn(log, "Hadoop module is found in classpath, but it will not be started because peer class " + + "loading is enabled (set IgniteConfiguration.peerClassLoadingEnabled to \"false\" to start " + + "Hadoop module)."); + + cmp = IgniteComponentType.HADOOP.create(ctx, true/*no-op*/); + } + } + else + cmp = IgniteComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration() != null); + + return cmp; + } + + /** * Validates common configuration parameters. * * @param cfg Configuration. http://git-wip-us.apache.org/repos/asf/ignite/blob/97cf2b31/modules/core/src/test/config/igfs-loopback.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/igfs-loopback.xml b/modules/core/src/test/config/igfs-loopback.xml index c01fb98..dbbfb4e 100644 --- a/modules/core/src/test/config/igfs-loopback.xml +++ b/modules/core/src/test/config/igfs-loopback.xml @@ -54,13 +54,6 @@ --> - - - http://git-wip-us.apache.org/repos/asf/ignite/blob/97cf2b31/modules/core/src/test/config/igfs-shmem.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/igfs-shmem.xml b/modules/core/src/test/config/igfs-shmem.xml index b38544f..c4c8704 100644 --- a/modules/core/src/test/config/igfs-shmem.xml +++ b/modules/core/src/test/config/igfs-shmem.xml @@ -54,13 +54,6 @@ --> - - -