Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 924A0200B46 for ; Fri, 1 Jul 2016 14:59:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 91234160A6D; Fri, 1 Jul 2016 12:59:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BD125160A5D for ; Fri, 1 Jul 2016 14:59:50 +0200 (CEST) Received: (qmail 96076 invoked by uid 500); 1 Jul 2016 12:59:50 -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 96057 invoked by uid 99); 1 Jul 2016 12:59:49 -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; Fri, 01 Jul 2016 12:59:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4F8BDFDC1; Fri, 1 Jul 2016 12:59:49 +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: Fri, 01 Jul 2016 12:59:53 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/25] ignite git commit: IGNITE-2115: Backported from master to 7.5.28. archived-at: Fri, 01 Jul 2016 12:59:51 -0000 IGNITE-2115: Backported from master to 7.5.28. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a77e6901 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a77e6901 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a77e6901 Branch: refs/heads/ignite-3154 Commit: a77e6901a4e9e9f1116698fc65e6a2ffbe68f08f Parents: 62c7143 Author: vozerov-gridgain Authored: Tue Jun 28 14:42:12 2016 +0300 Committer: vozerov-gridgain Committed: Tue Jun 28 14:42:12 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/a77e6901/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/a77e6901/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 d1f3ef5..3572293 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 @@ -114,6 +114,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; @@ -862,9 +863,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)); @@ -1085,6 +1084,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/a77e6901/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/a77e6901/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 @@ --> - - -