[rhq] Branch 'bug/rhq-1' - modules/enterprise
by mazz
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java | 40 +++++++++-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java | 25 +++---
2 files changed, 49 insertions(+), 16 deletions(-)
New commits:
commit 2b5f6f69c6a31e157fb7a76e7f0168a5ad974150
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Mar 21 15:53:45 2013 -0400
BZ 535289 - the server will now return all ignored types in the result object from mergeinventoryreport.
this way, the agent will know about all ignored types, not just the types
of resources that were in the report
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
index 66d6d82..137e76f 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
@@ -28,6 +28,7 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.sql.Connection;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@@ -57,6 +58,7 @@ import org.rhq.core.clientapi.agent.discovery.DiscoveryAgentService;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.discovery.MergeInventoryReportResults;
+import org.rhq.core.domain.discovery.MergeInventoryReportResults.ResourceTypeFlyweight;
import org.rhq.core.domain.discovery.MergeResourceResponse;
import org.rhq.core.domain.discovery.ResourceSyncInfo;
import org.rhq.core.domain.resource.Agent;
@@ -332,8 +334,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
assert platformSyncInfo != null;
assertNotNull(mergeResults.getIgnoredResourceTypes());
assertEquals(mergeResults.getIgnoredResourceTypes().size(), 1);
- assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getName(), serverType.getName());
- assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getPlugin(), serverType.getPlugin());
+ assert mergeResults.getIgnoredResourceTypes().contains(new ResourceTypeFlyweight(serverType));
// Check merge result - make sure we should not see any children under the platform (it should have been ignored)
assertEquals(InventoryStatus.NEW, platformSyncInfo.getInventoryStatus());
@@ -341,6 +342,38 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
}
@Test(groups = "integration.ejb3")
+ public void testReturnAllIgnoredResourceTypes() throws Exception {
+
+ // ignore the service types immediately
+ resourceTypeManager.setResourceTypeIgnoreFlagAndUninventoryResources(subjectManager.getOverlord(),
+ serviceType1.getId(), true);
+ resourceTypeManager.setResourceTypeIgnoreFlagAndUninventoryResources(subjectManager.getOverlord(),
+ serviceType2.getId(), true);
+
+ // create an inventory report with just a platform and a server
+ InventoryReport inventoryReport = new InventoryReport(agent);
+ Resource platform = new Resource("platform", "platform", platformType);
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ Resource server = new Resource("server0", "server0", serverType);
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ platform.addChildResource(server);
+ inventoryReport.addAddedRoot(platform);
+
+ // Merge this inventory report
+ MergeInventoryReportResults mergeResults = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
+ assert mergeResults != null;
+ ResourceSyncInfo platformSyncInfo = mergeResults.getResourceSyncInfo();
+ assert platformSyncInfo != null;
+
+ // now see that we were told about the service types being ignored (even though we had no resources of that type in the report)
+ Collection<ResourceTypeFlyweight> ignoredResourceTypes = mergeResults.getIgnoredResourceTypes();
+ assertNotNull(ignoredResourceTypes);
+ assertEquals(ignoredResourceTypes.size(), 2);
+ assert ignoredResourceTypes.contains(new ResourceTypeFlyweight(serviceType1));
+ assert ignoredResourceTypes.contains(new ResourceTypeFlyweight(serviceType2));
+ }
+
+ @Test(groups = "integration.ejb3")
public void testIgnoreResourceTypeAndUninventoryResources() throws Exception {
// First create an inventory report for a new platform with servers - nothing is ignored yet
@@ -402,8 +435,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
assert platformSyncInfo != null;
assertNotNull(mergeResults.getIgnoredResourceTypes());
assertEquals(mergeResults.getIgnoredResourceTypes().size(), 1);
- assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getName(), serverType.getName());
- assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getPlugin(), serverType.getPlugin());
+ assert mergeResults.getIgnoredResourceTypes().contains(new ResourceTypeFlyweight(serverType));
assertEquals(InventoryStatus.COMMITTED, platformSyncInfo.getInventoryStatus()); // notice platform is committed now
assertEquals(platformSyncInfo.getChildSyncInfos().size(), 0); // notice there are no server children now
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java
index 5d99d68..e14baf0 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java
@@ -64,6 +64,7 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.discovery.MergeInventoryReportResults;
import org.rhq.core.domain.discovery.MergeResourceResponse;
import org.rhq.core.domain.discovery.ResourceSyncInfo;
@@ -192,13 +193,12 @@ public class DiscoveryBossBean implements DiscoveryBossLocal, DiscoveryBossRemot
log.debug(report);
final Map<String, ResourceType> allTypes = new HashMap<String, ResourceType>();
- final Set<ResourceType> ignoredTypes = new HashSet<ResourceType>();
for (Resource root : roots) {
// Make sure all platform, server, and service types are valid. Also, make sure they're fetched - otherwise
// we'll get persistence exceptions when we try to merge OR persist the platform.
long rootStart = System.currentTimeMillis();
- if (!initResourceTypes(root, allTypes, ignoredTypes)) {
+ if (!initResourceTypes(root, allTypes)) {
continue;
}
@@ -225,6 +225,14 @@ public class DiscoveryBossBean implements DiscoveryBossLocal, DiscoveryBossRemot
// a chance yet to send us its full inventory report.
ResourceSyncInfo syncInfo = discoveryBoss.getResourceSyncInfo(knownAgent);
+ // we need to also tell the agent if there were any ignored types - we must provide the agent with
+ // ALL types that are ignored, not just for those resources that were in the report
+ ResourceTypeCriteria ignoredTypesCriteria = new ResourceTypeCriteria();
+ ignoredTypesCriteria.addFilterIgnored(true);
+ ignoredTypesCriteria.setPageControl(PageControl.getUnlimitedInstance());
+ PageList<ResourceType> ignoredTypes = resourceTypeManager.findResourceTypesByCriteria(
+ subjectManager.getOverlord(), ignoredTypesCriteria);
+
MergeInventoryReportResults results;
if (syncInfo != null) {
results = new MergeInventoryReportResults(syncInfo, ignoredTypes);
@@ -1086,7 +1094,7 @@ public class DiscoveryBossBean implements DiscoveryBossLocal, DiscoveryBossRemot
private boolean initResourceTypes(Resource resource) {
final HashMap<String, ResourceType> types = new HashMap<String, ResourceType>();
try {
- return initResourceTypes(resource, types, null);
+ return initResourceTypes(resource, types);
} finally {
types.clear(); // help GC
}
@@ -1096,13 +1104,9 @@ public class DiscoveryBossBean implements DiscoveryBossLocal, DiscoveryBossRemot
* recursively assign (detached) ResourceType entities to the resource tree
* @param resource
* @param loadedTypeMap Empty map to start, filled as we go to minimize DB fetches
- * @param ignoredTypes If the caller wants to be told about resource types that are to be ignored,
- * pass in a set to be filled in. This is optional - if the caller passes in null,
- * the ignored types are not captured for the caller.
* @return false if a resource's type is unknown; true if all types were successfully loaded
*/
- private boolean initResourceTypes(Resource resource, Map<String, ResourceType> loadedTypeMap,
- Set<ResourceType> ignoredTypes) {
+ private boolean initResourceTypes(Resource resource, Map<String, ResourceType> loadedTypeMap) {
String plugin = resource.getResourceType().getPlugin();
String name = resource.getResourceType().getName();
@@ -1132,15 +1136,12 @@ public class DiscoveryBossBean implements DiscoveryBossLocal, DiscoveryBossRemot
// don't bother looking at the children if we are just going to ignore this resource
if (resourceType.isIgnored()) {
- if (ignoredTypes != null) {
- ignoredTypes.add(resourceType);
- }
return true;
}
for (Iterator<Resource> childIterator = resource.getChildResources().iterator(); childIterator.hasNext();) {
Resource child = childIterator.next();
- if (!initResourceTypes(child, loadedTypeMap, ignoredTypes)) {
+ if (!initResourceTypes(child, loadedTypeMap)) {
childIterator.remove();
}
}
11 years, 2 months
[rhq] Branch 'stefan/version' - modules/core modules/enterprise modules/plugins pom.xml
by snegrea
modules/core/client-api/pom.xml | 1
modules/core/domain/pom.xml | 4 ---
modules/enterprise/gui/content_http-war/pom.xml | 1
modules/enterprise/gui/portal-war/pom.xml | 2 -
modules/enterprise/server/jar/pom.xml | 4 ---
modules/enterprise/server/plugins/jboss-software/pom.xml | 2 -
modules/enterprise/server/plugins/url/pom.xml | 1
modules/enterprise/server/sars/agent-sar/pom.xml | 2 -
modules/enterprise/server/sars/services-sar/pom.xml | 19 ---------------
modules/enterprise/server/xml-schemas/pom.xml | 1
modules/plugins/apache/pom.xml | 1
modules/plugins/jboss-as-7/pom.xml | 1
modules/plugins/netservices/pom.xml | 2 -
modules/plugins/perftest/pom.xml | 1
pom.xml | 18 ++++++++++++++
15 files changed, 18 insertions(+), 42 deletions(-)
New commits:
commit 6dd80cae4df923b2118936951d6fdbb0006b8294
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Mar 21 13:24:48 2013 -0500
[BZ 923458] More maven dependency and plugin version updates.
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index a4f4b9e..c03f268 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -60,7 +60,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index cf1478c..f14157e 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -152,14 +152,12 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
<scope>test</scope>
</dependency>
@@ -193,7 +191,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -471,7 +468,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
diff --git a/modules/enterprise/gui/content_http-war/pom.xml b/modules/enterprise/gui/content_http-war/pom.xml
index d7fa4dc..19208e8 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -86,7 +86,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index cd06520..6c12259 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -93,7 +93,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -277,7 +276,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index dafce83..b86af52 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -188,7 +188,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
@@ -274,7 +273,6 @@
<dependency>
<groupId>org.jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
- <version>${jboss-jts.version}</version>
<scope>provided</scope>
</dependency>
@@ -442,7 +440,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
- <version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<generateClient>true</generateClient>
@@ -567,7 +564,6 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml b/modules/enterprise/server/plugins/jboss-software/pom.xml
index 3d31342..33a11a1 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope>
</dependency>
@@ -40,7 +39,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index f677d6a..5660473 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -43,7 +43,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index 2b7b2ff..6f2cc2e 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -42,8 +42,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <!-- make sure you match that which is used by standalone agent! -->
- <version>2.0.2</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml b/modules/enterprise/server/sars/services-sar/pom.xml
index 413c681..4586a8b 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -21,25 +21,6 @@
<build>
<finalName>rhq-enterprise-server-services-sar</finalName>
-
- <!-- we don't need this right now - only if we need deps stored in the sar META-INF/lib/ will we need this -->
- <!-- NOTE: extensions=true below allows Maven to grok the jboss-sar packaging type -->
- <!--
- <plugins>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>1.9.99</version>
- <extensions>true</extensions>
- <configuration>
- <libDirectory>${sarDirectory}/META-INF/lib</libDirectory>
- </configuration>
- </plugin>
-
- </plugins>
- -->
-
<resources>
<resource>
<directory>src/main/resources</directory>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index 9c1bfdd..98783f1 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -44,7 +44,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index afb704a..3f6bca5 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -62,7 +62,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 48d0ace..1a5f119 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -71,7 +71,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 7dbc614..22db736 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
@@ -140,7 +139,6 @@
<artifactItem>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</artifactItem>
<artifactItem>
<groupId>commons-codec</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 7ccffa7..593a70b 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -33,7 +33,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/pom.xml b/pom.xml
index 17ccf62..b849d13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -441,6 +441,12 @@
<version>${commons-configuration.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${commons-httpclient.version}</version>
+ </dependency>
+
<!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
<dependency>
<groupId>gnu-getopt</groupId>
@@ -1011,6 +1017,18 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
+
+ <plugin>
+ <groupId>com.sun.tools.xjc.maven2</groupId>
+ <artifactId>maven-jaxb-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+ <version>3.2</version>
+ </plugin>
</plugins>
</pluginManagement>
11 years, 2 months
[rhq] Branch 'stefan/version' - 2 commits - etc/augeas-utils modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/plugins modules/test-utils pom.xml
by snegrea
etc/augeas-utils/pom.xml | 5
modules/common/ant-bundle/pom.xml | 1
modules/core/dbutils/pom.xml | 2
modules/core/native-system/pom.xml | 1
modules/core/plugin-container/pom.xml | 1
modules/core/plugin-test-util/pom.xml | 1
modules/core/plugin-validator/pom.xml | 1
modules/core/plugindoc/pom.xml | 1
modules/core/util/pom.xml | 1
modules/enterprise/agent/pom.xml | 3
modules/enterprise/agentupdate/pom.xml | 2
modules/enterprise/comm/pom.xml | 1
modules/enterprise/gui/portal-war/pom.xml | 2
modules/enterprise/gui/remoting-war/pom.xml | 1
modules/enterprise/gui/rest-examples-war/pom.xml | 1
modules/enterprise/gui/rest-war/pom.xml | 1
modules/enterprise/remoting/client-deps/pom.xml | 47 ++++----
modules/enterprise/scripting/api/pom.xml | 1
modules/enterprise/scripting/javascript/pom.xml | 1
modules/enterprise/scripting/python/pom.xml | 1
modules/enterprise/server/appserver/pom.xml | 1
modules/enterprise/server/ear/pom.xml | 1
modules/enterprise/server/installer/pom.xml | 1
modules/enterprise/server/jar/pom.xml | 3
modules/enterprise/server/plugins/alert-operations/pom.xml | 1
modules/enterprise/server/plugins/ant-bundle/pom.xml | 1
modules/enterprise/server/plugins/drift-mongodb/pom.xml | 1
modules/enterprise/server/plugins/groovy-script/pom.xml | 13 +-
modules/enterprise/server/sars/agent-sar/pom.xml | 2
modules/helpers/bundleGen/pom.xml | 1
modules/helpers/inventory-serializer/pom.xml | 1
modules/helpers/perftest-support/pom.xml | 1
modules/helpers/pluginGen/pom.xml | 2
modules/integration-tests/jndi-access/remote-server/pom.xml | 1
modules/integration-tests/mod_cluster-plugin-test/pom.xml | 1
modules/plugins/aliases/pom.xml | 1
modules/plugins/ant-bundle/pom.xml | 1
modules/plugins/apache/pom.xml | 1
modules/plugins/augeas/pom.xml | 3
modules/plugins/cobbler/pom.xml | 3
modules/plugins/cron/pom.xml | 1
modules/plugins/grub/pom.xml | 1
modules/plugins/hosts/pom.xml | 1
modules/plugins/mod-cluster/pom.xml | 1
modules/plugins/postfix/pom.xml | 1
modules/plugins/raw-config-test/pom.xml | 9 -
modules/plugins/samba/pom.xml | 1
modules/plugins/sshd/pom.xml | 1
modules/plugins/sudoers/pom.xml | 1
modules/test-utils/pom.xml | 3
pom.xml | 65 ++++++++++--
51 files changed, 91 insertions(+), 109 deletions(-)
New commits:
commit 1308cc9399c63b7f68c89c62619e9f91014c8ed8
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Mar 21 12:22:58 2013 -0500
[BZ 923458] A new set of updates for the maven dependency and plugin versions.
diff --git a/etc/augeas-utils/pom.xml b/etc/augeas-utils/pom.xml
index 8355748..ca5c540 100644
--- a/etc/augeas-utils/pom.xml
+++ b/etc/augeas-utils/pom.xml
@@ -28,10 +28,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
+ <version>2.3.2</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
</configuration>
</plugin>
</plugins>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 412eab2..41351ed 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -79,7 +79,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
@@ -451,7 +450,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
</plugin>
</plugins>
</build>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 21f1c48..04be12b 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -47,7 +47,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index a47cc57..c3c7175 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -118,7 +118,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 8e7d819..d1200f6 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -224,7 +224,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -243,7 +242,6 @@ Build-Number=${buildNumber}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
@@ -285,7 +283,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index ba0d852..3b66b92 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -135,7 +135,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -204,7 +203,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 4adb84e..822d405 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -156,7 +156,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
</reporting>
diff --git a/modules/enterprise/gui/remoting-war/pom.xml b/modules/enterprise/gui/remoting-war/pom.xml
index c4b63bf..9570336 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -39,7 +39,6 @@
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml b/modules/enterprise/gui/rest-examples-war/pom.xml
index 87354d1..2a5091c 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 1b5349c..0797145 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -59,7 +59,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/scripting/api/pom.xml b/modules/enterprise/scripting/api/pom.xml
index 5fdffe3..07768cd 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -41,7 +41,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index 208076a..b1d6553 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -87,7 +87,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index ab12edf..8e7ff39 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -86,7 +86,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/server/appserver/pom.xml b/modules/enterprise/server/appserver/pom.xml
index 2ffdc7c..dc6bbb3 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -67,7 +67,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/installer/pom.xml b/modules/enterprise/server/installer/pom.xml
index 83b8977..5e5cdd1 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -83,7 +83,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 3b08f01..24813ad 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -29,7 +29,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<!-- Generate tokens.xml file -->
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index b46e9a7..ea20099 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Groovy Script Plugin</name>
@@ -19,7 +19,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -27,7 +26,7 @@
<version>1.7.1</version>
</dependency>
<dependency>
- <groupId>quartz</groupId>
+ <groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<scope>test</scope>
</dependency>
@@ -53,6 +52,10 @@
<artifactId>reflections</artifactId>
<version>0.9.5-RC2</version>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -107,7 +110,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index dc89db0..c615a39 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -6,7 +6,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.plugins</groupId>
@@ -28,13 +28,11 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</dependency>
</dependencies>
@@ -43,7 +41,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
@@ -68,7 +65,6 @@
<artifactItem>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.ant</groupId>
@@ -83,7 +79,6 @@
<artifactItem>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
diff --git a/pom.xml b/pom.xml
index 06379f1..17ccf62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,12 +155,15 @@
<commons-codec.version>1.4</commons-codec.version>
<commons-validator.version>1.1.4</commons-validator.version>
<commons-collections.version>3.2.1</commons-collections.version>
+ <commons-configuration.version>1.6</commons-configuration.version>
<junit.version>4.8.2</junit.version>
<liquibase-core.version>1.9.5</liquibase-core.version>
<jbpm.version>3.1.1</jbpm.version>
<servlet-api.version>2.4</servlet-api.version>
+ <mockito-core.version>1.9.0</mockito-core.version>
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -432,6 +435,12 @@
<version>${commons-collections.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>${commons-configuration.version}</version>
+ </dependency>
+
<!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
<dependency>
<groupId>gnu-getopt</groupId>
@@ -699,6 +708,12 @@
</dependency>
<dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>${mockito-core.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
<version>${powermock.version}</version>
@@ -910,6 +925,10 @@
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
</plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!-- === Codehaus Mojo Plugins === -->
<plugin>
@@ -927,7 +946,7 @@
<artifactId>exec-maven-plugin</artifactId>
<!-- NOTE: Version 1.2 of this plugin appears to be broken, so do not
upgrade to that version. -->
- <version>1.1</version>
+ <version>1.2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -960,6 +979,12 @@
<version>1.0</version>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+
<plugin>
<groupId>com.googlecode.maven-overview-plugin</groupId>
<artifactId>maven-overview-plugin</artifactId>
@@ -1874,8 +1899,13 @@
<reportSets>
<reportSet>
</reportSet>
- </reportSets>
- </plugin>
+ </reportSets>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!--
<plugin>
commit fb84b4e89772479851ce4c6403d7cce6a170d761
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Mar 20 15:40:30 2013 -0500
[BZ 923458] More maven dependencies version cleanup.
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 2d2b500..4cf6703 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -72,7 +72,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
<scope>runtime</scope> <!-- needs to be runtime otherwise it will not be included by assembly plugin -->
<exclusions>
<exclusion>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 8bff199..06395a2 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -82,7 +82,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
diff --git a/modules/core/plugin-test-util/pom.xml b/modules/core/plugin-test-util/pom.xml
index dbb97fe..c75dcbc 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index fc8ff80..d05b721 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index ff2a247..b799891 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -42,7 +42,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index f419d8b..cd06520 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -70,7 +70,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
@@ -113,7 +112,6 @@
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<!-- used by a test JSP -->
diff --git a/modules/enterprise/remoting/client-deps/pom.xml b/modules/enterprise/remoting/client-deps/pom.xml
index 006a9a6..61b7c19 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -18,19 +18,19 @@
<groupId>${project.groupId}</groupId>
<artifactId>rhq-remoting-client-api</artifactId>
<version>${project.version}</version>
- <exclusions>
+ <exclusions>
<exclusion>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- </exclusion>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ </exclusion>
<exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
<exclusion>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
@@ -50,21 +50,20 @@
<artifactId>concurrent</artifactId>
<version>1.3.4-jboss-update1</version>
</dependency>
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>1.0.10</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ </dependencies>
</project>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index a6cc2c7..939f107 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -169,7 +169,6 @@
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
- <version>${quartz.version}</version>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index a56ef2d..dafce83 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -168,7 +168,6 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>${infinispan.version}</version>
<scope>provided</scope>
</dependency>
@@ -184,7 +183,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
@@ -202,7 +200,6 @@
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 489b37b..4226e21 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -94,7 +94,6 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index ed72fd0..39d7127 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -74,7 +74,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index e96cbf6..b46e9a7 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -29,7 +29,6 @@
<dependency>
<groupId>quartz</groupId>
<artifactId>quartz</artifactId>
- <version>1.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index 05cd715..2b7b2ff 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -31,14 +31,12 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.2.14</version>
</dependency>
<dependency>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index a908a0f..82fabfc 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -17,7 +17,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/helpers/inventory-serializer/pom.xml b/modules/helpers/inventory-serializer/pom.xml
index a42effa..993250b 100644
--- a/modules/helpers/inventory-serializer/pom.xml
+++ b/modules/helpers/inventory-serializer/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index eb9fbb3..4136b47 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -46,7 +46,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index f7f04ba..372c627 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -24,7 +24,6 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -72,7 +71,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml b/modules/integration-tests/jndi-access/remote-server/pom.xml
index fd7e312..b28b9bf 100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -38,7 +38,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
</dependency>
</dependencies>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index ad8df87..b3370a3 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -75,7 +75,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index a7a4469..14874eb 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 9c3e48d..0c750b6 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -66,7 +66,6 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 2ca9086..afb704a 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 9a8acb4..4e663e6 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -39,13 +39,11 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
@@ -196,7 +194,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 8321f4e..c01634b 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
@@ -38,7 +37,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
@@ -271,7 +269,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 6ed701b..27f290b 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index d77acf5..4a3ad1d 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 467397e..9ca39d3 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 804b04a..62ffc81 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -40,7 +40,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 69a3b7d..6ee7474 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 80bf531..dc89db0 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -88,12 +88,10 @@
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
</artifactItem>
<artifactItem>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</artifactItem>
<artifactItem>
<groupId>commons-logging</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index a392c58..23dadb6 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 92e76ef..93856c9 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 053fac0..d10ef73 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index ee5bbfd..07e3aa1 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -27,7 +27,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -84,7 +83,7 @@
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-testng</artifactId>
- <version>3.1</version>
+ <version>3.1</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
diff --git a/pom.xml b/pom.xml
index e8b893b..06379f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,7 +121,7 @@
<i18nlog.version>1.0.10</i18nlog.version>
<jsf-api.version>1.2_14</jsf-api.version>
<jsf-impl.version>1.2_14</jsf-impl.version>
- <log4j.version>1.2.16</log4j.version>
+ <log4j.version>1.2.14</log4j.version>
<ojdbc6.version>11.2.0.3.0</ojdbc6.version>
<ems.version>1.3</ems.version>
<postgresql.version>9.2-1002.jdbc4</postgresql.version>
@@ -153,6 +153,8 @@
<commons-io.version>1.4</commons-io.version>
<commons-lang.version>2.4</commons-lang.version>
<commons-codec.version>1.4</commons-codec.version>
+ <commons-validator.version>1.1.4</commons-validator.version>
+ <commons-collections.version>3.2.1</commons-collections.version>
<junit.version>4.8.2</junit.version>
<liquibase-core.version>1.9.5</liquibase-core.version>
@@ -418,6 +420,18 @@
<version>${commons-codec.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>${commons-validator.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${commons-collections.version}</version>
+ </dependency>
+
<!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
<dependency>
<groupId>gnu-getopt</groupId>
@@ -638,7 +652,7 @@
<artifactId>jboss-javaee-6.0</artifactId>
<version>${jboss.javaee6.spec.version}</version>
<type>pom</type>
- <scope>import</scope>
+ <scope>import,provided</scope>
</dependency>
<!-- We want the shrinkwrap dependency resolver to be newer than that included in the Arquillian BOM.
@@ -711,9 +725,14 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
- </dependency>
+ <version>${testng.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -774,7 +793,7 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
+ <version>${ant.contrib.version}</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - modules/enterprise
by mazz
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java | 108 ++++++++++
1 file changed, 108 insertions(+)
New commits:
commit e02664b42786205fc31dec2e5b17dcea778b60b3
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Mar 21 12:55:21 2013 -0400
[BZ 535289] unit tests to make sure ignoring types works and resources are uninventoried properly
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
index 7f78f75..66d6d82 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
@@ -27,6 +27,7 @@ import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.sql.Connection;
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@@ -62,9 +63,12 @@ import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.collection.ArrayUtils;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.test.TestServerCommunicationsService;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -81,6 +85,8 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
private ResourceManagerLocal resourceManager;
+ private ResourceTypeManagerLocal resourceTypeManager;
+
private ResourceType platformType;
private ResourceType serverType;
@@ -98,6 +104,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
discoveryBoss = LookupUtil.getDiscoveryBoss();
subjectManager = LookupUtil.getSubjectManager();
resourceManager = LookupUtil.getResourceManager();
+ resourceTypeManager = LookupUtil.getResourceTypeManager();
initDB();
@@ -262,6 +269,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
// Merge this inventory report
MergeInventoryReportResults mergeResults = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
assert mergeResults != null;
+ assert mergeResults.getIgnoredResourceTypes() == null : "nothing should have been ignored";
ResourceSyncInfo platformSyncInfo = mergeResults.getResourceSyncInfo();
assert platformSyncInfo != null;
@@ -301,6 +309,106 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
discoveryBoss.importResources(subjectManager.getOverlord(), arrayOfServerIds);
}
+ @Test(groups = "integration.ejb3")
+ public void testIgnoreResourceType() throws Exception {
+
+ // ignore the server type immediately
+ resourceTypeManager.setResourceTypeIgnoreFlagAndUninventoryResources(subjectManager.getOverlord(),
+ serverType.getId(), true);
+
+ // create an inventory report with a platform and a server - the server will be of the ignored type
+ InventoryReport inventoryReport = new InventoryReport(agent);
+ Resource platform = new Resource("platform", "platform", platformType);
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ Resource server = new Resource("server0", "server0", serverType);
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ platform.addChildResource(server);
+ inventoryReport.addAddedRoot(platform);
+
+ // Merge this inventory report
+ MergeInventoryReportResults mergeResults = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
+ assert mergeResults != null;
+ ResourceSyncInfo platformSyncInfo = mergeResults.getResourceSyncInfo();
+ assert platformSyncInfo != null;
+ assertNotNull(mergeResults.getIgnoredResourceTypes());
+ assertEquals(mergeResults.getIgnoredResourceTypes().size(), 1);
+ assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getName(), serverType.getName());
+ assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getPlugin(), serverType.getPlugin());
+
+ // Check merge result - make sure we should not see any children under the platform (it should have been ignored)
+ assertEquals(InventoryStatus.NEW, platformSyncInfo.getInventoryStatus());
+ assertEquals(platformSyncInfo.getChildSyncInfos().size(), 0);
+ }
+
+ @Test(groups = "integration.ejb3")
+ public void testIgnoreResourceTypeAndUninventoryResources() throws Exception {
+
+ // First create an inventory report for a new platform with servers - nothing is ignored yet
+ InventoryReport inventoryReport = new InventoryReport(agent);
+ Resource platform = new Resource("platform", "platform", platformType);
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ for (int i = 0; i < 17; i++) {
+ String serverString = "server " + String.valueOf(i);
+ Resource server = new Resource(serverString, serverString, serverType);
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ platform.addChildResource(server);
+ }
+ inventoryReport.addAddedRoot(platform);
+
+ // Merge this inventory report to get platform and servers in NEW state
+ MergeInventoryReportResults mergeResults = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
+ assert mergeResults != null;
+ assert mergeResults.getIgnoredResourceTypes() == null : "nothing should have been ignored";
+ ResourceSyncInfo platformSyncInfo = mergeResults.getResourceSyncInfo();
+ assert platformSyncInfo != null;
+
+ // Collect the resource ids generated for the platform and the servers
+ int platformId = platformSyncInfo.getId();
+ List<Integer> serverIds = new LinkedList<Integer>();
+ for (ResourceSyncInfo serverSyncInfo : platformSyncInfo.getChildSyncInfos()) {
+ serverIds.add(serverSyncInfo.getId());
+ }
+ int[] arrayOfServerIds = ArrayUtils.unwrapCollection(serverIds);
+
+ // Now import platform and servers into inventory
+ discoveryBoss.importResources(subjectManager.getOverlord(), new int[] { platformId });
+ discoveryBoss.importResources(subjectManager.getOverlord(), arrayOfServerIds);
+
+ // make sure servers are committed into inventory now
+ List<Integer> serverTypeIdInList = new ArrayList<Integer>(1);
+ serverTypeIdInList.add(serverType.getId());
+ PageList<Resource> allServers = resourceManager.findResourceByIds(subjectManager.getOverlord(),
+ arrayOfServerIds, false, PageControl.getUnlimitedInstance());
+ for (Resource aServer : allServers) {
+ assert aServer.getInventoryStatus() == InventoryStatus.COMMITTED : "should be committed: " + aServer;
+ }
+ assert allServers.getTotalSize() == arrayOfServerIds.length : "all servers were not committed into inventory";
+
+ // now ignore the server type - this should uninventory all servers
+ resourceTypeManager.setResourceTypeIgnoreFlagAndUninventoryResources(subjectManager.getOverlord(),
+ serverType.getId(), true);
+
+ // make sure all servers were uninventoried
+ allServers = resourceManager.findResourceByIds(subjectManager.getOverlord(), arrayOfServerIds, false,
+ PageControl.getUnlimitedInstance());
+ for (Resource aServer : allServers) {
+ assert aServer.getInventoryStatus() != InventoryStatus.COMMITTED : "should not be committed: " + aServer;
+ }
+
+ // Merge the inventory report again to simulate another discovery - the servers should be ignored now
+ mergeResults = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
+ assert mergeResults != null;
+ platformSyncInfo = mergeResults.getResourceSyncInfo();
+ assert platformSyncInfo != null;
+ assertNotNull(mergeResults.getIgnoredResourceTypes());
+ assertEquals(mergeResults.getIgnoredResourceTypes().size(), 1);
+ assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getName(), serverType.getName());
+ assertEquals(mergeResults.getIgnoredResourceTypes().iterator().next().getPlugin(), serverType.getPlugin());
+
+ assertEquals(InventoryStatus.COMMITTED, platformSyncInfo.getInventoryStatus()); // notice platform is committed now
+ assertEquals(platformSyncInfo.getChildSyncInfos().size(), 0); // notice there are no server children now
+ }
+
/**
* Use this to fake like your remoting objects. Can be used to keep your own copy of objects locally transient.
*
11 years, 2 months
[rhq] Branch 'feature/cassandra-backend' - modules/enterprise
by John Sanda
modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 566fbaa4282a6500d6f24ef08224f88379f17255
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Mar 21 11:39:07 2013 -0400
handle removing java prefs for agent on mac os x and redirect stdout for C*
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
index 6b97958..8e42000 100755
--- a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
@@ -63,6 +63,13 @@ function install_agent() {
sed_cmd="s;<entry key=\"rhq\.agent\.server\.bind-port.*$;\0\n<entry key=\"rhq.agent.server.bind-address\" value=\"$rhq_host\" />;g"
sed -i "$sed_cmd" rhq-agent/conf/agent-configuration.xml
+ if [ `uname` == "Darwin"* ];
+ then
+ rm -rf "$HOME/Library/Prefereces/com.apple.java.util.prefs.plist"
+ else
+ rm -rf "$HOME/.java/.userPrefs/rhq-agent"
+ fi
+
rm "$RHQ_SERVER_HOME/rhq-agent-update.log"
rm "$RHQ_SERVER_HOME/rhq-agent.jar"
@@ -73,7 +80,7 @@ function install_agent() {
function start() {
echo "Starting RHQ storage node"
cd $RHQ_SERVER_HOME/storage/bin
- ./cassandra -p cassandra.pid 2>/dev/null
+ ./cassandra -p cassandra.pid > /dev/null 2>&1
echo "Starting RHQ server"
cd $RHQ_SERVER_HOME/bin
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12 ++++++++--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java | 3 ++
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 91b896f37f1e285c74fe3f34c5f08611081771e0
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Mar 21 11:27:17 2013 -0400
[BZ 535289] add some log messages during request to set ignore flag on resource types
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d95a255..ae369e8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -256,9 +256,17 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
typeIds.add(resourceTypeId);
List<Integer> resourceIds = resourceManager.findIdsByTypeIds(typeIds);
- for (Integer resourceId : resourceIds) {
- resourceManager.uninventoryResourceInNewTransaction(resourceId);
+
+ if (resourceIds != null && !resourceIds.isEmpty()) {
+ log.info("Uninventorying all [" + resourceIds.size() + "] resources with resource type ID of ["
+ + resourceTypeId + "]");
+
+ for (Integer resourceId : resourceIds) {
+ resourceManager.uninventoryResourceInNewTransaction(resourceId);
+ }
}
+
+ return;
}
@TransactionAttribute(TransactionAttributeType.NEVER)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java
index 3d93e5d..d5e0c87 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java
@@ -111,6 +111,9 @@ public class ResourceTypeManagerBean implements ResourceTypeManagerLocal, Resour
return;
}
+ log.info("Changing ignore flag to [" + ignoreFlag + "] for resource type [" + resourceType.getName()
+ + "] with id=[" + resourceTypeId + "]");
+
resourceType.setIgnored(ignoreFlag);
return;
}
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java | 2 ++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 1 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 1 +
9 files changed, 10 insertions(+)
New commits:
commit 088f68a7bea3d093e16bdb1e7a776360cd14a43f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Mar 21 10:10:09 2013 -0400
[BZ 535289] when ignoring, give the user some feedback that request has been submitted and tell the user to wait
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
index e3ea782..246a71e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
@@ -118,6 +118,8 @@ public class IgnoreResourceTypesView extends ResourceTypeTreeView {
ResourceTypeGWTServiceAsync service;
if (newIgnoreFlag) {
service = GWTServiceLookup.getResourceTypeGWTService(300000); // arbitrarily picking 5m
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_adminConfig_ignoreResourceTypes_pleaseWait()));
} else {
service = GWTServiceLookup.getResourceTypeGWTService();
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index bc150a0..d95fb20 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -461,6 +461,7 @@ view_adminConfig_ignoreResourceTypes_confirmIgnore = Are you sure you want to ig
view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_metricTemplates = Metric Collection Templates
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index 99a7bd0..bbd959d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -480,6 +480,7 @@ view_adminConfig_driftDefTemplates = Šablony pro definice driftu
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_metricTemplates = Šablony pro sběr metrik
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 6990837..aba7974 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -445,6 +445,7 @@ view_adminConfig_driftDefTemplates = Vorlagen für Dritf-Definitionen
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_metricTemplates = Vorlagen für das Sammeln von Metriken
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 0c603d3..727a3bc 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -459,6 +459,7 @@ view_adminConfig_driftDefTemplates = ドリフト定義テンプレート
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_metricTemplates = メトリック収集テンプレート
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
index 615030a..c5ec88d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
@@ -413,6 +413,7 @@ view_adminConfig_downloads = 다운로드
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_serverPlugins = 서버 플러그인
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 2b9604c..d68e82b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -463,6 +463,7 @@ view_adminConfig_downloads = Downloads
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_license = Licen\u00E7a
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index db0d572..29f3a93 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2528,6 +2528,7 @@ view_adminConfig_downloads = Загрузки
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
view_adminConfig_systemSettings = Системные настройки
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 27744c9..66f9ecf 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -453,6 +453,7 @@ view_adminConfig_downloads = \u4e0b\u8f7d
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to unignore the resource type [{0}]? Any resources of this type that exist in your managed environment will be able to be discovered and inventoried.
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the selected resource type.
##view_adminConfig_ignoreResourceTypes_noperm = You do not have permission to ignore or unignore resource types!
+##view_adminConfig_ignoreResourceTypes_pleaseWait = Request has been submitted. It might take a while to complete this request if you have a lot of resources in inventory of that resource type, so please be patient.
##view_adminConfig_ignoreResourceTypes_successIgnore = The resource type [{0}] is now being ignored.
##view_adminConfig_ignoreResourceTypes_successUnignore = The resource type [{0}] is now unignored. Resources of this type can now be committed into inventory.
##view_adminConfig_metricTemplates = Metric Collection Templates
11 years, 2 months
[rhq] Branch 'feature/cassandra-backend' - modules/common modules/enterprise
by John Sanda
modules/common/cassandra-ccm/cassandra-ccm-core/pom.xml | 4
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/access.properties | 46
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra-env.sh | 240 +++
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra.yaml | 653 ++++++++++
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/log4j-server.properties | 45
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/passwd.properties | 23
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/deploy.xml | 221 +++
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/access.properties | 46
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra-env.sh | 240 ---
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra.yaml | 653 ----------
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/log4j-server.properties | 45
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/passwd.properties | 23
modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/deploy.xml | 221 ---
modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh | 17
14 files changed, 1246 insertions(+), 1231 deletions(-)
New commits:
commit e67c3edb258d7b61c9d87adeaaadbe88efd08d38
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Mar 21 10:00:10 2013 -0400
fix maven filtering and some clean up for rhq.sh start/stop commands
When cassandra starts, redirect stdout to /dev/null. When stopping it, echo the
pid like the server and agent scripts do.
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/pom.xml b/modules/common/cassandra-ccm/cassandra-ccm-core/pom.xml
index 0d06cf7..04bfde9 100644
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/pom.xml
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/pom.xml
@@ -67,6 +67,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
+ <resource>
+ <directory>src/main/bundle</directory>
+ <filtering>false</filtering>
+ </resource>
</resources>
<plugins>
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/access.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/access.properties
new file mode 100644
index 0000000..4465450
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/access.properties
@@ -0,0 +1,46 @@
+# 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.
+
+# This is a sample access file for SimpleAuthority. The format of this file
+# is KEYSPACE[.COLUMNFAMILY].PERMISSION=USERS, where:
+#
+# * KEYSPACE is the keyspace name.
+# * COLUMNFAMILY is the column family name.
+# * PERMISSION is one of <ro> or <rw> for read-only or read-write respectively.
+# * USERS is a comma delimited list of users from passwd.properties.
+#
+# See below for example entries.
+
+# NOTE: This file contains potentially sensitive information, please keep
+# this in mind when setting its mode and ownership.
+
+# The magical '<modify-keyspaces>' property lists users who can modify the
+# list of keyspaces: all users will be able to view the list of keyspaces.
+<modify-keyspaces>=cassandra
+
+# Access to Keyspace1 (add/remove column families, etc).
+Keyspace1.<ro>=jsmith,Elvis Presley
+Keyspace1.<rw>=dilbert
+
+# Access to Standard1 (keyspace Keyspace1)
+#Keyspace1.Standard1.<rw>=jsmith,Elvis Presley,dilbert
+
+system.local.<ro>=rhqadmin
+system.peers.<ro>=rhqadmin
+system.schema_keyspaces.<ro>=rhqadmin
+system.schema_columnfamilies.<ro>=rhqadmin
+system.schema_columns.<ro>=rhqadmin
+rhq.<rw>=rhqadmin
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra-env.sh b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra-env.sh
new file mode 100644
index 0000000..e523f97
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra-env.sh
@@ -0,0 +1,240 @@
+# 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.
+
+calculate_heap_sizes()
+{
+ case "`uname`" in
+ Linux)
+ system_memory_in_mb=`free -m | awk '/Mem:/ {print $2}'`
+ system_cpu_cores=`egrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo`
+ ;;
+ FreeBSD)
+ system_memory_in_bytes=`sysctl hw.physmem | awk '{print $2}'`
+ system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
+ system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
+ ;;
+ SunOS)
+ system_memory_in_mb=`prtconf | awk '/Memory size:/ {print $3}'`
+ system_cpu_cores=`psrinfo | wc -l`
+ ;;
+ Darwin)
+ system_memory_in_bytes=`sysctl hw.memsize | awk '{print $2}'`
+ system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
+ system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
+ ;;
+ *)
+ # assume reasonable defaults for e.g. a modern desktop or
+ # cheap server
+ system_memory_in_mb="2048"
+ system_cpu_cores="2"
+ ;;
+ esac
+
+ # some systems like the raspberry pi don't report cores, use at least 1
+ if [ "$system_cpu_cores" -lt "1" ]
+ then
+ system_cpu_cores="1"
+ fi
+
+ # set max heap size based on the following
+ # max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
+ # calculate 1/2 ram and cap to 1024MB
+ # calculate 1/4 ram and cap to 8192MB
+ # pick the max
+ half_system_memory_in_mb=`expr $system_memory_in_mb / 2`
+ quarter_system_memory_in_mb=`expr $half_system_memory_in_mb / 2`
+ if [ "$half_system_memory_in_mb" -gt "1024" ]
+ then
+ half_system_memory_in_mb="1024"
+ fi
+ if [ "$quarter_system_memory_in_mb" -gt "8192" ]
+ then
+ quarter_system_memory_in_mb="8192"
+ fi
+ if [ "$half_system_memory_in_mb" -gt "$quarter_system_memory_in_mb" ]
+ then
+ max_heap_size_in_mb="$half_system_memory_in_mb"
+ else
+ max_heap_size_in_mb="$quarter_system_memory_in_mb"
+ fi
+ MAX_HEAP_SIZE="${max_heap_size_in_mb}M"
+
+ # Young gen: min(max_sensible_per_modern_cpu_core * num_cores, 1/4 * heap size)
+ max_sensible_yg_per_core_in_mb="100"
+ max_sensible_yg_in_mb=`expr $max_sensible_yg_per_core_in_mb "*" $system_cpu_cores`
+
+ desired_yg_in_mb=`expr $max_heap_size_in_mb / 4`
+
+ if [ "$desired_yg_in_mb" -gt "$max_sensible_yg_in_mb" ]
+ then
+ HEAP_NEWSIZE="${max_sensible_yg_in_mb}M"
+ else
+ HEAP_NEWSIZE="${desired_yg_in_mb}M"
+ fi
+}
+
+# Determine the sort of JVM we'll be running on.
+
+java_ver_output=`"${JAVA:-java}" -version 2>&1`
+
+jvmver=`echo "$java_ver_output" | awk -F'"' 'NR==1 {print $2}'`
+JVM_VERSION=${jvmver%_*}
+JVM_PATCH_VERSION=${jvmver#*_}
+
+jvm=`echo "$java_ver_output" | awk 'NR==2 {print $1}'`
+case "$jvm" in
+ OpenJDK)
+ JVM_VENDOR=OpenJDK
+ # this will be "64-Bit" or "32-Bit"
+ JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $2}'`
+ ;;
+ "Java(TM)")
+ JVM_VENDOR=Oracle
+ # this will be "64-Bit" or "32-Bit"
+ JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $3}'`
+ ;;
+ *)
+ # Help fill in other JVM values
+ JVM_VENDOR=other
+ JVM_ARCH=unknown
+ ;;
+esac
+
+
+# Override these to set the amount of memory to allocate to the JVM at
+# start-up. For production use you may wish to adjust this for your
+# environment. MAX_HEAP_SIZE is the total amount of memory dedicated
+# to the Java heap; HEAP_NEWSIZE refers to the size of the young
+# generation. Both MAX_HEAP_SIZE and HEAP_NEWSIZE should be either set
+# or not (if you set one, set the other).
+#
+# The main trade-off for the young generation is that the larger it
+# is, the longer GC pause times will be. The shorter it is, the more
+# expensive GC will be (usually).
+#
+# The example HEAP_NEWSIZE assumes a modern 8-core+ machine for decent pause
+# times. If in doubt, and if you do not particularly want to tweak, go with
+# 100 MB per physical CPU core.
+
+#MAX_HEAP_SIZE="4G"
+#HEAP_NEWSIZE="800M"
+
+if [ "x$MAX_HEAP_SIZE" = "x" ] && [ "x$HEAP_NEWSIZE" = "x" ]; then
+ calculate_heap_sizes
+else
+ if [ "x$MAX_HEAP_SIZE" = "x" ] || [ "x$HEAP_NEWSIZE" = "x" ]; then
+ echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs (see cassandra-env.sh)"
+ exit 1
+ fi
+fi
+
+# Specifies the default port over which Cassandra will be available for
+# JMX connections.
+JMX_PORT="@@jmx.port(a)@"
+
+
+# Here we create the arguments that will get passed to the jvm when
+# starting cassandra.
+
+JVM_EXTRA_OPTS="@@cassandra.ring.delay.property@@@@cassandra.ring.delay(a)@"
+JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -Dpasswd.properties=@@rhq.cassandra.password.properties.file(a)@"
+JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -Daccess.properties=@@rhq.cassandra.access.properties.file(a)@"
+
+# enable assertions. disabling this in production will give a modest
+# performance benefit (around 5%).
+JVM_OPTS="$JVM_OPTS -ea"
+
+# add the jamm javaagent
+if [ "$JVM_VENDOR" != "OpenJDK" -o "$JVM_VERSION" \> "1.6.0" ] \
+ || [ "$JVM_VERSION" = "1.6.0" -a "$JVM_PATCH_VERSION" -ge 23 ]
+then
+ JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar"
+fi
+
+# enable thread priorities, primarily so we can give periodic tasks
+# a lower priority to avoid interfering with client workload
+JVM_OPTS="$JVM_OPTS -XX:+UseThreadPriorities"
+# allows lowering thread priority without being root. see
+# http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workaround....
+JVM_OPTS="$JVM_OPTS -XX:ThreadPriorityPolicy=42"
+
+# min and max heap sizes should be set to the same value to avoid
+# stop-the-world GC pauses during resize, and so that we can lock the
+# heap in memory on startup to prevent any of it from being swapped
+# out.
+JVM_OPTS="$JVM_OPTS -Xms@@rhq.cassandra.max.heap.size(a)@"
+JVM_OPTS="$JVM_OPTS -Xmx@@rhq.cassandra.max.heap.size(a)@"
+JVM_OPTS="$JVM_OPTS -Xmn@@rhq.cassandra.heap.new.size(a)@"
+JVM_OPTS="$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError"
+
+# set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR
+if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then
+ JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=$CASSANDRA_HEAPDUMP_DIR/cassandra-`date +%s`-pid$$.hprof"
+fi
+
+
+startswith() { [ "${1#$2}" != "$1" ]; }
+
+if [ "`uname`" = "Linux" ] ; then
+ # reduce the per-thread stack size to minimize the impact of Thrift
+ # thread-per-client. (Best practice is for client connections to
+ # be pooled anyway.) Only do so on Linux where it is known to be
+ # supported.
+ # u34 and greater need 180k
+ JVM_OPTS="$JVM_OPTS -Xss180k"
+fi
+echo "xss = $JVM_OPTS"
+
+# GC tuning options
+JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC"
+JVM_OPTS="$JVM_OPTS -XX:+UseConcMarkSweepGC"
+JVM_OPTS="$JVM_OPTS -XX:+CMSParallelRemarkEnabled"
+JVM_OPTS="$JVM_OPTS -XX:SurvivorRatio=8"
+JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1"
+JVM_OPTS="$JVM_OPTS -XX:CMSInitiatingOccupancyFraction=75"
+JVM_OPTS="$JVM_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
+
+# GC logging options -- uncomment to enable
+# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDetails"
+# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDateStamps"
+# JVM_OPTS="$JVM_OPTS -XX:+PrintHeapAtGC"
+# JVM_OPTS="$JVM_OPTS -XX:+PrintTenuringDistribution"
+# JVM_OPTS="$JVM_OPTS -XX:+PrintGCApplicationStoppedTime"
+# JVM_OPTS="$JVM_OPTS -XX:+PrintPromotionFailure"
+# JVM_OPTS="$JVM_OPTS -XX:PrintFLSStatistics=1"
+# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log"
+
+# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
+# JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1414"
+
+# Prefer binding to IPv4 network intefaces (when net.ipv6.bindv6only=1). See
+# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561 (short version:
+# comment out this entry to enable IPv6 support).
+JVM_OPTS="$JVM_OPTS -Djava.net.preferIPv4Stack=true"
+
+# jmx: metrics and administration interface
+#
+# add this if you're having trouble connecting:
+# JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<public name>"
+#
+# see
+# https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems...
+# for more on configuring JMX through firewalls, etc. (Short version:
+# get it working with no firewall first.)
+JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
+JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
+JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
+JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS"
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra.yaml b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra.yaml
new file mode 100644
index 0000000..dab627f
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/cassandra.yaml
@@ -0,0 +1,653 @@
+# Cassandra storage config YAML
+
+# NOTE:
+# See http://wiki.apache.org/cassandra/StorageConfiguration for
+# full explanations of configuration directives
+# /NOTE
+
+# The name of the cluster. This is mainly used to prevent machines in
+# one logical cluster from joining another.
+cluster_name: @@cluster.name(a)@
+
+# This defines the number of tokens randomly assigned to this node on the ring
+# The more tokens, relative to other nodes, the larger the proportion of data
+# that this node will store. You probably want all nodes to have the same number
+# of tokens assuming they have equal hardware capability.
+#
+# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
+# and will use the initial_token as described below.
+#
+# Specifying initial_token will override this setting.
+#
+# If you already have a cluster with 1 token per node, and wish to migrate to
+# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
+num_tokens: @@rhq.cassandra.num_tokens(a)@
+
+# If you haven't specified num_tokens, or have set it to the default of 1 then
+# you should always specify InitialToken when setting up a production
+# cluster for the first time, and often when adding capacity later.
+# The principle is that each node should be given an equal slice of
+# the token ring; see http://wiki.apache.org/cassandra/Operations
+# for more details.
+#
+# If blank, Cassandra will request a token bisecting the range of
+# the heaviest-loaded existing node. If there is no load information
+# available, such as is the case with a new cluster, it will pick
+# a random token, which will lead to hot spots.
+#initial_token:
+
+# See http://wiki.apache.org/cassandra/HintedHandoff
+hinted_handoff_enabled: true
+# this defines the maximum amount of time a dead host will have hints
+# generated. After it has been dead this long, new hints for it will not be
+# created until it has been seen alive and gone down again.
+max_hint_window_in_ms: 10800000 # 3 hours
+# throttle in KB's per second, per delivery thread
+hinted_handoff_throttle_in_kb: 1024
+# Number of threads with which to deliver hints;
+# Consider increasing this number when you have multi-dc deployments, since
+# cross-dc handoff tends to be slower
+max_hints_delivery_threads: 2
+
+# The following setting populates the page cache on memtable flush and compaction
+# WARNING: Enable this setting only when the whole node's data fits in memory.
+# Defaults to: false
+# populate_io_cache_on_flush: false
+
+# authentication backend, implementing IAuthenticator; used to identify users
+authenticator: @@rhq.cassandra.authenticator(a)@
+
+# authorization backend, implementing IAUthorizer; used to limit access/provide permissions
+authorizer: @@rhq.cassandra.authorizer(a)@
+
+# The partitioner is responsible for distributing rows (by key) across
+# nodes in the cluster. Any IPartitioner may be used, including your
+# own as long as it is on the classpath. Out of the box, Cassandra
+# provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner
+# ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}.
+#
+# - RandomPartitioner distributes rows across the cluster evenly by md5.
+# This is the default prior to 1.2 and is retained for compatibility.
+# - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128
+# Hash Function instead of md5. When in doubt, this is the best option.
+# - ByteOrderedPartitioner orders rows lexically by key bytes. BOP allows
+# scanning rows in key order, but the ordering can generate hot spots
+# for sequential insertion workloads.
+# - OrderPreservingPartitioner is an obsolete form of BOP, that stores
+# - keys in a less-efficient format and only works with keys that are
+# UTF8-encoded Strings.
+# - CollatingOPP colates according to EN,US rules rather than lexical byte
+# ordering. Use this as an example if you need custom collation.
+#
+# See http://wiki.apache.org/cassandra/Operations for more on
+# partitioners and token selection.
+partitioner: org.apache.cassandra.dht.Murmur3Partitioner
+
+# directories where Cassandra should store data on disk.
+data_file_directories:
+ - @@data.dir(a)@
+
+# commit log
+commitlog_directory: @@commitlog.dir(a)@
+
+# policy for data disk failures:
+# stop: shut down gossip and Thrift, leaving the node effectively dead, but
+# still inspectable via JMX.
+# best_effort: stop using the failed disk and respond to requests based on
+# remaining available sstables. This means you WILL see obsolete
+# data at CL.ONE!
+# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
+disk_failure_policy: stop
+
+# Maximum size of the key cache in memory.
+#
+# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
+# minimum, sometimes more. The key cache is fairly tiny for the amount of
+# time it saves, so it's worthwhile to use it at large numbers.
+# The row cache saves even more time, but must store the whole values of
+# its rows, so it is extremely space-intensive. It's best to only use the
+# row cache if you have hot rows or static rows.
+#
+# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
+#
+# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
+key_cache_size_in_mb:
+
+# Duration in seconds after which Cassandra should
+# safe the keys cache. Caches are saved to saved_caches_directory as
+# specified in this configuration file.
+#
+# Saved caches greatly improve cold-start speeds, and is relatively cheap in
+# terms of I/O for the key cache. Row cache saving is much more expensive and
+# has limited use.
+#
+# Default is 14400 or 4 hours.
+key_cache_save_period: 14400
+
+# Number of keys from the key cache to save
+# Disabled by default, meaning all keys are going to be saved
+# key_cache_keys_to_save: 100
+
+# Maximum size of the row cache in memory.
+# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
+#
+# Default value is 0, to disable row caching.
+row_cache_size_in_mb: 0
+
+# Duration in seconds after which Cassandra should
+# safe the row cache. Caches are saved to saved_caches_directory as specified
+# in this configuration file.
+#
+# Saved caches greatly improve cold-start speeds, and is relatively cheap in
+# terms of I/O for the key cache. Row cache saving is much more expensive and
+# has limited use.
+#
+# Default is 0 to disable saving the row cache.
+row_cache_save_period: 0
+
+# Number of keys from the row cache to save
+# Disabled by default, meaning all keys are going to be saved
+# row_cache_keys_to_save: 100
+
+# The provider for the row cache to use.
+#
+# Supported values are: ConcurrentLinkedHashCacheProvider, SerializingCacheProvider
+#
+# SerializingCacheProvider serialises the contents of the row and stores
+# it in native memory, i.e., off the JVM Heap. Serialized rows take
+# significantly less memory than "live" rows in the JVM, so you can cache
+# more rows in a given memory footprint. And storing the cache off-heap
+# means you can use smaller heap sizes, reducing the impact of GC pauses.
+#
+# It is also valid to specify the fully-qualified class name to a class
+# that implements org.apache.cassandra.cache.IRowCacheProvider.
+#
+# Defaults to SerializingCacheProvider
+row_cache_provider: SerializingCacheProvider
+
+# saved caches
+saved_caches_directory: @@saved.caches.dir(a)@
+
+# commitlog_sync may be either "periodic" or "batch."
+# When in batch mode, Cassandra won't ack writes until the commit log
+# has been fsynced to disk. It will wait up to
+# commitlog_sync_batch_window_in_ms milliseconds for other writes, before
+# performing the sync.
+#
+# commitlog_sync: batch
+# commitlog_sync_batch_window_in_ms: 50
+#
+# the other option is "periodic" where writes may be acked immediately
+# and the CommitLog is simply synced every commitlog_sync_period_in_ms
+# milliseconds.
+commitlog_sync: periodic
+commitlog_sync_period_in_ms: 10000
+
+# The size of the individual commitlog file segments. A commitlog
+# segment may be archived, deleted, or recycled once all the data
+# in it (potentally from each columnfamily in the system) has been
+# flushed to sstables.
+#
+# The default size is 32, which is almost always fine, but if you are
+# archiving commitlog segments (see commitlog_archiving.properties),
+# then you probably want a finer granularity of archiving; 8 or 16 MB
+# is reasonable.
+commitlog_segment_size_in_mb: 32
+
+# any class that implements the SeedProvider interface and has a
+# constructor that takes a Map<String, String> of parameters will do.
+seed_provider:
+ # Addresses of hosts that are deemed contact points.
+ # Cassandra nodes use this list of hosts to find each other and learn
+ # the topology of the ring. You must change this if you are running
+ # multiple nodes!
+ - class_name: org.apache.cassandra.locator.SimpleSeedProvider
+ parameters:
+ # seeds is actually a comma-delimited list of addresses.
+ # Ex: "<ip1>,<ip2>,<ip3>"
+ - seeds: "@@seeds@@"
+
+# emergency pressure valve: each time heap usage after a full (CMS)
+# garbage collection is above this fraction of the max, Cassandra will
+# flush the largest memtables.
+#
+# Set to 1.0 to disable. Setting this lower than
+# CMSInitiatingOccupancyFraction is not likely to be useful.
+#
+# RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
+# it is most effective under light to moderate load, or read-heavy
+# workloads; under truly massive write load, it will often be too
+# little, too late.
+flush_largest_memtables_at: 0.75
+
+# emergency pressure valve #2: the first time heap usage after a full
+# (CMS) garbage collection is above this fraction of the max,
+# Cassandra will reduce cache maximum _capacity_ to the given fraction
+# of the current _size_. Should usually be set substantially above
+# flush_largest_memtables_at, since that will have less long-term
+# impact on the system.
+#
+# Set to 1.0 to disable. Setting this lower than
+# CMSInitiatingOccupancyFraction is not likely to be useful.
+reduce_cache_sizes_at: 0.85
+reduce_cache_capacity_to: 0.6
+
+# For workloads with more data than can fit in memory, Cassandra's
+# bottleneck will be reads that need to fetch data from
+# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
+# order to allow the operations to enqueue low enough in the stack
+# that the OS and drives can reorder them.
+#
+# On the other hand, since writes are almost never IO bound, the ideal
+# number of "concurrent_writes" is dependent on the number of cores in
+# your system; (8 * number_of_cores) is a good rule of thumb.
+concurrent_reads: 32
+concurrent_writes: 32
+
+# Total memory to use for memtables. Cassandra will flush the largest
+# memtable when this much memory is used.
+# If omitted, Cassandra will set it to 1/3 of the heap.
+# memtable_total_space_in_mb: 2048
+
+# Total space to use for commitlogs. Since commitlog segments are
+# mmapped, and hence use up address space, the default size is 32
+# on 32-bit JVMs, and 1024 on 64-bit JVMs.
+#
+# If space gets above this value (it will round up to the next nearest
+# segment multiple), Cassandra will flush every dirty CF in the oldest
+# segment and remove it. So a small total commitlog space will tend
+# to cause more flush activity on less-active columnfamilies.
+# commitlog_total_space_in_mb: 4096
+
+# This sets the amount of memtable flush writer threads. These will
+# be blocked by disk io, and each one will hold a memtable in memory
+# while blocked. If you have a large heap and many data directories,
+# you can increase this value for better flush performance.
+# By default this will be set to the amount of data directories defined.
+#memtable_flush_writers: 1
+
+# the number of full memtables to allow pending flush, that is,
+# waiting for a writer thread. At a minimum, this should be set to
+# the maximum number of secondary indexes created on a single CF.
+memtable_flush_queue_size: 4
+
+# Whether to, when doing sequential writing, fsync() at intervals in
+# order to force the operating system to flush the dirty
+# buffers. Enable this to avoid sudden dirty buffer flushing from
+# impacting read latencies. Almost always a good idea on SSD:s; not
+# necessarily on platters.
+trickle_fsync: false
+trickle_fsync_interval_in_kb: 10240
+
+# TCP port, for commands and data
+storage_port: @@rhq.cassandra.storage.port(a)@
+
+# SSL port, for encrypted communication. Unused unless enabled in
+# encryption_options
+ssl_storage_port: @@rhq.cassandra.ssl.storage.port(a)@
+
+# Address to bind to and tell other Cassandra nodes to connect to. You
+# _must_ change this if you want multiple nodes to be able to
+# communicate!
+#
+# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
+# will always do the Right Thing *if* the node is properly configured
+# (hostname, name resolution, etc), and the Right Thing is to use the
+# address associated with the hostname (it might not be).
+#
+# Setting this to 0.0.0.0 is always wrong.
+listen_address: @@listen.address(a)@
+
+# Address to broadcast to other Cassandra nodes
+# Leaving this blank will set it to the same value as listen_address
+# broadcast_address: 1.2.3.4
+
+
+# Whether to start the native transport server.
+# Currently, only the thrift server is started by default because the native
+# transport is considered beta.
+# Please note that the address on which the native transport is bound is the
+# same as the rpc_address. The port however is different and specified below.
+start_native_transport: true
+# port for the CQL native transport to listen for clients on
+native_transport_port: @@rhq.cassandra.native_transport_port(a)@
+# The minimum and maximum threads for handling requests when the native
+# transport is used. The meaning is those is similar to the one of
+# rpc_min_threads and rpc_max_threads, though the default differ slightly and
+# are the ones below:
+# native_transport_min_threads: 16
+native_transport_max_threads: @@rhq.casandra.native_transport_max_threads(a)@
+
+
+# Whether to start the thrift rpc server.
+start_rpc: true
+# The address to bind the Thrift RPC service to -- clients connect
+# here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
+# you want Thrift to listen on all interfaces.
+#
+# Leaving this blank has the same effect it does for ListenAddress,
+# (i.e. it will be based on the configured hostname of the node).
+rpc_address: @@rpc.address(a)@
+# port for Thrift to listen for clients on
+rpc_port: @@rhq.cassandra.rpc_port(a)@
+
+# enable or disable keepalive on rpc connections
+rpc_keepalive: true
+
+# Cassandra provides three out-of-the-box options for the RPC Server:
+#
+# sync -> One thread per thrift connection. For a very large number of clients, memory
+# will be your limiting factor. On a 64 bit JVM, 128KB is the minimum stack size
+# per thread, and that will correspond to your use of virtual memory (but physical memory
+# may be limited depending on use of stack space).
+#
+# hsha -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
+# asynchronously using a small number of threads that does not vary with the amount
+# of thrift clients (and thus scales well to many clients). The rpc requests are still
+# synchronous (one thread per active request).
+#
+# The default is sync because on Windows hsha is about 30% slower. On Linux,
+# sync/hsha performance is about the same, with hsha of course using less memory.
+#
+# Alternatively, can provide your own RPC server by providing the fully-qualified class name
+# of an o.a.c.t.TServerFactory that can create an instance of it.
+rpc_server_type: sync
+
+# Uncomment rpc_min|max_thread to set request pool size limits.
+#
+# Regardless of your choice of RPC server (see above), the number of maximum requests in the
+# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
+# RPC server, it also dictates the number of clients that can be connected at all).
+#
+# The default is unlimited and thus provide no protection against clients overwhelming the server. You are
+# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
+# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
+#
+# rpc_min_threads: 16
+# rpc_max_threads: 2048
+
+# uncomment to set socket buffer sizes on rpc connections
+# rpc_send_buff_size_in_bytes:
+# rpc_recv_buff_size_in_bytes:
+
+# Frame size for thrift (maximum field length).
+thrift_framed_transport_size_in_mb: 15
+
+# The max length of a thrift message, including all fields and
+# internal thrift overhead.
+thrift_max_message_length_in_mb: 16
+
+# Set to true to have Cassandra create a hard link to each sstable
+# flushed or streamed locally in a backups/ subdirectory of the
+# Keyspace data. Removing these links is the operator's
+# responsibility.
+incremental_backups: false
+
+# Whether or not to take a snapshot before each compaction. Be
+# careful using this option, since Cassandra won't clean up the
+# snapshots for you. Mostly useful if you're paranoid when there
+# is a data format change.
+snapshot_before_compaction: false
+
+# Whether or not a snapshot is taken of the data before keyspace truncation
+# or dropping of column families. The STRONGLY advised default of true
+# should be used to provide data safety. If you set this flag to false, you will
+# lose data on truncation or drop.
+auto_snapshot: true
+
+# Add column indexes to a row after its contents reach this size.
+# Increase if your column values are large, or if you have a very large
+# number of columns. The competing causes are, Cassandra has to
+# deserialize this much of the row to read a single column, so you want
+# it to be small - at least if you do many partial-row reads - but all
+# the index data is read for each access, so you don't want to generate
+# that wastefully either.
+column_index_size_in_kb: 64
+
+# Size limit for rows being compacted in memory. Larger rows will spill
+# over to disk and use a slower two-pass compaction process. A message
+# will be logged specifying the row key.
+in_memory_compaction_limit_in_mb: 64
+
+# Number of simultaneous compactions to allow, NOT including
+# validation "compactions" for anti-entropy repair. Simultaneous
+# compactions can help preserve read performance in a mixed read/write
+# workload, by mitigating the tendency of small sstables to accumulate
+# during a single long running compactions. The default is usually
+# fine and if you experience problems with compaction running too
+# slowly or too fast, you should look at
+# compaction_throughput_mb_per_sec first.
+#
+# concurrent_compactors defaults to the number of cores.
+# Uncomment to make compaction mono-threaded, the pre-0.8 default.
+#concurrent_compactors: 1
+
+# Multi-threaded compaction. When enabled, each compaction will use
+# up to one thread per core, plus one thread per sstable being merged.
+# This is usually only useful for SSD-based hardware: otherwise,
+# your concern is usually to get compaction to do LESS i/o (see:
+# compaction_throughput_mb_per_sec), not more.
+multithreaded_compaction: false
+
+# Throttles compaction to the given total throughput across the entire
+# system. The faster you insert data, the faster you need to compact in
+# order to keep the sstable count down, but in general, setting this to
+# 16 to 32 times the rate you are inserting data is more than sufficient.
+# Setting this to 0 disables throttling. Note that this account for all types
+# of compaction, including validation compaction.
+compaction_throughput_mb_per_sec: 16
+
+# Track cached row keys during compaction, and re-cache their new
+# positions in the compacted sstable. Disable if you use really large
+# key caches.
+compaction_preheat_key_cache: true
+
+# Throttles all outbound streaming file transfers on this node to the
+# given total throughput in Mbps. This is necessary because Cassandra does
+# mostly sequential IO when streaming data during bootstrap or repair, which
+# can lead to saturating the network connection and degrading rpc performance.
+# When unset, the default is 400 Mbps or 50 MB/s.
+# stream_throughput_outbound_megabits_per_sec: 400
+
+# How long the coordinator should wait for read operations to complete
+read_request_timeout_in_ms: 10000
+# How long the coordinator should wait for seq or index scans to complete
+range_request_timeout_in_ms: 10000
+# How long the coordinator should wait for writes to complete
+write_request_timeout_in_ms: 10000
+# How long the coordinator should wait for truncates to complete
+# (This can be much longer, because we need to flush all CFs
+# to make sure we can clear out anythink in the commitlog that could
+# cause truncated data to reappear.)
+truncate_request_timeout_in_ms: 60000
+# The default timeout for other, miscellaneous operations
+request_timeout_in_ms: 10000
+
+# Enable operation timeout information exchange between nodes to accurately
+# measure request timeouts, If disabled cassandra will assuming the request
+# was forwarded to the replica instantly by the coordinator
+#
+# Warning: before enabling this property make sure to ntp is installed
+# and the times are synchronized between the nodes.
+cross_node_timeout: false
+
+# Enable socket timeout for streaming operation.
+# When a timeout occurs during streaming, streaming is retried from the start
+# of the current file. This *can* involve re-streaming an important amount of
+# data, so you should avoid setting the value too low.
+# Default value is 0, which never timeout streams.
+# streaming_socket_timeout_in_ms: 0
+
+# phi value that must be reached for a host to be marked down.
+# most users should never need to adjust this.
+# phi_convict_threshold: 8
+
+# endpoint_snitch -- Set this to a class that implements
+# IEndpointSnitch. The snitch has two functions:
+# - it teaches Cassandra enough about your network topology to route
+# requests efficiently
+# - it allows Cassandra to spread replicas around your cluster to avoid
+# correlated failures. It does this by grouping machines into
+# "datacenters" and "racks." Cassandra will do its best not to have
+# more than one replica on the same "rack" (which may not actually
+# be a physical location)
+#
+# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
+# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
+# ARE PLACED.
+#
+# Out of the box, Cassandra provides
+# - SimpleSnitch:
+# Treats Strategy order as proximity. This improves cache locality
+# when disabling read repair, which can further improve throughput.
+# Only appropriate for single-datacenter deployments.
+# - PropertyFileSnitch:
+# Proximity is determined by rack and data center, which are
+# explicitly configured in cassandra-topology.properties.
+# - GossipingPropertyFileSnitch
+# The rack and datacenter for the local node are defined in
+# cassandra-rackdc.properties and propagated to other nodes via gossip. If
+# cassandra-topology.properties exists, it is used as a fallback, allowing
+# migration from the PropertyFileSnitch.
+# - RackInferringSnitch:
+# Proximity is determined by rack and data center, which are
+# assumed to correspond to the 3rd and 2nd octet of each node's
+# IP address, respectively. Unless this happens to match your
+# deployment conventions (as it did Facebook's), this is best used
+# as an example of writing a custom Snitch class.
+# - Ec2Snitch:
+# Appropriate for EC2 deployments in a single Region. Loads Region
+# and Availability Zone information from the EC2 API. The Region is
+# treated as the Datacenter, and the Availability Zone as the rack.
+# Only private IPs are used, so this will not work across multiple
+# Regions.
+# - Ec2MultiRegionSnitch:
+# Uses public IPs as broadcast_address to allow cross-region
+# connectivity. (Thus, you should set seed addresses to the public
+# IP as well.) You will need to open the storage_port or
+# ssl_storage_port on the public IP firewall. (For intra-Region
+# traffic, Cassandra will switch to the private IP after
+# establishing a connection.)
+#
+# You can use a custom Snitch by setting this to the full class name
+# of the snitch, which will be assumed to be on your classpath.
+endpoint_snitch: SimpleSnitch
+
+# controls how often to perform the more expensive part of host score
+# calculation
+dynamic_snitch_update_interval_in_ms: 100
+# controls how often to reset all host scores, allowing a bad host to
+# possibly recover
+dynamic_snitch_reset_interval_in_ms: 600000
+# if set greater than zero and read_repair_chance is < 1.0, this will allow
+# 'pinning' of replicas to hosts in order to increase cache capacity.
+# The badness threshold will control how much worse the pinned host has to be
+# before the dynamic snitch will prefer other replicas over it. This is
+# expressed as a double which represents a percentage. Thus, a value of
+# 0.2 means Cassandra would continue to prefer the static snitch values
+# until the pinned host was 20% worse than the fastest.
+dynamic_snitch_badness_threshold: 0.1
+
+# request_scheduler -- Set this to a class that implements
+# RequestScheduler, which will schedule incoming client requests
+# according to the specific policy. This is useful for multi-tenancy
+# with a single Cassandra cluster.
+# NOTE: This is specifically for requests from the client and does
+# not affect inter node communication.
+# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
+# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
+# client requests to a node with a separate queue for each
+# request_scheduler_id. The scheduler is further customized by
+# request_scheduler_options as described below.
+request_scheduler: org.apache.cassandra.scheduler.NoScheduler
+
+# Scheduler Options vary based on the type of scheduler
+# NoScheduler - Has no options
+# RoundRobin
+# - throttle_limit -- The throttle_limit is the number of in-flight
+# requests per client. Requests beyond
+# that limit are queued up until
+# running requests can complete.
+# The value of 80 here is twice the number of
+# concurrent_reads + concurrent_writes.
+# - default_weight -- default_weight is optional and allows for
+# overriding the default which is 1.
+# - weights -- Weights are optional and will default to 1 or the
+# overridden default_weight. The weight translates into how
+# many requests are handled during each turn of the
+# RoundRobin, based on the scheduler id.
+#
+# request_scheduler_options:
+# throttle_limit: 80
+# default_weight: 5
+# weights:
+# Keyspace1: 1
+# Keyspace2: 5
+
+# request_scheduler_id -- An identifer based on which to perform
+# the request scheduling. Currently the only valid option is keyspace.
+# request_scheduler_id: keyspace
+
+# index_interval controls the sampling of entries from the primrary
+# row index in terms of space versus time. The larger the interval,
+# the smaller and less effective the sampling will be. In technicial
+# terms, the interval coresponds to the number of index entries that
+# are skipped between taking each sample. All the sampled entries
+# must fit in memory. Generally, a value between 128 and 512 here
+# coupled with a large key cache size on CFs results in the best trade
+# offs. This value is not often changed, however if you have many
+# very small rows (many to an OS page), then increasing this will
+# often lower memory usage without a impact on performance.
+index_interval: 128
+
+# Enable or disable inter-node encryption
+# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
+# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
+# suite for authentication, key exchange and encryption of the actual data transfers.
+# NOTE: No custom encryption options are enabled at the moment
+# The available internode options are : all, none, dc, rack
+#
+# If set to dc cassandra will encrypt the traffic between the DCs
+# If set to rack cassandra will encrypt the traffic between the racks
+#
+# The passwords used in these options must match the passwords used when generating
+# the keystore and truststore. For instructions on generating these files, see:
+# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/J...
+#
+server_encryption_options:
+ internode_encryption: none
+ keystore: conf/.keystore
+ keystore_password: cassandra
+ truststore: conf/.truststore
+ truststore_password: cassandra
+ # More advanced defaults below:
+ # protocol: TLS
+ # algorithm: SunX509
+ # store_type: JKS
+ # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
+ # require_client_auth: false
+
+# enable or disable client/server encryption.
+client_encryption_options:
+ enabled: false
+ keystore: conf/.keystore
+ keystore_password: cassandra
+ # More advanced defaults below:
+ # protocol: TLS
+ # algorithm: SunX509
+ # store_type: JKS
+ # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
+
+
+# internode_compression controls whether traffic between nodes is
+# compressed.
+# can be: all - all traffic is compressed
+# dc - traffic between different datacenters is compressed
+# none - nothing is compressed.
+internode_compression: all
+
+# Enable or disable tcp_nodelay for inter-dc communication.
+# Disabling it will result in larger (but fewer) network packets being sent,
+# reducing overhead from the TCP protocol itself, at the cost of increasing
+# latency if you block for cross-datacenter responses.
+inter_dc_tcp_nodelay: true
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/log4j-server.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/log4j-server.properties
new file mode 100644
index 0000000..8f3fcf3
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/log4j-server.properties
@@ -0,0 +1,45 @@
+# 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.
+
+# for production, you should probably set pattern to %c instead of %l.
+# (%l is slower.)
+
+# output messages into a rolling log file as well as stdout
+log4j.rootLogger=@@logging.level@(a),stdout,R
+
+# stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
+
+# rolling log file
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.maxFileSize=20MB
+log4j.appender.R.maxBackupIndex=50
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
+# Edit the next line to point to your logs directory
+log4j.appender.R.File=@@log.dir@@/@@rhq.cassandra.log.file.name(a)@
+log4j.appender.R.Threshold=@@logging.level(a)@
+
+# Application logging options
+#log4j.logger.org.apache.cassandra=DEBUG
+#log4j.logger.org.apache.cassandra.db=DEBUG
+#log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG
+
+# Adding this to avoid thrift logging disconnect errors.
+log4j.logger.org.apache.thrift.server.TNonblockingServer=ERROR
+
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/passwd.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/passwd.properties
new file mode 100644
index 0000000..e6c3d9b
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/cassandra/conf/passwd.properties
@@ -0,0 +1,23 @@
+# 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.
+#
+# This is a sample password file for SimpleAuthenticator. The format of
+# this file is username=password. If -Dpasswd.mode=MD5 then the password
+# is represented as an md5 digest, otherwise it is cleartext (keep this
+# in mind when setting file mode and ownership).
+
+cassandra=cassandra
+@@rhq.cassandra.username@@=@@rhq.cassandra.password(a)@
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/deploy.xml b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/deploy.xml
new file mode 100644
index 0000000..8369389
--- /dev/null
+++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/bundle/deploy.xml
@@ -0,0 +1,221 @@
+<project name="rhq_cassandra_bundle"
+ default="main"
+ xmlns:rhq="antlib:org.rhq.bundle">
+ <rhq:bundle name="${rhq.cassandra.bundle.name}"
+ version="${rhq.cassandra.bundle.version}"
+ description="A bundle for deploying RHQ Cassandra nodes.">
+
+ <!--
+ NOTE: the name attribute of an rhq:input-property does not support using a dash.
+ There is a convention where dashes are used in property names in rhq properties files
+ in the trailing part of a property name. If an rhq:input-property has a corresponding
+ property in cassandra.properties and contains a dash, the dash will be changed to an
+ underscore in this file.
+ -->
+
+ <rhq:input-property name="cluster.name"
+ description="The name of the cluster. This is used to prevent machines in one logical cluster from joining another"
+ required="true"
+ defaultValue="rhqdev"
+ type="string"/>
+
+ <rhq:input-property name="cluster.dir"
+ description="The directory in which Cassandra nodes will be installed"
+ required="true"
+ defaultValue=""
+ type="string"/>
+
+ <rhq:input-property name="data.dir"
+ description="The directory where Cassandra should store data files."
+ required="true"
+ defaultValue="data"
+ type="string"/>
+
+ <rhq:input-property name="commitlog.dir"
+ description="The directory where Cassandra stores its commit logs."
+ required="true"
+ defaultValue="commit_log"
+ type="string"/>
+
+ <rhq:input-property name="saved.caches.dir"
+ description="The directory where Cassandra stores saved caches."
+ required="true"
+ defaultValue="saved_caches"
+ type="string"/>
+
+ <rhq:input-property name="log.dir"
+ description="The directory where Cassandra stores log files."
+ required="true"
+ defaultValue="logs"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.log.file.name"
+ description="The name of the log file to which Cassandra writes."
+ required="true"
+ defaultValue="rhq-storage-node.log"
+ type="string"/>
+
+ <rhq:input-property name="logging.level"
+ description="The log4j logging level to use."
+ required="false"
+ defaultValue="DEBUG"
+ type="string"/>
+
+ <rhq:input-property name="seeds"
+ description="A comma-delimited list of IP addresses/host names that are deemed contact points. Cassandra nodes use this list of hosts to find each other and learn the topology of the ring. If you are running a local development cluster, be sure to have aliases set up for localhost."
+ required="false"
+ defaultValue="127.0.0.1"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.num_tokens"
+ description="Defines the number of tokens randomly assigned to a node on the ring. The more tokens, relative to other nodes, the larger the proportion of data that this node will store. You probably want all nodes to have the same number of tokens assuming they have equal hardware capability."
+ required="false"
+ defaultValue="256"
+ type="string"/>
+
+ <rhq:input-property name="jmx.port"
+ description="The port over which Cassandra listens for JMX connections. Each node should be assigned a unique port."
+ required="false"
+ defaultValue="7200"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.storage.port"
+ description="The port used for inter-node communication."
+ required="false"
+ defaultValue="7000"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.ssl.storage.port"
+ description="The port used for encrypted inter-node communication."
+ required="false"
+ defaultValue="7001"
+ type="string"/>
+
+ <rhq:input-property name="listen.address"
+ description="Address used for inter-node communication. Defaults to value of hostname property."
+ required="true"
+ defaultValue=""
+ type="string"/>
+
+ <rhq:input-property name="rpc.address"
+ description="Address used for Thrift RPC client communication. Defaults to value of hostname property."
+ required="true"
+ defaultValue=""
+ type="string"/>
+
+ <rhq:input-property name="cassandra.ring.delay.property"
+ required="false"
+ defaultValue=""
+ type="string"/>
+
+ <rhq:input-property name="cassandra.ring.delay"
+ description="When a node initializes it contacts a seed and then sleeps for RING_DELAY (milliseconds) to learn about other nodes in the cluster. Cassandra uses a default value of 30 seconds."
+ required="false"
+ defaultValue=""
+ type="string"/>
+
+ <rhq:input-property name="rhq.casandra.native_transport_max_threads"
+ description="The maximum number of threads handling native CQL requests."
+ required="false"
+ defaultValue="64"
+ type="integer"/>
+
+ <rhq:input-property name="rhq.cassandra.native_transport_port"
+ description="The port for the CQL native transport to listen for clients on."
+ required="false"
+ defaultValue="9042"
+ type="integer"/>
+
+ <rhq:input-property name="rhq.cassandra.rpc_port"
+ description="The port to listen for Thrift clients on."
+ required="false"
+ defaultValue="9160"
+ type="integer"/>
+
+ <rhq:input-property name="rhq.cassandra.authenticator"
+ description="A class that performs authentication. The value should be a fully qualified class name and implement IAuthenticator."
+ required="false"
+ defaultValue="org.rhq.cassandra.auth.SimpleAuthenticator"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.authorizer"
+ description="A class that performs authorization. Used to limit/provide permissions. The value should be a fully qualified class name and implement IAuthorizer."
+ required="false"
+ defaultValue="org.rhq.cassandra.auth.SimpleAuthorizer"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.password.properties.file"
+ description="The location of the password properties file used by SimpleAuthenticator. If a relative path is specified, its location is resolved relative to Cassandra's bin directory."
+ required="false"
+ defaultValue="./../conf/passwd.properties"
+ type="file"/>
+
+ <rhq:input-property name="rhq.cassandra.access.properties.file"
+ description="The location of the authorization properties file used by SimpleAuthority. If a relative path is specified, its location is resolved relative to Cassandra's bin directory."
+ required="false"
+ defaultValue="./../conf/access.properties"
+ type="file"/>
+
+ <rhq:input-property name="rhq.cassandra.username"
+ description="The username with which to authenticate requests to Cassandra."
+ required="true"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.password"
+ description="The password with which to authenticate requests to Cassandra."
+ required="true"
+ type="string"/>
+
+ <rhq:input-property name="rhq.cassandra.max.heap.size"
+ required="true"
+ defaultValue="${MAX_HEAP_SIZE}"/>
+
+ <rhq:input-property name="rhq.cassandra.heap.new.size"
+ required="true"
+ defaultValue="${HEAP_NEWSIZE}"/>
+
+ <rhq:deployment-unit name="cassandra" preinstallTarget="pre-install" postinstallTarget="post-install">
+<!--
+ <rhq:file name="dbsetup.script" destinationFile="scripts/dbsetup.script" replace="true"/>
+-->
+ <rhq:archive name="cassandra.zip">
+ <rhq:replace>
+ <rhq:fileset dir="conf">
+ <include name="cassandra.yaml"/>
+ </rhq:fileset>
+ <rhq:fileset dir="conf">
+ <include name="cassandra-env.sh"/>
+ </rhq:fileset>
+ <rhq:fileset dir="conf">
+ <include name="log4j-server.properties"/>
+ </rhq:fileset>
+ <rhq:fileset dir="conf">
+ <include name="passwd.properties"/>
+ </rhq:fileset>
+<!--
+ <rhq:fileset dir="scripts">
+ <include name="dbsetup.script"/>
+ </rhq:fileset>
+-->
+ </rhq:replace>
+ </rhq:archive>
+ </rhq:deployment-unit>
+ </rhq:bundle>
+
+ <target name="main"/>
+
+ <target name="pre-install">
+ <mkdir dir="${cluster.dir}"/>
+
+ </target>
+
+ <target name="post-install">
+ <property name="bin.dir" value="${rhq.deploy.dir}/bin"/>
+
+ <chmod file="${bin.dir}/cassandra" perm="+x"/>
+ <chmod file="${bin.dir}/cqlsh" perm="+x"/>
+ <chmod file="${bin.dir}/cassandra-cli" perm="+x"/>
+ <chmod file="${bin.dir}/nodetool" perm="+x"/>
+ </target>
+
+</project>
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/access.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/access.properties
deleted file mode 100644
index 4465450..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/access.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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.
-
-# This is a sample access file for SimpleAuthority. The format of this file
-# is KEYSPACE[.COLUMNFAMILY].PERMISSION=USERS, where:
-#
-# * KEYSPACE is the keyspace name.
-# * COLUMNFAMILY is the column family name.
-# * PERMISSION is one of <ro> or <rw> for read-only or read-write respectively.
-# * USERS is a comma delimited list of users from passwd.properties.
-#
-# See below for example entries.
-
-# NOTE: This file contains potentially sensitive information, please keep
-# this in mind when setting its mode and ownership.
-
-# The magical '<modify-keyspaces>' property lists users who can modify the
-# list of keyspaces: all users will be able to view the list of keyspaces.
-<modify-keyspaces>=cassandra
-
-# Access to Keyspace1 (add/remove column families, etc).
-Keyspace1.<ro>=jsmith,Elvis Presley
-Keyspace1.<rw>=dilbert
-
-# Access to Standard1 (keyspace Keyspace1)
-#Keyspace1.Standard1.<rw>=jsmith,Elvis Presley,dilbert
-
-system.local.<ro>=rhqadmin
-system.peers.<ro>=rhqadmin
-system.schema_keyspaces.<ro>=rhqadmin
-system.schema_columnfamilies.<ro>=rhqadmin
-system.schema_columns.<ro>=rhqadmin
-rhq.<rw>=rhqadmin
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra-env.sh b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra-env.sh
deleted file mode 100644
index e523f97..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra-env.sh
+++ /dev/null
@@ -1,240 +0,0 @@
-# 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.
-
-calculate_heap_sizes()
-{
- case "`uname`" in
- Linux)
- system_memory_in_mb=`free -m | awk '/Mem:/ {print $2}'`
- system_cpu_cores=`egrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo`
- ;;
- FreeBSD)
- system_memory_in_bytes=`sysctl hw.physmem | awk '{print $2}'`
- system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
- system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
- ;;
- SunOS)
- system_memory_in_mb=`prtconf | awk '/Memory size:/ {print $3}'`
- system_cpu_cores=`psrinfo | wc -l`
- ;;
- Darwin)
- system_memory_in_bytes=`sysctl hw.memsize | awk '{print $2}'`
- system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
- system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
- ;;
- *)
- # assume reasonable defaults for e.g. a modern desktop or
- # cheap server
- system_memory_in_mb="2048"
- system_cpu_cores="2"
- ;;
- esac
-
- # some systems like the raspberry pi don't report cores, use at least 1
- if [ "$system_cpu_cores" -lt "1" ]
- then
- system_cpu_cores="1"
- fi
-
- # set max heap size based on the following
- # max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
- # calculate 1/2 ram and cap to 1024MB
- # calculate 1/4 ram and cap to 8192MB
- # pick the max
- half_system_memory_in_mb=`expr $system_memory_in_mb / 2`
- quarter_system_memory_in_mb=`expr $half_system_memory_in_mb / 2`
- if [ "$half_system_memory_in_mb" -gt "1024" ]
- then
- half_system_memory_in_mb="1024"
- fi
- if [ "$quarter_system_memory_in_mb" -gt "8192" ]
- then
- quarter_system_memory_in_mb="8192"
- fi
- if [ "$half_system_memory_in_mb" -gt "$quarter_system_memory_in_mb" ]
- then
- max_heap_size_in_mb="$half_system_memory_in_mb"
- else
- max_heap_size_in_mb="$quarter_system_memory_in_mb"
- fi
- MAX_HEAP_SIZE="${max_heap_size_in_mb}M"
-
- # Young gen: min(max_sensible_per_modern_cpu_core * num_cores, 1/4 * heap size)
- max_sensible_yg_per_core_in_mb="100"
- max_sensible_yg_in_mb=`expr $max_sensible_yg_per_core_in_mb "*" $system_cpu_cores`
-
- desired_yg_in_mb=`expr $max_heap_size_in_mb / 4`
-
- if [ "$desired_yg_in_mb" -gt "$max_sensible_yg_in_mb" ]
- then
- HEAP_NEWSIZE="${max_sensible_yg_in_mb}M"
- else
- HEAP_NEWSIZE="${desired_yg_in_mb}M"
- fi
-}
-
-# Determine the sort of JVM we'll be running on.
-
-java_ver_output=`"${JAVA:-java}" -version 2>&1`
-
-jvmver=`echo "$java_ver_output" | awk -F'"' 'NR==1 {print $2}'`
-JVM_VERSION=${jvmver%_*}
-JVM_PATCH_VERSION=${jvmver#*_}
-
-jvm=`echo "$java_ver_output" | awk 'NR==2 {print $1}'`
-case "$jvm" in
- OpenJDK)
- JVM_VENDOR=OpenJDK
- # this will be "64-Bit" or "32-Bit"
- JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $2}'`
- ;;
- "Java(TM)")
- JVM_VENDOR=Oracle
- # this will be "64-Bit" or "32-Bit"
- JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $3}'`
- ;;
- *)
- # Help fill in other JVM values
- JVM_VENDOR=other
- JVM_ARCH=unknown
- ;;
-esac
-
-
-# Override these to set the amount of memory to allocate to the JVM at
-# start-up. For production use you may wish to adjust this for your
-# environment. MAX_HEAP_SIZE is the total amount of memory dedicated
-# to the Java heap; HEAP_NEWSIZE refers to the size of the young
-# generation. Both MAX_HEAP_SIZE and HEAP_NEWSIZE should be either set
-# or not (if you set one, set the other).
-#
-# The main trade-off for the young generation is that the larger it
-# is, the longer GC pause times will be. The shorter it is, the more
-# expensive GC will be (usually).
-#
-# The example HEAP_NEWSIZE assumes a modern 8-core+ machine for decent pause
-# times. If in doubt, and if you do not particularly want to tweak, go with
-# 100 MB per physical CPU core.
-
-#MAX_HEAP_SIZE="4G"
-#HEAP_NEWSIZE="800M"
-
-if [ "x$MAX_HEAP_SIZE" = "x" ] && [ "x$HEAP_NEWSIZE" = "x" ]; then
- calculate_heap_sizes
-else
- if [ "x$MAX_HEAP_SIZE" = "x" ] || [ "x$HEAP_NEWSIZE" = "x" ]; then
- echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs (see cassandra-env.sh)"
- exit 1
- fi
-fi
-
-# Specifies the default port over which Cassandra will be available for
-# JMX connections.
-JMX_PORT="@@jmx.port(a)@"
-
-
-# Here we create the arguments that will get passed to the jvm when
-# starting cassandra.
-
-JVM_EXTRA_OPTS="@@cassandra.ring.delay.property@@@@cassandra.ring.delay(a)@"
-JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -Dpasswd.properties=@@rhq.cassandra.password.properties.file(a)@"
-JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -Daccess.properties=@@rhq.cassandra.access.properties.file(a)@"
-
-# enable assertions. disabling this in production will give a modest
-# performance benefit (around 5%).
-JVM_OPTS="$JVM_OPTS -ea"
-
-# add the jamm javaagent
-if [ "$JVM_VENDOR" != "OpenJDK" -o "$JVM_VERSION" \> "1.6.0" ] \
- || [ "$JVM_VERSION" = "1.6.0" -a "$JVM_PATCH_VERSION" -ge 23 ]
-then
- JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar"
-fi
-
-# enable thread priorities, primarily so we can give periodic tasks
-# a lower priority to avoid interfering with client workload
-JVM_OPTS="$JVM_OPTS -XX:+UseThreadPriorities"
-# allows lowering thread priority without being root. see
-# http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workaround....
-JVM_OPTS="$JVM_OPTS -XX:ThreadPriorityPolicy=42"
-
-# min and max heap sizes should be set to the same value to avoid
-# stop-the-world GC pauses during resize, and so that we can lock the
-# heap in memory on startup to prevent any of it from being swapped
-# out.
-JVM_OPTS="$JVM_OPTS -Xms@@rhq.cassandra.max.heap.size(a)@"
-JVM_OPTS="$JVM_OPTS -Xmx@@rhq.cassandra.max.heap.size(a)@"
-JVM_OPTS="$JVM_OPTS -Xmn@@rhq.cassandra.heap.new.size(a)@"
-JVM_OPTS="$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError"
-
-# set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR
-if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then
- JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=$CASSANDRA_HEAPDUMP_DIR/cassandra-`date +%s`-pid$$.hprof"
-fi
-
-
-startswith() { [ "${1#$2}" != "$1" ]; }
-
-if [ "`uname`" = "Linux" ] ; then
- # reduce the per-thread stack size to minimize the impact of Thrift
- # thread-per-client. (Best practice is for client connections to
- # be pooled anyway.) Only do so on Linux where it is known to be
- # supported.
- # u34 and greater need 180k
- JVM_OPTS="$JVM_OPTS -Xss180k"
-fi
-echo "xss = $JVM_OPTS"
-
-# GC tuning options
-JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC"
-JVM_OPTS="$JVM_OPTS -XX:+UseConcMarkSweepGC"
-JVM_OPTS="$JVM_OPTS -XX:+CMSParallelRemarkEnabled"
-JVM_OPTS="$JVM_OPTS -XX:SurvivorRatio=8"
-JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1"
-JVM_OPTS="$JVM_OPTS -XX:CMSInitiatingOccupancyFraction=75"
-JVM_OPTS="$JVM_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
-
-# GC logging options -- uncomment to enable
-# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDetails"
-# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDateStamps"
-# JVM_OPTS="$JVM_OPTS -XX:+PrintHeapAtGC"
-# JVM_OPTS="$JVM_OPTS -XX:+PrintTenuringDistribution"
-# JVM_OPTS="$JVM_OPTS -XX:+PrintGCApplicationStoppedTime"
-# JVM_OPTS="$JVM_OPTS -XX:+PrintPromotionFailure"
-# JVM_OPTS="$JVM_OPTS -XX:PrintFLSStatistics=1"
-# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log"
-
-# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
-# JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1414"
-
-# Prefer binding to IPv4 network intefaces (when net.ipv6.bindv6only=1). See
-# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561 (short version:
-# comment out this entry to enable IPv6 support).
-JVM_OPTS="$JVM_OPTS -Djava.net.preferIPv4Stack=true"
-
-# jmx: metrics and administration interface
-#
-# add this if you're having trouble connecting:
-# JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<public name>"
-#
-# see
-# https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems...
-# for more on configuring JMX through firewalls, etc. (Short version:
-# get it working with no firewall first.)
-JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
-JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
-JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
-JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS"
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra.yaml b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra.yaml
deleted file mode 100644
index dab627f..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/cassandra.yaml
+++ /dev/null
@@ -1,653 +0,0 @@
-# Cassandra storage config YAML
-
-# NOTE:
-# See http://wiki.apache.org/cassandra/StorageConfiguration for
-# full explanations of configuration directives
-# /NOTE
-
-# The name of the cluster. This is mainly used to prevent machines in
-# one logical cluster from joining another.
-cluster_name: @@cluster.name(a)@
-
-# This defines the number of tokens randomly assigned to this node on the ring
-# The more tokens, relative to other nodes, the larger the proportion of data
-# that this node will store. You probably want all nodes to have the same number
-# of tokens assuming they have equal hardware capability.
-#
-# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
-# and will use the initial_token as described below.
-#
-# Specifying initial_token will override this setting.
-#
-# If you already have a cluster with 1 token per node, and wish to migrate to
-# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
-num_tokens: @@rhq.cassandra.num_tokens(a)@
-
-# If you haven't specified num_tokens, or have set it to the default of 1 then
-# you should always specify InitialToken when setting up a production
-# cluster for the first time, and often when adding capacity later.
-# The principle is that each node should be given an equal slice of
-# the token ring; see http://wiki.apache.org/cassandra/Operations
-# for more details.
-#
-# If blank, Cassandra will request a token bisecting the range of
-# the heaviest-loaded existing node. If there is no load information
-# available, such as is the case with a new cluster, it will pick
-# a random token, which will lead to hot spots.
-#initial_token:
-
-# See http://wiki.apache.org/cassandra/HintedHandoff
-hinted_handoff_enabled: true
-# this defines the maximum amount of time a dead host will have hints
-# generated. After it has been dead this long, new hints for it will not be
-# created until it has been seen alive and gone down again.
-max_hint_window_in_ms: 10800000 # 3 hours
-# throttle in KB's per second, per delivery thread
-hinted_handoff_throttle_in_kb: 1024
-# Number of threads with which to deliver hints;
-# Consider increasing this number when you have multi-dc deployments, since
-# cross-dc handoff tends to be slower
-max_hints_delivery_threads: 2
-
-# The following setting populates the page cache on memtable flush and compaction
-# WARNING: Enable this setting only when the whole node's data fits in memory.
-# Defaults to: false
-# populate_io_cache_on_flush: false
-
-# authentication backend, implementing IAuthenticator; used to identify users
-authenticator: @@rhq.cassandra.authenticator(a)@
-
-# authorization backend, implementing IAUthorizer; used to limit access/provide permissions
-authorizer: @@rhq.cassandra.authorizer(a)@
-
-# The partitioner is responsible for distributing rows (by key) across
-# nodes in the cluster. Any IPartitioner may be used, including your
-# own as long as it is on the classpath. Out of the box, Cassandra
-# provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner
-# ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}.
-#
-# - RandomPartitioner distributes rows across the cluster evenly by md5.
-# This is the default prior to 1.2 and is retained for compatibility.
-# - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128
-# Hash Function instead of md5. When in doubt, this is the best option.
-# - ByteOrderedPartitioner orders rows lexically by key bytes. BOP allows
-# scanning rows in key order, but the ordering can generate hot spots
-# for sequential insertion workloads.
-# - OrderPreservingPartitioner is an obsolete form of BOP, that stores
-# - keys in a less-efficient format and only works with keys that are
-# UTF8-encoded Strings.
-# - CollatingOPP colates according to EN,US rules rather than lexical byte
-# ordering. Use this as an example if you need custom collation.
-#
-# See http://wiki.apache.org/cassandra/Operations for more on
-# partitioners and token selection.
-partitioner: org.apache.cassandra.dht.Murmur3Partitioner
-
-# directories where Cassandra should store data on disk.
-data_file_directories:
- - @@data.dir(a)@
-
-# commit log
-commitlog_directory: @@commitlog.dir(a)@
-
-# policy for data disk failures:
-# stop: shut down gossip and Thrift, leaving the node effectively dead, but
-# still inspectable via JMX.
-# best_effort: stop using the failed disk and respond to requests based on
-# remaining available sstables. This means you WILL see obsolete
-# data at CL.ONE!
-# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
-disk_failure_policy: stop
-
-# Maximum size of the key cache in memory.
-#
-# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
-# minimum, sometimes more. The key cache is fairly tiny for the amount of
-# time it saves, so it's worthwhile to use it at large numbers.
-# The row cache saves even more time, but must store the whole values of
-# its rows, so it is extremely space-intensive. It's best to only use the
-# row cache if you have hot rows or static rows.
-#
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
-key_cache_size_in_mb:
-
-# Duration in seconds after which Cassandra should
-# safe the keys cache. Caches are saved to saved_caches_directory as
-# specified in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 14400 or 4 hours.
-key_cache_save_period: 14400
-
-# Number of keys from the key cache to save
-# Disabled by default, meaning all keys are going to be saved
-# key_cache_keys_to_save: 100
-
-# Maximum size of the row cache in memory.
-# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
-#
-# Default value is 0, to disable row caching.
-row_cache_size_in_mb: 0
-
-# Duration in seconds after which Cassandra should
-# safe the row cache. Caches are saved to saved_caches_directory as specified
-# in this configuration file.
-#
-# Saved caches greatly improve cold-start speeds, and is relatively cheap in
-# terms of I/O for the key cache. Row cache saving is much more expensive and
-# has limited use.
-#
-# Default is 0 to disable saving the row cache.
-row_cache_save_period: 0
-
-# Number of keys from the row cache to save
-# Disabled by default, meaning all keys are going to be saved
-# row_cache_keys_to_save: 100
-
-# The provider for the row cache to use.
-#
-# Supported values are: ConcurrentLinkedHashCacheProvider, SerializingCacheProvider
-#
-# SerializingCacheProvider serialises the contents of the row and stores
-# it in native memory, i.e., off the JVM Heap. Serialized rows take
-# significantly less memory than "live" rows in the JVM, so you can cache
-# more rows in a given memory footprint. And storing the cache off-heap
-# means you can use smaller heap sizes, reducing the impact of GC pauses.
-#
-# It is also valid to specify the fully-qualified class name to a class
-# that implements org.apache.cassandra.cache.IRowCacheProvider.
-#
-# Defaults to SerializingCacheProvider
-row_cache_provider: SerializingCacheProvider
-
-# saved caches
-saved_caches_directory: @@saved.caches.dir(a)@
-
-# commitlog_sync may be either "periodic" or "batch."
-# When in batch mode, Cassandra won't ack writes until the commit log
-# has been fsynced to disk. It will wait up to
-# commitlog_sync_batch_window_in_ms milliseconds for other writes, before
-# performing the sync.
-#
-# commitlog_sync: batch
-# commitlog_sync_batch_window_in_ms: 50
-#
-# the other option is "periodic" where writes may be acked immediately
-# and the CommitLog is simply synced every commitlog_sync_period_in_ms
-# milliseconds.
-commitlog_sync: periodic
-commitlog_sync_period_in_ms: 10000
-
-# The size of the individual commitlog file segments. A commitlog
-# segment may be archived, deleted, or recycled once all the data
-# in it (potentally from each columnfamily in the system) has been
-# flushed to sstables.
-#
-# The default size is 32, which is almost always fine, but if you are
-# archiving commitlog segments (see commitlog_archiving.properties),
-# then you probably want a finer granularity of archiving; 8 or 16 MB
-# is reasonable.
-commitlog_segment_size_in_mb: 32
-
-# any class that implements the SeedProvider interface and has a
-# constructor that takes a Map<String, String> of parameters will do.
-seed_provider:
- # Addresses of hosts that are deemed contact points.
- # Cassandra nodes use this list of hosts to find each other and learn
- # the topology of the ring. You must change this if you are running
- # multiple nodes!
- - class_name: org.apache.cassandra.locator.SimpleSeedProvider
- parameters:
- # seeds is actually a comma-delimited list of addresses.
- # Ex: "<ip1>,<ip2>,<ip3>"
- - seeds: "@@seeds@@"
-
-# emergency pressure valve: each time heap usage after a full (CMS)
-# garbage collection is above this fraction of the max, Cassandra will
-# flush the largest memtables.
-#
-# Set to 1.0 to disable. Setting this lower than
-# CMSInitiatingOccupancyFraction is not likely to be useful.
-#
-# RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
-# it is most effective under light to moderate load, or read-heavy
-# workloads; under truly massive write load, it will often be too
-# little, too late.
-flush_largest_memtables_at: 0.75
-
-# emergency pressure valve #2: the first time heap usage after a full
-# (CMS) garbage collection is above this fraction of the max,
-# Cassandra will reduce cache maximum _capacity_ to the given fraction
-# of the current _size_. Should usually be set substantially above
-# flush_largest_memtables_at, since that will have less long-term
-# impact on the system.
-#
-# Set to 1.0 to disable. Setting this lower than
-# CMSInitiatingOccupancyFraction is not likely to be useful.
-reduce_cache_sizes_at: 0.85
-reduce_cache_capacity_to: 0.6
-
-# For workloads with more data than can fit in memory, Cassandra's
-# bottleneck will be reads that need to fetch data from
-# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
-# order to allow the operations to enqueue low enough in the stack
-# that the OS and drives can reorder them.
-#
-# On the other hand, since writes are almost never IO bound, the ideal
-# number of "concurrent_writes" is dependent on the number of cores in
-# your system; (8 * number_of_cores) is a good rule of thumb.
-concurrent_reads: 32
-concurrent_writes: 32
-
-# Total memory to use for memtables. Cassandra will flush the largest
-# memtable when this much memory is used.
-# If omitted, Cassandra will set it to 1/3 of the heap.
-# memtable_total_space_in_mb: 2048
-
-# Total space to use for commitlogs. Since commitlog segments are
-# mmapped, and hence use up address space, the default size is 32
-# on 32-bit JVMs, and 1024 on 64-bit JVMs.
-#
-# If space gets above this value (it will round up to the next nearest
-# segment multiple), Cassandra will flush every dirty CF in the oldest
-# segment and remove it. So a small total commitlog space will tend
-# to cause more flush activity on less-active columnfamilies.
-# commitlog_total_space_in_mb: 4096
-
-# This sets the amount of memtable flush writer threads. These will
-# be blocked by disk io, and each one will hold a memtable in memory
-# while blocked. If you have a large heap and many data directories,
-# you can increase this value for better flush performance.
-# By default this will be set to the amount of data directories defined.
-#memtable_flush_writers: 1
-
-# the number of full memtables to allow pending flush, that is,
-# waiting for a writer thread. At a minimum, this should be set to
-# the maximum number of secondary indexes created on a single CF.
-memtable_flush_queue_size: 4
-
-# Whether to, when doing sequential writing, fsync() at intervals in
-# order to force the operating system to flush the dirty
-# buffers. Enable this to avoid sudden dirty buffer flushing from
-# impacting read latencies. Almost always a good idea on SSD:s; not
-# necessarily on platters.
-trickle_fsync: false
-trickle_fsync_interval_in_kb: 10240
-
-# TCP port, for commands and data
-storage_port: @@rhq.cassandra.storage.port(a)@
-
-# SSL port, for encrypted communication. Unused unless enabled in
-# encryption_options
-ssl_storage_port: @@rhq.cassandra.ssl.storage.port(a)@
-
-# Address to bind to and tell other Cassandra nodes to connect to. You
-# _must_ change this if you want multiple nodes to be able to
-# communicate!
-#
-# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
-# will always do the Right Thing *if* the node is properly configured
-# (hostname, name resolution, etc), and the Right Thing is to use the
-# address associated with the hostname (it might not be).
-#
-# Setting this to 0.0.0.0 is always wrong.
-listen_address: @@listen.address(a)@
-
-# Address to broadcast to other Cassandra nodes
-# Leaving this blank will set it to the same value as listen_address
-# broadcast_address: 1.2.3.4
-
-
-# Whether to start the native transport server.
-# Currently, only the thrift server is started by default because the native
-# transport is considered beta.
-# Please note that the address on which the native transport is bound is the
-# same as the rpc_address. The port however is different and specified below.
-start_native_transport: true
-# port for the CQL native transport to listen for clients on
-native_transport_port: @@rhq.cassandra.native_transport_port(a)@
-# The minimum and maximum threads for handling requests when the native
-# transport is used. The meaning is those is similar to the one of
-# rpc_min_threads and rpc_max_threads, though the default differ slightly and
-# are the ones below:
-# native_transport_min_threads: 16
-native_transport_max_threads: @@rhq.casandra.native_transport_max_threads(a)@
-
-
-# Whether to start the thrift rpc server.
-start_rpc: true
-# The address to bind the Thrift RPC service to -- clients connect
-# here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
-# you want Thrift to listen on all interfaces.
-#
-# Leaving this blank has the same effect it does for ListenAddress,
-# (i.e. it will be based on the configured hostname of the node).
-rpc_address: @@rpc.address(a)@
-# port for Thrift to listen for clients on
-rpc_port: @@rhq.cassandra.rpc_port(a)@
-
-# enable or disable keepalive on rpc connections
-rpc_keepalive: true
-
-# Cassandra provides three out-of-the-box options for the RPC Server:
-#
-# sync -> One thread per thrift connection. For a very large number of clients, memory
-# will be your limiting factor. On a 64 bit JVM, 128KB is the minimum stack size
-# per thread, and that will correspond to your use of virtual memory (but physical memory
-# may be limited depending on use of stack space).
-#
-# hsha -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
-# asynchronously using a small number of threads that does not vary with the amount
-# of thrift clients (and thus scales well to many clients). The rpc requests are still
-# synchronous (one thread per active request).
-#
-# The default is sync because on Windows hsha is about 30% slower. On Linux,
-# sync/hsha performance is about the same, with hsha of course using less memory.
-#
-# Alternatively, can provide your own RPC server by providing the fully-qualified class name
-# of an o.a.c.t.TServerFactory that can create an instance of it.
-rpc_server_type: sync
-
-# Uncomment rpc_min|max_thread to set request pool size limits.
-#
-# Regardless of your choice of RPC server (see above), the number of maximum requests in the
-# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
-# RPC server, it also dictates the number of clients that can be connected at all).
-#
-# The default is unlimited and thus provide no protection against clients overwhelming the server. You are
-# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
-# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
-#
-# rpc_min_threads: 16
-# rpc_max_threads: 2048
-
-# uncomment to set socket buffer sizes on rpc connections
-# rpc_send_buff_size_in_bytes:
-# rpc_recv_buff_size_in_bytes:
-
-# Frame size for thrift (maximum field length).
-thrift_framed_transport_size_in_mb: 15
-
-# The max length of a thrift message, including all fields and
-# internal thrift overhead.
-thrift_max_message_length_in_mb: 16
-
-# Set to true to have Cassandra create a hard link to each sstable
-# flushed or streamed locally in a backups/ subdirectory of the
-# Keyspace data. Removing these links is the operator's
-# responsibility.
-incremental_backups: false
-
-# Whether or not to take a snapshot before each compaction. Be
-# careful using this option, since Cassandra won't clean up the
-# snapshots for you. Mostly useful if you're paranoid when there
-# is a data format change.
-snapshot_before_compaction: false
-
-# Whether or not a snapshot is taken of the data before keyspace truncation
-# or dropping of column families. The STRONGLY advised default of true
-# should be used to provide data safety. If you set this flag to false, you will
-# lose data on truncation or drop.
-auto_snapshot: true
-
-# Add column indexes to a row after its contents reach this size.
-# Increase if your column values are large, or if you have a very large
-# number of columns. The competing causes are, Cassandra has to
-# deserialize this much of the row to read a single column, so you want
-# it to be small - at least if you do many partial-row reads - but all
-# the index data is read for each access, so you don't want to generate
-# that wastefully either.
-column_index_size_in_kb: 64
-
-# Size limit for rows being compacted in memory. Larger rows will spill
-# over to disk and use a slower two-pass compaction process. A message
-# will be logged specifying the row key.
-in_memory_compaction_limit_in_mb: 64
-
-# Number of simultaneous compactions to allow, NOT including
-# validation "compactions" for anti-entropy repair. Simultaneous
-# compactions can help preserve read performance in a mixed read/write
-# workload, by mitigating the tendency of small sstables to accumulate
-# during a single long running compactions. The default is usually
-# fine and if you experience problems with compaction running too
-# slowly or too fast, you should look at
-# compaction_throughput_mb_per_sec first.
-#
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
-#concurrent_compactors: 1
-
-# Multi-threaded compaction. When enabled, each compaction will use
-# up to one thread per core, plus one thread per sstable being merged.
-# This is usually only useful for SSD-based hardware: otherwise,
-# your concern is usually to get compaction to do LESS i/o (see:
-# compaction_throughput_mb_per_sec), not more.
-multithreaded_compaction: false
-
-# Throttles compaction to the given total throughput across the entire
-# system. The faster you insert data, the faster you need to compact in
-# order to keep the sstable count down, but in general, setting this to
-# 16 to 32 times the rate you are inserting data is more than sufficient.
-# Setting this to 0 disables throttling. Note that this account for all types
-# of compaction, including validation compaction.
-compaction_throughput_mb_per_sec: 16
-
-# Track cached row keys during compaction, and re-cache their new
-# positions in the compacted sstable. Disable if you use really large
-# key caches.
-compaction_preheat_key_cache: true
-
-# Throttles all outbound streaming file transfers on this node to the
-# given total throughput in Mbps. This is necessary because Cassandra does
-# mostly sequential IO when streaming data during bootstrap or repair, which
-# can lead to saturating the network connection and degrading rpc performance.
-# When unset, the default is 400 Mbps or 50 MB/s.
-# stream_throughput_outbound_megabits_per_sec: 400
-
-# How long the coordinator should wait for read operations to complete
-read_request_timeout_in_ms: 10000
-# How long the coordinator should wait for seq or index scans to complete
-range_request_timeout_in_ms: 10000
-# How long the coordinator should wait for writes to complete
-write_request_timeout_in_ms: 10000
-# How long the coordinator should wait for truncates to complete
-# (This can be much longer, because we need to flush all CFs
-# to make sure we can clear out anythink in the commitlog that could
-# cause truncated data to reappear.)
-truncate_request_timeout_in_ms: 60000
-# The default timeout for other, miscellaneous operations
-request_timeout_in_ms: 10000
-
-# Enable operation timeout information exchange between nodes to accurately
-# measure request timeouts, If disabled cassandra will assuming the request
-# was forwarded to the replica instantly by the coordinator
-#
-# Warning: before enabling this property make sure to ntp is installed
-# and the times are synchronized between the nodes.
-cross_node_timeout: false
-
-# Enable socket timeout for streaming operation.
-# When a timeout occurs during streaming, streaming is retried from the start
-# of the current file. This *can* involve re-streaming an important amount of
-# data, so you should avoid setting the value too low.
-# Default value is 0, which never timeout streams.
-# streaming_socket_timeout_in_ms: 0
-
-# phi value that must be reached for a host to be marked down.
-# most users should never need to adjust this.
-# phi_convict_threshold: 8
-
-# endpoint_snitch -- Set this to a class that implements
-# IEndpointSnitch. The snitch has two functions:
-# - it teaches Cassandra enough about your network topology to route
-# requests efficiently
-# - it allows Cassandra to spread replicas around your cluster to avoid
-# correlated failures. It does this by grouping machines into
-# "datacenters" and "racks." Cassandra will do its best not to have
-# more than one replica on the same "rack" (which may not actually
-# be a physical location)
-#
-# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
-# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
-# ARE PLACED.
-#
-# Out of the box, Cassandra provides
-# - SimpleSnitch:
-# Treats Strategy order as proximity. This improves cache locality
-# when disabling read repair, which can further improve throughput.
-# Only appropriate for single-datacenter deployments.
-# - PropertyFileSnitch:
-# Proximity is determined by rack and data center, which are
-# explicitly configured in cassandra-topology.properties.
-# - GossipingPropertyFileSnitch
-# The rack and datacenter for the local node are defined in
-# cassandra-rackdc.properties and propagated to other nodes via gossip. If
-# cassandra-topology.properties exists, it is used as a fallback, allowing
-# migration from the PropertyFileSnitch.
-# - RackInferringSnitch:
-# Proximity is determined by rack and data center, which are
-# assumed to correspond to the 3rd and 2nd octet of each node's
-# IP address, respectively. Unless this happens to match your
-# deployment conventions (as it did Facebook's), this is best used
-# as an example of writing a custom Snitch class.
-# - Ec2Snitch:
-# Appropriate for EC2 deployments in a single Region. Loads Region
-# and Availability Zone information from the EC2 API. The Region is
-# treated as the Datacenter, and the Availability Zone as the rack.
-# Only private IPs are used, so this will not work across multiple
-# Regions.
-# - Ec2MultiRegionSnitch:
-# Uses public IPs as broadcast_address to allow cross-region
-# connectivity. (Thus, you should set seed addresses to the public
-# IP as well.) You will need to open the storage_port or
-# ssl_storage_port on the public IP firewall. (For intra-Region
-# traffic, Cassandra will switch to the private IP after
-# establishing a connection.)
-#
-# You can use a custom Snitch by setting this to the full class name
-# of the snitch, which will be assumed to be on your classpath.
-endpoint_snitch: SimpleSnitch
-
-# controls how often to perform the more expensive part of host score
-# calculation
-dynamic_snitch_update_interval_in_ms: 100
-# controls how often to reset all host scores, allowing a bad host to
-# possibly recover
-dynamic_snitch_reset_interval_in_ms: 600000
-# if set greater than zero and read_repair_chance is < 1.0, this will allow
-# 'pinning' of replicas to hosts in order to increase cache capacity.
-# The badness threshold will control how much worse the pinned host has to be
-# before the dynamic snitch will prefer other replicas over it. This is
-# expressed as a double which represents a percentage. Thus, a value of
-# 0.2 means Cassandra would continue to prefer the static snitch values
-# until the pinned host was 20% worse than the fastest.
-dynamic_snitch_badness_threshold: 0.1
-
-# request_scheduler -- Set this to a class that implements
-# RequestScheduler, which will schedule incoming client requests
-# according to the specific policy. This is useful for multi-tenancy
-# with a single Cassandra cluster.
-# NOTE: This is specifically for requests from the client and does
-# not affect inter node communication.
-# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
-# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
-# client requests to a node with a separate queue for each
-# request_scheduler_id. The scheduler is further customized by
-# request_scheduler_options as described below.
-request_scheduler: org.apache.cassandra.scheduler.NoScheduler
-
-# Scheduler Options vary based on the type of scheduler
-# NoScheduler - Has no options
-# RoundRobin
-# - throttle_limit -- The throttle_limit is the number of in-flight
-# requests per client. Requests beyond
-# that limit are queued up until
-# running requests can complete.
-# The value of 80 here is twice the number of
-# concurrent_reads + concurrent_writes.
-# - default_weight -- default_weight is optional and allows for
-# overriding the default which is 1.
-# - weights -- Weights are optional and will default to 1 or the
-# overridden default_weight. The weight translates into how
-# many requests are handled during each turn of the
-# RoundRobin, based on the scheduler id.
-#
-# request_scheduler_options:
-# throttle_limit: 80
-# default_weight: 5
-# weights:
-# Keyspace1: 1
-# Keyspace2: 5
-
-# request_scheduler_id -- An identifer based on which to perform
-# the request scheduling. Currently the only valid option is keyspace.
-# request_scheduler_id: keyspace
-
-# index_interval controls the sampling of entries from the primrary
-# row index in terms of space versus time. The larger the interval,
-# the smaller and less effective the sampling will be. In technicial
-# terms, the interval coresponds to the number of index entries that
-# are skipped between taking each sample. All the sampled entries
-# must fit in memory. Generally, a value between 128 and 512 here
-# coupled with a large key cache size on CFs results in the best trade
-# offs. This value is not often changed, however if you have many
-# very small rows (many to an OS page), then increasing this will
-# often lower memory usage without a impact on performance.
-index_interval: 128
-
-# Enable or disable inter-node encryption
-# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
-# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
-# suite for authentication, key exchange and encryption of the actual data transfers.
-# NOTE: No custom encryption options are enabled at the moment
-# The available internode options are : all, none, dc, rack
-#
-# If set to dc cassandra will encrypt the traffic between the DCs
-# If set to rack cassandra will encrypt the traffic between the racks
-#
-# The passwords used in these options must match the passwords used when generating
-# the keystore and truststore. For instructions on generating these files, see:
-# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/J...
-#
-server_encryption_options:
- internode_encryption: none
- keystore: conf/.keystore
- keystore_password: cassandra
- truststore: conf/.truststore
- truststore_password: cassandra
- # More advanced defaults below:
- # protocol: TLS
- # algorithm: SunX509
- # store_type: JKS
- # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
- # require_client_auth: false
-
-# enable or disable client/server encryption.
-client_encryption_options:
- enabled: false
- keystore: conf/.keystore
- keystore_password: cassandra
- # More advanced defaults below:
- # protocol: TLS
- # algorithm: SunX509
- # store_type: JKS
- # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
-
-
-# internode_compression controls whether traffic between nodes is
-# compressed.
-# can be: all - all traffic is compressed
-# dc - traffic between different datacenters is compressed
-# none - nothing is compressed.
-internode_compression: all
-
-# Enable or disable tcp_nodelay for inter-dc communication.
-# Disabling it will result in larger (but fewer) network packets being sent,
-# reducing overhead from the TCP protocol itself, at the cost of increasing
-# latency if you block for cross-datacenter responses.
-inter_dc_tcp_nodelay: true
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/log4j-server.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/log4j-server.properties
deleted file mode 100644
index 8f3fcf3..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/log4j-server.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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.
-
-# for production, you should probably set pattern to %c instead of %l.
-# (%l is slower.)
-
-# output messages into a rolling log file as well as stdout
-log4j.rootLogger=@@logging.level@(a),stdout,R
-
-# stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
-
-# rolling log file
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.maxFileSize=20MB
-log4j.appender.R.maxBackupIndex=50
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
-# Edit the next line to point to your logs directory
-log4j.appender.R.File=@@log.dir@@/@@rhq.cassandra.log.file.name(a)@
-log4j.appender.R.Threshold=@@logging.level(a)@
-
-# Application logging options
-#log4j.logger.org.apache.cassandra=DEBUG
-#log4j.logger.org.apache.cassandra.db=DEBUG
-#log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG
-
-# Adding this to avoid thrift logging disconnect errors.
-log4j.logger.org.apache.thrift.server.TNonblockingServer=ERROR
-
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/passwd.properties b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/passwd.properties
deleted file mode 100644
index e6c3d9b..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/cassandra/conf/passwd.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-# This is a sample password file for SimpleAuthenticator. The format of
-# this file is username=password. If -Dpasswd.mode=MD5 then the password
-# is represented as an md5 digest, otherwise it is cleartext (keep this
-# in mind when setting file mode and ownership).
-
-cassandra=cassandra
-@@rhq.cassandra.username@@=@@rhq.cassandra.password(a)@
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/deploy.xml b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/deploy.xml
deleted file mode 100644
index 8369389..0000000
--- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/resources/deploy.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<project name="rhq_cassandra_bundle"
- default="main"
- xmlns:rhq="antlib:org.rhq.bundle">
- <rhq:bundle name="${rhq.cassandra.bundle.name}"
- version="${rhq.cassandra.bundle.version}"
- description="A bundle for deploying RHQ Cassandra nodes.">
-
- <!--
- NOTE: the name attribute of an rhq:input-property does not support using a dash.
- There is a convention where dashes are used in property names in rhq properties files
- in the trailing part of a property name. If an rhq:input-property has a corresponding
- property in cassandra.properties and contains a dash, the dash will be changed to an
- underscore in this file.
- -->
-
- <rhq:input-property name="cluster.name"
- description="The name of the cluster. This is used to prevent machines in one logical cluster from joining another"
- required="true"
- defaultValue="rhqdev"
- type="string"/>
-
- <rhq:input-property name="cluster.dir"
- description="The directory in which Cassandra nodes will be installed"
- required="true"
- defaultValue=""
- type="string"/>
-
- <rhq:input-property name="data.dir"
- description="The directory where Cassandra should store data files."
- required="true"
- defaultValue="data"
- type="string"/>
-
- <rhq:input-property name="commitlog.dir"
- description="The directory where Cassandra stores its commit logs."
- required="true"
- defaultValue="commit_log"
- type="string"/>
-
- <rhq:input-property name="saved.caches.dir"
- description="The directory where Cassandra stores saved caches."
- required="true"
- defaultValue="saved_caches"
- type="string"/>
-
- <rhq:input-property name="log.dir"
- description="The directory where Cassandra stores log files."
- required="true"
- defaultValue="logs"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.log.file.name"
- description="The name of the log file to which Cassandra writes."
- required="true"
- defaultValue="rhq-storage-node.log"
- type="string"/>
-
- <rhq:input-property name="logging.level"
- description="The log4j logging level to use."
- required="false"
- defaultValue="DEBUG"
- type="string"/>
-
- <rhq:input-property name="seeds"
- description="A comma-delimited list of IP addresses/host names that are deemed contact points. Cassandra nodes use this list of hosts to find each other and learn the topology of the ring. If you are running a local development cluster, be sure to have aliases set up for localhost."
- required="false"
- defaultValue="127.0.0.1"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.num_tokens"
- description="Defines the number of tokens randomly assigned to a node on the ring. The more tokens, relative to other nodes, the larger the proportion of data that this node will store. You probably want all nodes to have the same number of tokens assuming they have equal hardware capability."
- required="false"
- defaultValue="256"
- type="string"/>
-
- <rhq:input-property name="jmx.port"
- description="The port over which Cassandra listens for JMX connections. Each node should be assigned a unique port."
- required="false"
- defaultValue="7200"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.storage.port"
- description="The port used for inter-node communication."
- required="false"
- defaultValue="7000"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.ssl.storage.port"
- description="The port used for encrypted inter-node communication."
- required="false"
- defaultValue="7001"
- type="string"/>
-
- <rhq:input-property name="listen.address"
- description="Address used for inter-node communication. Defaults to value of hostname property."
- required="true"
- defaultValue=""
- type="string"/>
-
- <rhq:input-property name="rpc.address"
- description="Address used for Thrift RPC client communication. Defaults to value of hostname property."
- required="true"
- defaultValue=""
- type="string"/>
-
- <rhq:input-property name="cassandra.ring.delay.property"
- required="false"
- defaultValue=""
- type="string"/>
-
- <rhq:input-property name="cassandra.ring.delay"
- description="When a node initializes it contacts a seed and then sleeps for RING_DELAY (milliseconds) to learn about other nodes in the cluster. Cassandra uses a default value of 30 seconds."
- required="false"
- defaultValue=""
- type="string"/>
-
- <rhq:input-property name="rhq.casandra.native_transport_max_threads"
- description="The maximum number of threads handling native CQL requests."
- required="false"
- defaultValue="64"
- type="integer"/>
-
- <rhq:input-property name="rhq.cassandra.native_transport_port"
- description="The port for the CQL native transport to listen for clients on."
- required="false"
- defaultValue="9042"
- type="integer"/>
-
- <rhq:input-property name="rhq.cassandra.rpc_port"
- description="The port to listen for Thrift clients on."
- required="false"
- defaultValue="9160"
- type="integer"/>
-
- <rhq:input-property name="rhq.cassandra.authenticator"
- description="A class that performs authentication. The value should be a fully qualified class name and implement IAuthenticator."
- required="false"
- defaultValue="org.rhq.cassandra.auth.SimpleAuthenticator"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.authorizer"
- description="A class that performs authorization. Used to limit/provide permissions. The value should be a fully qualified class name and implement IAuthorizer."
- required="false"
- defaultValue="org.rhq.cassandra.auth.SimpleAuthorizer"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.password.properties.file"
- description="The location of the password properties file used by SimpleAuthenticator. If a relative path is specified, its location is resolved relative to Cassandra's bin directory."
- required="false"
- defaultValue="./../conf/passwd.properties"
- type="file"/>
-
- <rhq:input-property name="rhq.cassandra.access.properties.file"
- description="The location of the authorization properties file used by SimpleAuthority. If a relative path is specified, its location is resolved relative to Cassandra's bin directory."
- required="false"
- defaultValue="./../conf/access.properties"
- type="file"/>
-
- <rhq:input-property name="rhq.cassandra.username"
- description="The username with which to authenticate requests to Cassandra."
- required="true"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.password"
- description="The password with which to authenticate requests to Cassandra."
- required="true"
- type="string"/>
-
- <rhq:input-property name="rhq.cassandra.max.heap.size"
- required="true"
- defaultValue="${MAX_HEAP_SIZE}"/>
-
- <rhq:input-property name="rhq.cassandra.heap.new.size"
- required="true"
- defaultValue="${HEAP_NEWSIZE}"/>
-
- <rhq:deployment-unit name="cassandra" preinstallTarget="pre-install" postinstallTarget="post-install">
-<!--
- <rhq:file name="dbsetup.script" destinationFile="scripts/dbsetup.script" replace="true"/>
--->
- <rhq:archive name="cassandra.zip">
- <rhq:replace>
- <rhq:fileset dir="conf">
- <include name="cassandra.yaml"/>
- </rhq:fileset>
- <rhq:fileset dir="conf">
- <include name="cassandra-env.sh"/>
- </rhq:fileset>
- <rhq:fileset dir="conf">
- <include name="log4j-server.properties"/>
- </rhq:fileset>
- <rhq:fileset dir="conf">
- <include name="passwd.properties"/>
- </rhq:fileset>
-<!--
- <rhq:fileset dir="scripts">
- <include name="dbsetup.script"/>
- </rhq:fileset>
--->
- </rhq:replace>
- </rhq:archive>
- </rhq:deployment-unit>
- </rhq:bundle>
-
- <target name="main"/>
-
- <target name="pre-install">
- <mkdir dir="${cluster.dir}"/>
-
- </target>
-
- <target name="post-install">
- <property name="bin.dir" value="${rhq.deploy.dir}/bin"/>
-
- <chmod file="${bin.dir}/cassandra" perm="+x"/>
- <chmod file="${bin.dir}/cqlsh" perm="+x"/>
- <chmod file="${bin.dir}/cassandra-cli" perm="+x"/>
- <chmod file="${bin.dir}/nodetool" perm="+x"/>
- </target>
-
-</project>
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
index dabe165..6b97958 100755
--- a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
@@ -71,13 +71,24 @@ function install_agent() {
}
function start() {
- #echo "start $@"
- wait_until_rhq_is_initialized
+ echo "Starting RHQ storage node"
+ cd $RHQ_SERVER_HOME/storage/bin
+ ./cassandra -p cassandra.pid 2>/dev/null
+
+ echo "Starting RHQ server"
+ cd $RHQ_SERVER_HOME/bin
+ ./rhq-server.sh start
+
+ echo "Starting RHQ agent"
+ cd $RHQ_SERVER_HOME/rhq-agent/bin
+ ./rhq-agent-wrapper.sh start
}
function stop() {
echo "Shutting down RHQ storage node"
- kill `cat $RHQ_SERVER_HOME/storage/bin/cassandra.pid`
+ storage_pid=`cat $RHQ_SERVER_HOME/storage/bin/cassandra.pid`
+ echo "RHQ storage node (pid=$storage_pid) is stopping..."
+ kill $storage_pid
echo "Shutting down RHQ server"
$RHQ_SERVER_HOME/bin/rhq-server.sh stop
11 years, 2 months
[rhq] Branch 'feature/cassandra-backend' - modules/enterprise
by John Sanda
modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 63e137a8f8114028dbbbe0a5b0454baa7746105f
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Mar 20 22:36:55 2013 -0400
initial impl for stop command
Right now the stop command attempts to stop everything - storage node, server,
and agent.
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
index 29c3291..dabe165 100755
--- a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
@@ -76,7 +76,14 @@ function start() {
}
function stop() {
- echo stop $@
+ echo "Shutting down RHQ storage node"
+ kill `cat $RHQ_SERVER_HOME/storage/bin/cassandra.pid`
+
+ echo "Shutting down RHQ server"
+ $RHQ_SERVER_HOME/bin/rhq-server.sh stop
+
+ echo "Shutting down RHQ agent"
+ $RHQ_SERVER_HOME/rhq-agent/bin/rhq-agent-wrapper.sh stop
}
function usage() {
11 years, 2 months
[rhq] Branch 'feature/cassandra-backend' - modules/enterprise
by John Sanda
modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh | 53 +++++++++-
1 file changed, 50 insertions(+), 3 deletions(-)
New commits:
commit 91a0eae73db107dd8a0fed9d141937ce1381f11b
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Mar 20 22:20:07 2013 -0400
add support for installing the agent
This commit brings a few changes:
* wait until rhq server is intialized
* install and configure agent
* start the agent
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
index 25a2986..29c3291 100755
--- a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq.sh
@@ -1,4 +1,13 @@
#!/bin/bash
+#
+# Note this script assumes GNU sed is installed. On Mac OS X a different
+# implementation of sed is installed and will not work with this script. If you
+# are on Mac OS X you can install GNU sed with the home brew package manager by
+# running,
+#
+# $ brew install gnu-sed
+# $ ln -s /usr/local/bin/gsed /usr/local/bin/sed
+# $ exec bash # this reloads the shell for changes to take effect
function install() {
#echo "install $@"
@@ -8,11 +17,15 @@ function install() {
echo "Installing RHQ Server"
sh ./rhq-server.sh start
- wait_for_server_to_init
+ wait_until_server_is_ready_to_run_installer
sh ./rhq-installer.sh
+
+ wait_until_rhq_is_initialized
+ echo "Installing RHQ agent"
+ install_agent
}
-function wait_for_server_to_init() {
+function wait_until_server_is_ready_to_run_installer() {
echo "Testing to seeing if RHQ server is initialized"
./rhq-installer.sh --test
while [ $? -ne 0 ]
@@ -24,8 +37,42 @@ function wait_for_server_to_init() {
echo "RHQ server is initialized and ready for installer to run"
}
+function wait_until_rhq_is_initialized() {
+ delay=15
+ server_log=../logs/server.log
+
+ finished=$(grep -c "StartupBean.*Server started." $server_log)
+ while [ $finished -ne 1 ]
+ do
+ echo "Waiting for RHQ server to initialize..."
+ sleep $delay
+ finished=$(grep -c "StartupBean.*Server started." $server_log)
+ done
+ echo "RHQ server is up"
+}
+
+function install_agent() {
+ agent_installer_dir="../modules/org/rhq/rhq-enterprise-server-startup-subsystem/main/deployments/rhq.ear/rhq-downloads/rhq-agent"
+ agent_installer="rhq-enterprise-agent-4.7.0-SNAPSHOT.jar"
+ rhq_host=`hostname`
+
+ cp "$agent_installer_dir/$agent_installer" "$RHQ_SERVER_HOME"/rhq-agent.jar
+ cd $RHQ_SERVER_HOME
+ java -jar rhq-agent.jar --install
+
+ sed_cmd="s;<entry key=\"rhq\.agent\.server\.bind-port.*$;\0\n<entry key=\"rhq.agent.server.bind-address\" value=\"$rhq_host\" />;g"
+ sed -i "$sed_cmd" rhq-agent/conf/agent-configuration.xml
+
+ rm "$RHQ_SERVER_HOME/rhq-agent-update.log"
+ rm "$RHQ_SERVER_HOME/rhq-agent.jar"
+
+ cd $RHQ_SERVER_HOME/rhq-agent/bin
+ ./rhq-agent-wrapper.sh start
+}
+
function start() {
- echo "start $@"
+ #echo "start $@"
+ wait_until_rhq_is_initialized
}
function stop() {
11 years, 2 months