Skip to content

Instantly share code, notes, and snippets.

View SASI_Debug_patch_Cassandra_3.7.txt
commit c0fd82ca3555586767307456fd5d52ad1f70e666
Author: DuyHai DOAN <doanduyhai@gmail.com>
Date: Thu Jun 23 11:41:54 2016 +0200
Cassandra 3.7 patch for SASI debug
diff --git a/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java b/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
index 9a1f7f1..fe34073 100644
--- a/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
+++ b/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
View SASI_Debug_patch.txt
commit a1cd27e406b2671fd43600ab3bed060197348844
Author: DuyHai DOAN <doanduyhai@gmail.com>
Date: Sat Apr 23 22:56:37 2016 +0200
Debug SASI OnDiskIndex structure
diff --git a/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java b/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
index 9a1f7f1..d874467 100644
--- a/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
+++ b/src/java/org/apache/cassandra/index/sasi/disk/AbstractTokenTreeBuilder.java
View patch.diff
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
index d9b93f2..00df966 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
@@ -103,11 +103,16 @@ public abstract class Job {
this(jobName, listener, JobProgressPoller.DEFAULT_INTERVAL_MSEC);
}
+ public Job(String jobId, String jobName, JobListener listener) {
+ this(jobId, jobName, listener, JobProgressPoller.DEFAULT_INTERVAL_MSEC);
View sasi_bug.md
CREATE KEYSPACE music WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;

CREATE FUNCTION music.show_me_space(val text)
    RETURNS NULL ON NULL INPUT
    RETURNS text
    LANGUAGE java
    AS $$ return "_" + val + "_"; $$;
    
CREATE TABLE music.albums (
@doanduyhai
doanduyhai / CassandraInterpreterV2TestData.cql
Created Jan 5, 2016
Cassandra Interpreter V2 Test data
View CassandraInterpreterV2TestData.cql
CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = {
'class' : 'org.apache.cassandra.locator.SimpleStrategy',
'replication_factor': '1' }
AND DURABLE_WRITES = true;
CREATE TABLE IF NOT EXISTS test.test_max (
id int,
val1 int,
val2 int,
PRIMARY KEY (id)
@doanduyhai
doanduyhai / Spark-Cassandra-Zeppelin-instructions.md
Last active Mar 13, 2017
Instructions to use Zeppelin with Spark and Cassandra
View Spark-Cassandra-Zeppelin-instructions.md

This procedure is for Spark running in a stand-alone deployment mode

Please follow those instructions:

  1. Clone Zeppelin project from [master branch] on Github

  2. If you use DSE 4.8 (thus Spark 1.4) edit the file $ZEPPELIN_HOME/spark-dependencies/pom.xml. Duplicate the Maven profile cassandra-spark-1.3 to cassandra-spark-1.4 and update the spark-cassandra-connector version to 1.4.0

@doanduyhai
doanduyhai / Type Annotations on VariableElement
Last active Aug 29, 2015
Type Annotations on VariableElement
View Type Annotations on VariableElement
public static class SimpleEntityCodecFactoryTest {
private Map<@JSON Integer,Map<@Frozen Integer,@Enumerated(value = Enumerated.Encoding.NAME, test = "123") String>> map;
}
final TypeElement typeElement = elementUtils.getTypeElement(SimpleEntityCodecFactoryTest.class.getCanonicalName());
final List<VariableElement> els = ElementFilter.fieldsIn(typeElement.getEnclosedElements());
final VariableElement mapElt = els.stream().filter(x -> x.getSimpleName().contentEquals("map")).findFirst().get();
final com.sun.tools.javac.util.List<Attribute.TypeCompound> typeAttributes = ((Symbol.VarSymbol) mapElt).getMetadata().getTypeAttributes();
You can’t perform that action at this time.