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
(defn prepareKS! | |
"returns the string for cqlsh to make the keysapace based on the number of nodes" | |
[dcs bench] | |
(let [dropComm (str "drop KEYSPACE IF EXISTS " bench ";") | |
dcString (reduce (fn [oldDc newDc] (str oldDc ", 'dc_" newDc "':1")) "" dcs) | |
finalComm (str dropComm " create KEYSPACE " bench " WITH replication = {'class': 'NetworkTopologyStrategy'" dcString "};")] | |
finalComm | |
)) | |
(defn prepareDB! |
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
(in-ns 'jepsen.cassandra) | |
(def operationMap [ | |
{:n 1, :f :NO-TXN, | |
:javaFunc (fn [conn args] (tpcc.NewOrder/newOrder conn (nth args 0)(nth args 1)(nth args 2)(nth args 3)(nth args 4)(nth args 5)(nth args 6)(nth args 7))), | |
:freq 45/100} | |
{:n 2, :f :PM-TXN, |
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
(defproject jepsen.cassandra "0.1.0-SNAPSHOT" | |
:description "A Jepsen test for Cassandra" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:main jepsen.cassandra | |
:dependencies [[org.clojure/clojure "1.9.0"] | |
[jepsen "0.1.11"] | |
[environ "1.1.0"] | |
[verschlimmbesserung "0.1.3"]] | |
:java-source-paths ["/home/ubuntu/Jepsen_Java_Tests/src/main/java"] |
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
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
//////////////////// CREATING THE IGNITE CACHE INSTANCE | |
public void createAllCaches(Ignite ignite) { | |
// INITILIZE A SER CACHE: | |
CacheConfiguration<Integer, Integer> counter_cache = new CacheConfiguration<Integer, Integer>("counter"); | |
counter_cache.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); | |
counter_cache.setCacheMode(CacheMode.REPLICATED); | |
ignite.createCache(counter_cache); | |
} | |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// |