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
| filter { | |
| if [type] == "cassandralog" { | |
| grok { | |
| break_on_match => true | |
| match => { | |
| "message" => [ | |
| "%{CASS_COMPACTION_LARGE_KEY}", | |
| "%{CASS_SLAB_POOL_CLEANER_1}", | |
| "%{CASS_SLAB_POOL_CLEANER_2}", |
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/python | |
| import sys | |
| import ast | |
| data = ast.literal_eval(file(sys.argv[1]).read()) | |
| print sum(data.values()), sys.argv[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
| public static final ScriptEngineManager jsEngineManager = new ScriptEngineManager(); | |
| public static final ScriptEngine jsEngine = jsEngineManager.getEngineByExtension("js"); | |
| + // + " storageProxy.mutate_old(mutations, consistency_level));" | |
| + // + "storageProxy.mutate = | |
| + // + "storageProxy.mutate_old = storageProxy.mutate;" | |
| + try { | |
| + String script = "" | |
| + + "var storageProxy = Java.type(\"org.apache.cassandra.service.StorageProxy\").instance;" | |
| + // + "print(\"storageProxy.get \" + storageProxy.get(\"mutate\") + \"\\n\");" |
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
| https://bigquery.cloud.google.com/queries/hacker-news-analytics?pli=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
| def getMultiSegmentRdd( | |
| sc: SparkContext, | |
| sqlContext: CassandraSQLContext, | |
| keyspace: String, | |
| table: String, | |
| tenantId: Int, | |
| segments: Array[String], | |
| columns: Array[String] = Array()) : | |
| SchemaRDD = { | |
| val source = sc.parallelize(segments).map(Tuple2(tennantId, _)) |
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
| keyspace: keyspace1 | |
| keyspace_definition: | | |
| CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}; | |
| table: standard1 | |
| table_definition: | | |
| CREATE TABLE standard1 ( | |
| key blob, |
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
| cmake_minimum_required(VERSION 2.6.4) | |
| set(PROJECT_NAME_STR faces) | |
| set(FACES_PROJECT_NAME ${PROJECT_NAME_STR}) | |
| set(PROJECT_NAME ${PROJECT_NAME_STR}) | |
| project(${PROJECT_NAME_STR} C CXX) | |
| #------------------- | |
| # The version number | |
| #------------------- |
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
| sudo lsof -iTCP -sTCP:LISTEN -P -n |
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
| void | |
| print_hex( | |
| char* value, | |
| size_t size) | |
| { | |
| for (size_t i = 0; i < size; ++i) { | |
| printf("%02.2x ", (unsigned)(unsigned char) value[i]); | |
| } | |
| } | |
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
| std::cout << __FILE__ << " " << __LINE__ << " message_size: " << message_size << std::endl; |