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 5DD6217DBF for ; Fri, 29 May 2015 07:06:42 +0000 (UTC) Received: (qmail 41232 invoked by uid 500); 29 May 2015 07:06:42 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 41202 invoked by uid 500); 29 May 2015 07:06:42 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 41190 invoked by uid 99); 29 May 2015 07:06:42 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2015 07:06:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BDC6CC0B79 for ; Fri, 29 May 2015 07:06:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.791 X-Spam-Level: * X-Spam-Status: No, score=1.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id pyENlOJvamcJ for ; Fri, 29 May 2015 07:06:30 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 0A9F125496 for ; Fri, 29 May 2015 07:06:26 +0000 (UTC) Received: (qmail 37818 invoked by uid 99); 29 May 2015 07:06:24 -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, 29 May 2015 07:06:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4FE90E1121; Fri, 29 May 2015 07:06:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Fri, 29 May 2015 07:06:33 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [10/50] incubator-ignite git commit: #IGNITE-857 WIP. #IGNITE-857 WIP. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/daac03ee Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/daac03ee Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/daac03ee Branch: refs/heads/ignite-471-2 Commit: daac03eedbd47f615af06285e8ad6934a5586729 Parents: c462a0f Author: nikolay tikhonov Authored: Tue May 26 09:01:57 2015 +0300 Committer: nikolay tikhonov Committed: Tue May 26 09:01:57 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/mesos/IgniteFramework.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/daac03ee/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteFramework.java ---------------------------------------------------------------------- diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteFramework.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteFramework.java index 6cc43b1..b385bc9 100644 --- a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteFramework.java +++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteFramework.java @@ -23,6 +23,7 @@ import org.apache.mesos.*; import org.glassfish.grizzly.http.server.*; import org.glassfish.jersey.grizzly2.httpserver.*; import org.glassfish.jersey.server.*; +import org.slf4j.*; import java.net.*; @@ -30,7 +31,10 @@ import java.net.*; * Ignite mesos framework. */ public class IgniteFramework { + /** */ + public static final Logger log = LoggerFactory.getLogger(IgniteFramework.class); + /** Framework name. */ public static final String IGNITE_FRAMEWORK_NAME = "Ignite"; /** @@ -48,11 +52,12 @@ public class IgniteFramework { .setFailoverTimeout(frameworkFailoverTimeout); if (System.getenv("MESOS_CHECKPOINT") != null) { - System.out.println("Enabling checkpoint for the framework"); + log.info("Enabling checkpoint for the framework"); + frameworkBuilder.setCheckpoint(true); } - ClusterProperties clusterProps = ClusterProperties.from(args.length == 1 ? args[0] : null); + ClusterProperties clusterProps = ClusterProperties.from(args.length >= 1 ? args[0] : null); String baseUrl = String.format("http://%s:%d", clusterProps.httpServerHost(), clusterProps.httpServerPort()); @@ -60,7 +65,7 @@ public class IgniteFramework { ResourceConfig rc = new ResourceConfig() .registerInstances(new ResourceController(clusterProps.userLibs(), clusterProps.igniteCfg(), - clusterProps.igniteWorkDir())); + clusterProps.igniteWorkDir())); HttpServer httpServer = GrizzlyHttpServerFactory.createHttpServer(httpServerBaseUri, rc); @@ -76,15 +81,17 @@ public class IgniteFramework { // create the driver MesosSchedulerDriver driver; if (System.getenv("MESOS_AUTHENTICATE") != null) { - System.out.println("Enabling authentication for the framework"); + log.info("Enabling authentication for the framework"); if (System.getenv("DEFAULT_PRINCIPAL") == null) { - System.err.println("Expecting authentication principal in the environment"); + log.error("Expecting authentication principal in the environment"); + System.exit(1); } if (System.getenv("DEFAULT_SECRET") == null) { - System.err.println("Expecting authentication secret in the environment"); + log.error("Expecting authentication secret in the environment"); + System.exit(1); }