Skip to content

Instantly share code, notes, and snippets.

@jeromatron
jeromatron / cassandra-jira-alfred-search.txt
Created October 20, 2020 06:17
Alfred link to search Cassandra Jira
alfred://customsearch/Cassandra%20Jira/cj/utf8/nospace/https%3A%2F%2Fissues.apache.org%2Fjira%2Fissues%2F%3Fjql%3Dproject%2520%253D%2520CASSANDRA%2520AND%2520text%2520~%2520%2522%7Bquery%7D%2522
@jeromatron
jeromatron / remap-caps-lock.sh
Created October 20, 2020 06:13
Remap caps lock to F1 on the Mac for Alfred
# Remapping caps lock to F1 for use with Alfred
# See https://developer.apple.com/library/archive/technotes/tn2450/_index.html
hidutil property --set '{"UserKeyMapping":
[{"HIDKeyboardModifierMappingSrc":0x700000039,
"HIDKeyboardModifierMappingDst":0x70000003A}]
}'
# Install Openshift Packages on Master,Compute,Infra
sudo yum install -y NetworkManager wget vim git zile net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct openssl-devel httpd-tools python-cryptography python2-pip python-devel python-passlib java-1.8.0-openjdk-headless "@Development Tools"
sudo yum update -y
# -----------------------------------------------------------------------
# Modify '/etc/NetworkManager/NetworkManager.conf' file on Master,Compute
# -----------------------------------------------------------------------
sudo sed -i '/^#plugins=ifcfg-rh,ibft/a dns=none' /etc/NetworkManager/NetworkManager.conf
# -------------------------------------------------------------------------
# Modify '/etc/sysconfig/network-scripts/ifcfg-eth0' file on Master,Compute
# -------------------------------------------------------------------------

graph-examples

This repo contains a collection of graph examples. The intent is to provide more complete and extensive examples than what is reasonable to include in DataStax documentation or blogposts. This will include DataStax Graph Loader mapping scripts, schemas, example traversals, things to try in DataStax Studio, and application code examples. Feel free to use and modify any of these for your own purposes. There is no warranty or implied official support, but hopefully the examples will be useful as a starting point to show various ways of loading and experimenting with graph data. And if you see anything that could be improved or added, issue reports and pull requests are always welcome!

Download DSE (includes DSE Graph), DataStax Studio, and the DSE Graph Loader at https://academy.datastax.com/downloads.

Additional datasets

For additional interesting datasets, you might consider the following resources:

@jeromatron
jeromatron / multidc-best-practices.md
Last active September 6, 2017 19:19
multi datacenter best practices
  • application considerations
    • application servers usually in each DC talking to local C* nodes
    • DCAwareRoundRobin load balancing policy (Java, but each language driver has analog)
      • along with LOCAL_* consistency levels, keeps you within a DC
      • can enable using remote host(s) for fault tolerance
  • when adding a dc
    • don't forget
      • open relevant ports across data centers
      • C* nodes in cluster fully connected
  • inter dc bandwidth can take ingest rate
@jeromatron
jeromatron / dependency-tree.txt
Created January 6, 2016 19:11
tinkerpop dependency tree
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Apache TinkerPop
[INFO] Apache TinkerPop :: Gremlin Shaded
[INFO] Apache TinkerPop :: Gremlin Core
[INFO] Apache TinkerPop :: Gremlin Test
[INFO] Apache TinkerPop :: Gremlin Groovy
[INFO] Apache TinkerPop :: Gremlin Groovy Test
@jeromatron
jeromatron / CHANGES.txt
Created November 27, 2015 03:41
2.1.5.469 CHANGES.txt
2.1.6
* Warn on misuse of unlogged batches (CASSANDRA-9282)
* Failure detector detects and ignores local pauses (CASSANDRA-9183)
* Add utility class to support for rate limiting a given log statement (CASSANDRA-9029)
* Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
* Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
* Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
* Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
* Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
* Validate the indexed column rather than the cell's contents for 2i (CASSANDRA-9057)
@jeromatron
jeromatron / user-defined-compaction.md
Last active April 12, 2018 13:12
Using jmxsh to compact specfic sstables

Sometimes you'll want to compact specific sstables and you won't want to major compact. You may not have the ability to run jconsole and want to use a command-line tool. There's a ticket (CASSANDRA-10660) to be able to do this with nodetool, but in the meantime, you can use something like jmxsh (or my mirror for when google pulls the plug on google code).

The jmx mbean to do user defined compaction is in the org.apache.cassandra.db package in the CompactionExecutor and the method is called forceUserDefinedCompaction. You'll need to get a list of sstables that you want to compact.

Start jmxsh with java -jar jmxsh-R5.jar -h localhost -p 7199:

jeremy$ java -jar jmxsh-R5.jar -h localhost -p 7199
jmxsh v1.0, Tue Jan 22 10:23:12 CST 2008
#!/bin/sh
# A shell script you can give to customers to check if all their repair sessions are complete.
# Change SYSTEM_LOG_PATH to the directory containing system.log
if [ "x$SYSTEM_LOG_PATH" = "x" ]; then
SYSTEM_LOG_PATH=.
fi
LOG_FILE_PATTERN=*.log*
NEW_SESSION_PATH=/tmp/new-session
COMPLETED_SESSION_PATH=/tmp/completed-successfully
#!/bin/sh
# A shell script you can give to customers to check if all their repair sessions are complete.
# Change SYSTEM_LOG_PATH to the directory containing system.log
if [ "x$SYSTEM_LOG_PATH" = "x" ]; then
SYSTEM_LOG_PATH=.
fi
LOG_FILE_PATTERN=*.log*
NEW_SESSION_PATH=/tmp/new-session
COMPLETED_SESSION_PATH=/tmp/completed-successfully