Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67314173D4 for ; Fri, 15 May 2015 13:10:20 +0000 (UTC) Received: (qmail 50421 invoked by uid 500); 15 May 2015 13:10:20 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 50379 invoked by uid 500); 15 May 2015 13:10:20 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 50362 invoked by uid 99); 15 May 2015 13:10:20 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 13:10:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BA42218283E for ; Fri, 15 May 2015 13:10:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.991 X-Spam-Level: X-Spam-Status: No, score=0.991 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Yar12Gpx0g9O for ; Fri, 15 May 2015 13:10:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id E2ED04545A for ; Fri, 15 May 2015 13:10:01 +0000 (UTC) Received: (qmail 49623 invoked by uid 99); 15 May 2015 13:10:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 13:10:01 +0000 Date: Fri, 15 May 2015 13:10:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@brooklyn.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-143) Add support for Hazelcast MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BROOKLYN-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545458#comment-14545458 ] ASF GitHub Bot commented on BROOKLYN-143: ----------------------------------------- Github user ygy commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/642#discussion_r30406354 --- Diff: sandbox/nosql/src/main/java/brooklyn/entity/nosql/hazelcast/HazelcastNode.java --- @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package brooklyn.entity.nosql.hazelcast; + +import brooklyn.catalog.Catalog; +import brooklyn.config.ConfigKey; +import brooklyn.entity.basic.ConfigKeys; +import brooklyn.entity.basic.SoftwareProcess; +import brooklyn.entity.java.UsesJava; +import brooklyn.entity.java.UsesJmx; +import brooklyn.entity.proxying.ImplementedBy; +import brooklyn.event.basic.BasicAttributeSensorAndConfigKey; +import brooklyn.event.basic.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey; +import brooklyn.util.flags.SetFromFlag; +import brooklyn.util.javalang.JavaClassNames; + +/** + * An {@link brooklyn.entity.Entity} that represents an Hazelcast node + */ +@Catalog(name="Hazelcast Node", description="Hazelcast is a clustering and highly scalable data distribution platform for Java.") + +@ImplementedBy(HazelcastNodeImpl.class) +public interface HazelcastNode extends SoftwareProcess, UsesJava, UsesJmx { + @SetFromFlag("version") + ConfigKey SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "3.4.2"); + + @SetFromFlag("downloadUrl") + BasicAttributeSensorAndConfigKey DOWNLOAD_URL = new BasicAttributeSensorAndConfigKey( + SoftwareProcess.DOWNLOAD_URL, "https://repo1.maven.org/maven2/com/hazelcast/hazelcast/${version}/hazelcast-${version}.jar"); + + @SetFromFlag("configFileUrl") + ConfigKey TEMPLATE_CONFIGURATION_URL = ConfigKeys.newStringConfigKey( + "hazelcast.node.template.configuration.url", "Template file (in freemarker format) for the hazelcast.xml file", + JavaClassNames.resolveClasspathUrl(HazelcastNode.class, "hazelcast-brooklyn.xml")); + + @SetFromFlag("nodeName") + StringAttributeSensorAndConfigKey NODE_NAME = new StringAttributeSensorAndConfigKey("hazelcast.node.name", + "Node name (or randomly selected if not set", null); + + @SetFromFlag("clusterName") + StringAttributeSensorAndConfigKey CLUSTER_NAME = new StringAttributeSensorAndConfigKey("hazelcast.node.cluster.name", + "Cluster name", null); --- End diff -- Thanks for the remark. A single JVM can run multiple Hazelcast instances. They are specified in the `````` element of the configuration file. ```hazelcast.node.cluster.name``` was intended to be used as `````` value in the `````` element. Often group and cluster names names are identical. Indeed, current constant's name may lead to inconsistency. I will rename it and properly document the new one. > Add support for Hazelcast > ------------------------- > > Key: BROOKLYN-143 > URL: https://issues.apache.org/jira/browse/BROOKLYN-143 > Project: Brooklyn > Issue Type: New Feature > Reporter: Yavor Yanchev > Priority: Minor > > Hazelcast is a clustering and highly scalable data distribution platform for Java. > Some of the features it provides > Distributed java.util.{Queue, Set, List, Map} > Distributed java.util.concurrency.locks.Lock > Distributed java.util.concurrent.ExecutorService > Distributed Indexing and Query support -- This message was sent by Atlassian JIRA (v6.3.4#6332)