Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/kshell.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env bash

MAVEN_REPO_BASE=$HOME/.m2/repository/org/jetbrains/kotlin
KOTLIN_VERSION=1.2.61
KSHELL_REPL_API_VERSION=0.2.5-1.2.60
SPARKLIN_VERSION=0.2.5
KOTLIN_VERSION=1.3.31
KSHELL_REPL_API_VERSION=0.2.7-1.3.31
SPARKLIN_VERSION=0.2.7-SNAPSHOT
TROVE4J=$HOME/.m2/repository/org/jetbrains/intellij/deps/trove4j/1.0.20190215/trove4j-1.0.20190215.jar
ANNOTATIONS=$HOME/.m2/repository/org/jetbrains/annotations/17.0.0/annotations-17.0.0.jar

# Kotlin libraries
KOTLIN_STDLIB=${MAVEN_REPO_BASE}/kotlin-stdlib/${KOTLIN_VERSION}/kotlin-stdlib-${KOTLIN_VERSION}.jar
Expand All @@ -19,7 +21,7 @@ KSHELL_REPL_API=$HOME/.m2/repository/com/github/khud/kshell-repl-api/${KSHELL_RE

KSHELL=$HOME/.m2/repository/sparklin/kshell/${SPARKLIN_VERSION}/kshell-${SPARKLIN_VERSION}.jar

JARS=${KOTLIN_COMPILER}:${KOTLIN_STDLIB}:${KOTLIN_REFLECT}:${KOTLIN_SCRIPT_RUNTIME}:${KSHELL_REPL_API}
JARS=${KOTLIN_COMPILER}:${KOTLIN_STDLIB}:${KOTLIN_REFLECT}:${KOTLIN_SCRIPT_RUNTIME}:${KSHELL_REPL_API}:${TROVE4J}:${ANNOTATIONS}

echo $JARS

Expand Down
12 changes: 7 additions & 5 deletions bin/sparklin-spark2x.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env bash

MAVEN_REPO_BASE=$HOME/.m2/repository/org/jetbrains/kotlin
KOTLIN_VERSION=1.2.61
KSHELL_REPL_API_VERSION=0.2.5-1.2.60
SPARKLIN_VERSION=0.2.5
KOTLIN_VERSION=1.3.31
KSHELL_REPL_API_VERSION=0.2.7-1.3.31
SPARKLIN_VERSION=0.2.7-SNAPSHOT
SPARKLIN_HOME=$HOME/Documents/research_projects/sparklin
TROVE4J=$HOME/.m2/repository/org/jetbrains/intellij/deps/trove4j/1.0.20190215/trove4j-1.0.20190215.jar
ANNOTATIONS=$HOME/.m2/repository/org/jetbrains/annotations/17.0.0/annotations-17.0.0.jar

# Kotlin libraries
KOTLIN_STDLIB=${MAVEN_REPO_BASE}/kotlin-stdlib/${KOTLIN_VERSION}/kotlin-stdlib-${KOTLIN_VERSION}.jar
Expand All @@ -30,9 +32,9 @@ export SPARKLIN_CONFIG=$HOME/Documents/research_projects/sparklin/conf/spark2x.p
KSHELL=$HOME/.m2/repository/sparklin/kshell/${SPARKLIN_VERSION}/kshell-${SPARKLIN_VERSION}.jar

# Apache Spark home directory must point to Spark version 2.x
SPARK_HOME=$HOME/Programs/spark-2.3.1-bin-hadoop2.7
SPARK_HOME=$HOME/Programs/spark-2.3.3-bin-hadoop2.7

JARS=${KOTLIN_COMPILER},${KOTLIN_STDLIB},${KOTLIN_REFLECT},${KOTLIN_SCRIPT_RUNTIME},${KSHELL_REPL_API},${SPARKLIN_PLUGIN},${HDFS_BROWSER_PLUGIN}
JARS=${KOTLIN_COMPILER},${KOTLIN_STDLIB},${KOTLIN_REFLECT},${KOTLIN_SCRIPT_RUNTIME},${KSHELL_REPL_API},${SPARKLIN_PLUGIN},${HDFS_BROWSER_PLUGIN},${TROVE4J},${ANNOTATIONS}

${SPARK_HOME}/bin/spark-submit --driver-class-path $KOTLIN_COMPILER_SHADED \
--conf spark.ui.showConsoleProgress=true \
Expand Down
4 changes: 2 additions & 2 deletions hdfs-browser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>


<artifactId>hdfs-browser</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions jline3-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>


<artifactId>jline3-shaded</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion kotlin-compiler-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>


Expand Down
20 changes: 16 additions & 4 deletions kshell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>

<artifactId>kshell</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down Expand Up @@ -46,13 +46,25 @@
<dependency>
<groupId>com.github.khud</groupId>
<artifactId>kshell-repl-api</artifactId>
<version>0.2.5-1.2.60</version>
<version>0.2.7-1.3.31</version>
</dependency>
<dependency>
<groupId>sparklin</groupId>
<artifactId>jline3-shaded</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jetbrains.intellij.deps</groupId>
<artifactId>trove4j</artifactId>
<version>1.0.20181211</version>
</dependency>
<!-- http://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>17.0.0</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ open class KShell(val disposable: Disposable,
}

companion object {
const val VERSION: String = "0.2.5"
const val VERSION: String = "0.2.7"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import kotlin.reflect.KVariance
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.primaryConstructor
import kotlin.reflect.full.valueParameters
import kotlin.reflect.jvm.javaField

class RuntimePlugin : Plugin {
inner class Imports(conf: Configuration): BaseCommand() {
Expand Down Expand Up @@ -209,6 +210,8 @@ class ExtractSymbols(private val wrapper: InvokeWrapper?, private val table: Sym

private fun readProperty(instance: Any, propertyName: String): Any? {
val klass = instance.javaClass.kotlin
return klass.declaredMemberProperties.first { it.name == propertyName }.get(instance)
return klass.declaredMemberProperties.first { it.name == propertyName }.apply {
if (isConst) javaField!!.get(null) else get(instance)
}
}
}
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<kotlin.version>1.2.61</kotlin.version>
<kotlin.version>1.3.31</kotlin.version>
<jvm.version>1.8</jvm.version>
<sparklin.version>0.2.5</sparklin.version>
<sparklin.version>0.2.7-SNAPSHOT</sparklin.version>
</properties>

<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<packaging>pom</packaging>

<modules>
<!--<module>jline3-shaded</module>-->
<module>jline3-shaded</module>
<module>kotlin-compiler-shaded</module>
<module>kshell</module>
<module>hdfs-browser</module>
Expand Down
4 changes: 2 additions & 2 deletions sparklin-spark-1.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>


<artifactId>sparklin-spark-1.x</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions sparklin-spark-2.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>sparklin</groupId>
<artifactId>sparklin</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>
</parent>


<artifactId>sparklin-spark-2.x</artifactId>
<version>0.2.5</version>
<version>0.2.7-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down