This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<module xmlns="urn:jboss:module:1.0" name="org.apache-extras.cassandra-jdbc"> | |
<resources> | |
<resource-root path="cassandra-jdbc-1.2.0-SNAPSHOT.jar"/> | |
<resource-root path="cassandra-clientutil-1.2.0-beta1.jar"/> | |
<resource-root path="cassandra-thrift-1.2.0-beta1.jar"/> | |
<resource-root path="libthrift-0.7.0.jar"/> | |
<resource-root path="jsr305-1.3.9.jar"/> | |
<resource-root path="guava-12.0.jar"/> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Thrift slice query using Hector | |
SliceQuery<Integer, Long, Double> query = HFactory.createSliceQuery(keyspace, IntegerSerializer.get(), | |
LongSerializer.get(), DoubleSerializer.get()); | |
query.setColumnFamily(RAW_METRIC_DATA_CF); | |
query.setKey(scheduleId); | |
query.setRange(null, null, false, 10); | |
` | |
QueryResult<ColumnSlice<Long, Double>> queryResult = query.execute(); | |
List<HColumn<Long, Double>> actual = queryResult.get().getColumns(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Listeners({CassandraClusterManager.class}) | |
public class MyTest { | |
@BeforeClass | |
@DeployCluster(numNodes = 4) // installs, and starts 4 node cluster | |
public void initCluster() { | |
... | |
} | |
@AfterClass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE raw_metrics ( | |
schedule_id int, | |
time timestamp, | |
value double, | |
PRIMARY KEY (schedule_id, time) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE raw_metrics ( | |
schedule_id int, | |
time timestamp, | |
value double, | |
PRIMARY KEY (schedule_id, time) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd" | |
xmlns="urn:infinispan:config:5.2"> | |
<global> | |
<transport> | |
<properties> | |
<property name="configurationFile" value="jgroups-tcp.xml"/> | |
</properties> | |
</transport> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel sysctl configuration file | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Controls IP packet forwarding | |
net.ipv4.ip_forward = 0 | |
# Controls source route verification | |
net.ipv4.conf.default.rp_filter = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create column family metrics_aggregates_index | |
with comparator = 'CompositeType(DateType, Int32Type)' and | |
default_validation_class = Int32Type and | |
key_validation_class = UTF8Type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[default@rhq] get one_hour_metric_data[10261]; | |
=> (column=2012-06-14 16:00:00-0400:0, value=8528.610195208777, timestamp=1339707619159001, ttl=1209600) | |
=> (column=2012-06-14 16:00:00-0400:1, value=7914.6, timestamp=1339707619159002, ttl=1209600) | |
=> (column=2012-06-14 16:00:00-0400:2, value=8221.605097604388, timestamp=1339707619159000, ttl=1209600) | |
=> (column=2012-06-14 17:00:00-0400:0, value=80320.63306613911, timestamp=1339711200084005, ttl=1209600) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create column family one_hour_metric_data | |
with comparator = 'CompositeType(DateType, Int32Type)' and | |
default_validation_class = DoubleType and | |
key_validation_class = Int32Type; |