This file contains 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
http://www.datastax.com/dev/blog/cql3-for-cassandra-experts | |
http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0 | |
http://www.datastax.com/dev/blog/cql3-evolutions | |
http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra | |
http://www.datastax.com/dev/blog/whats-new-in-cql-3-0 | |
http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows | |
http://www.datastax.com/dev/blog/client-side-improvements-in-cassandra-2-0 |
This file contains 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
char *nodes_path = malloc(snprintf(NULL, 0, "%s%s%s", "/", cluster->name, "/nodes") + 1); | |
sprintf(nodes_path, "%s%s%s", "/", cluster->name, "/nodes"); | |
struct String_vector nodes; | |
int nodes_ret_val = zoo_wget_children(zh, nodes_path, nodes_watcher, context, &nodes); | |
free(nodes_path); |
This file contains 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
char *nodes_path = malloc(snprintf(NULL, 0, "%s%s%s", "/", cluster->name, "/nodes") + 1); | |
sprintf(nodes_path, "%s%s%s", "/", cluster->name, "/nodes"); | |
struct String_vector nodes; | |
int nodes_ret_val = zoo_wget_children(zh, nodes_path, | |
nodes_watcher, context, &nodes); | |
free(nodes_path); |
This file contains 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
char *work_unit_name_path = malloc(snprintf(NULL, 0, "%s%s", "/", cluster_config->work_unit_name) + 1); | |
sprintf(work_unit_name_path, "%s%s", "/", cluster_config->work_unit_name); | |
int work_unit_ret_val = zoo_wget_children(zh, work_unit_name_path, | |
verify_integrity_watcher, NULL, | |
(struct String_vector *) malloc(sizeof(struct String_vector))); | |
free(work_unit_name_path); |
This file contains 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
# whatever flags you want to pass to the C compiler & linker | |
AM_CFLAGS = --pedantic -Wall -std=c99 -O2 | |
AM_LDFLAGS = -lm | |
lib_LIBRARIES = libordacity.a | |
libordacity_a_SOURCES = Cluster.c queue_lock_mutex.c StringSet.c | |
include_HEADERS = ClusterConfig.h ClusterListener.h |
This file contains 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
2012-08-03_18:06:36.69261 INFO [2012-08-03 18:06:36,692] facade.PubSubService: Stream for 9JnrpKrMAxLfI11SypvQrx0cGEF-custom-query-8b49c9b1-78b8-4fea-b685-daf1d671146a-filter-d2870206-5958-40c7-a9f0-993b5cc808c3-aggregation-36fc43bf-66e5-4234-adc0-05b5d586b3b1-output is connected to ashbdrystrm05p.ood.ops, but should now consume (or re-subscribe) from ashbdrystrm07p.ood.ops. Switching... | |
2012-08-03_18:06:36.71975 ERROR [2012-08-03 18:06:36,715] facade.PubSubService: An error occurred in actor scalang.Process$$anon$7@5b3cb39a | |
2012-08-03_18:06:36.71978 ! scala.MatchError: (Reference('facade@ashbdrymess03p.ood.ops,Vector(6383, 1, 0),1),('state,9JnrpKrMAxLfI11SypvQrx0cGEF-discovery-output,java.nio.HeapByteBuffer[pos=0 lim=3064 cap=3064])) (of class scala.Tuple2) | |
2012-08-03_18:06:36.71979 ! at facade.PubSubService.handleInfo(PubSubService.scala:41) | |
2012-08-03_18:06:36.71980 ! at scalang.Service.onMessage(Service.scala:73) | |
2012-08-03_18:06:36.71980 ! at scalang.Process$$anon$7$$anonfun$onMessage$1.appl |
This file contains 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
case class Skateboard(id: String, brand: String, model: String, year: Int) | |
extends PersistentEntity { def getKey=id } | |
class RiakJSONEntityDAOSpec extends Spec with Logging { | |
val riakClient: IRiakClient = RiakFactory.pbcClient("localhost", 8087) | |
val skateboardDao = new RiakJSONEntityDAO[String, Skateboard](new RiakDriver[Skateboard]("skateboards", riakClient)) | |
skateboardDao.addStringIndex("brand") |
This file contains 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
class RiakJSONEntityDAO[K, T <: PersistentEntity](storageDriver: RiakStorageDriver[K, T])(implicit mf: Manifest[T]) | |
extends AbstractRiakEntityDAO[K, T](storageDriver: RiakStorageDriver[K, | |
T]) { | |
def fromDomain(t: T, vClock: VClock): IRiakObject = { | |
val dataAsString = generate(t) | |
val iRiakObject = RiakObjectBuilder.newBuilder(storageDriver.getBucket, t.getKey) | |
.withVClock(vClock) |
This file contains 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
trait GenericKeyValueDAO[K, T] { | |
def persist(key: K, t: T): T | |
def deleteByKey(key: K) | |
def delete(t: T) | |
} |
This file contains 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
case class Guitar(id: String, make: String, model: String, year: Int) {} | |
class GuitarDAO(storageDriver: RiakStorageDriver[String, Guitar]) | |
extends AbstractRiakEntityDAO[String, Guitar](storageDriver) with Converter[Guitar] { | |
def fromDomain(guitar: Guitar, vClock: VClock): IRiakObject = { | |
val dataAsString = generate(guitar) | |
RiakObjectBuilder.newBuilder("guitars", guitar.id).withVClock(vClock) | |
.withContentType(Constants.CTYPE_JSON) |