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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
Changes the format specifier on SSTables **IN PLACE** | |
e.g. change | |
TwitterUserHistoricalValues-h-20983-Data.db | |
to be | |
TwitterUserHistoricalValues-g-20983-Data.db |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
Creates a directory of sym links to SSTables with a number higher than | |
a specified value. | |
Handy when you want to copy a delta. | |
See command line help for usage. |
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
#!/usr/bin/env python | |
"""Tool for profiling Cassandra query performance using reverse comparators. | |
Tests are run by profile() multiple times and the 'Read Latency' is | |
extracted using node tool. | |
Usage: | |
#Create the schema using the cassandra-cli. |
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
#!/usr/bin/env python | |
"""Script to output the token range ownership for Cassandra nodes. | |
usage: | |
$ ./token_range.py --interactive 154009024815050802110273337963779530663 141704132449535340642001248672108470009 102889564695022956386161396156024583904 | |
154009024815050802110273337963779530663 141704132449535340642001248672108470009 102889564695022956386161396156024583904 | |
69.95% - 102889564695022956386161396156024583904 | |
22.81% - 141704132449535340642001248672108470009 | |
7.23% - 154009024815050802110273337963779530663 | |
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
diff --git a/build.xml b/build.xml | |
index e5ec33b..c05f24c 100644 | |
--- a/build.xml | |
+++ b/build.xml | |
@@ -99,8 +99,8 @@ | |
<!-- Directory for temporary files. --> | |
<property name="dist.tmp" value="${dist.dir}/tmp"/> | |
- <property name="javac.source" value="1.2"/> | |
- <property name="javac.target" value="1.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
2011-07-26 17:23:34,376 ERROR CliDriver (SessionState.java:printError(343)) - Failed with exception java.io.IOException:java.lang.NullPointerException | |
java.io.IOException: java.lang.NullPointerException | |
at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:341) | |
at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:133) | |
at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1114) | |
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:187) | |
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241) | |
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:456) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
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
In [6]: import numpy as np | |
In [7]: np.random.po | |
np.random.poisson np.random.power | |
In [7]: np.random.poisson(100 / 60.0, 60) | |
Out[7]: | |
array([0, 2, 2, 1, 4, 3, 5, 3, 1, 0, 3, 1, 1, 1, 1, 2, 3, 2, 2, 0, 3, 2, 0, | |
2, 3, 1, 2, 1, 4, 1, 5, 1, 3, 1, 1, 3, 1, 3, 1, 1, 0, 1, 3, 1, 2, 4, | |
2, 3, 4, 2, 3, 3, 4, 3, 3, 1, 2, 3, 1, 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
"""Tool for profiling Cassandra query performance. | |
Tests are run by profile() multiple times and the 'Read Latency' is | |
extracted using node tool. | |
Usage: | |
#Create the schema using the cassandra-cli. | |
create keyspace query |
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
diff --git a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java | |
index 6cbc64b..014ce2c 100644 | |
--- a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java | |
+++ b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java | |
@@ -184,6 +184,7 @@ public class SSTableNamesIterator extends SimpleAbstractColumnIterator implement | |
} | |
} | |
} | |
+ logger.info("Column Page Count {}/{}", Integer.toString(indexList.size()), Integer.toString(ranges.size())); | |
} |
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
if __name__ == "__main__": | |
action = sys.argv[1] if len(sys.argv) > 1 else None | |
args = [ | |
token | |
for token in sys.argv[2:] | |
if token.find("=") < 0 | |
] | |
kwargs = dict( | |
token.split("=") | |
for token in sys.argv[2:] |