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
## If you did not install in the default directory, replace '/opt/datastax/cassandraodbc' | |
## with the correct location. | |
[ODBC] | |
Trace=no | |
[ODBC Data Sources] | |
spark64=Simba Spark ODBC Driver 64-bit | |
[spark64] |
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
A. DSEFS | |
-------- | |
0.1. Enable | |
vi /etc/default/dse | |
Edit to enable Spark | |
vi /etc/dse/dse.yaml | |
Edit to enable dsefs | |
dsefs_option: | |
enabled: true |
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
#!/usr/bin/python | |
#+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
#|R|a|s|p|b|e|r|r|y|P|i|-|S|p|y|.|c|o|.|u|k| | |
#+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
# | |
# ultrasonic_1.py | |
# Measure distance using an ultrasonic module | |
# | |
# Author : Matt Hawkins | |
# Date : 09/01/2013 |
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
#!/bin/bash | |
cqlsh -e "CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}" | |
cqlsh -e "CREATE TABLE test.dtest(pkey INT, info TEXT, link TEXT, dsefs_contents TEXT, PRIMARY KEY ((pkey)))" | |
echo This is a test > /tmp/test1.txt | |
echo This is another test > /tmp/test2.txt | |
echo Hello World > /tmp/test3.txt | |
echo Thank You > /tmp/test4.txt | |
dse fs "mkdir /fittest" | |
dse fs "put /tmp/test1.txt /fittest/test1.txt" | |
dse fs "put /tmp/test2.txt /fittest/test2.txt" |
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
5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa | |
---|---|---|---|---|---|
4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa | |
4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa | |
4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa | |
5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa | |
5.4 | 3.9 | 1.7 | 0.4 | Iris-setosa | |
4.6 | 3.4 | 1.4 | 0.3 | Iris-setosa | |
5.0 | 3.4 | 1.5 | 0.2 | Iris-setosa | |
4.4 | 2.9 | 1.4 | 0.2 | Iris-setosa | |
4.9 | 3.1 | 1.5 | 0.1 | Iris-setosa |
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
#!/bin/bash | |
for i in {1..30000}; do ./survey.sh; sleep 0.2; done; |
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
setup-disks.sh | |
============== | |
#!/bin/bash | |
set -vx | |
# Execute this file dirctly (don't source it) if you want to use the `$(dirname $0)` construct | |
function maybe_skip_drive { | |
local drive=$1 | |
if ! [ -b $drive ]; then |
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
private void ghettoLog(String fname, String msg) { | |
try { | |
Files.write(Paths.get("/tmp/logit"), Arrays.asList(s), StandardOpenOption.APPEND); | |
} | |
catch (Exception e) { } | |
} |
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
CREATE KEYSPACE lab WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}; | |
use lab; | |
CREATE OR REPLACE FUNCTION lww_accumulate(state MAP<INT,INT>, mutid INT, val INT) | |
CALLED ON NULL INPUT | |
RETURNS MAP<INT,INT> | |
LANGUAGE java | |
AS ' | |
state.put(mutid, val); | |
return state; |
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
/* | |
javac -cp "/home/digger/dse/resources/cassandra/lib/*" -d target/ src/hessian/invest/DeleteInsert.java | |
jar cf DeleteInsert.jar -C target/ hessian | |
cp DeleteInsert.jar ~/dse/resources/cassandra/conf/triggers/ | |
nodetool reloadtriggers | |
CREATE TRIGGER deleteInsert ON ks.tbl USING 'hessian.invest.DeleteInsert'; | |
*/ | |
package hessian.invest; |