sparkle 0.1 → 0.1.0.1
raw patch · 5 files changed
+64/−3 lines, 5 filesnew-uploader
Files
- Sparkle.hs +2/−2
- build/libs/sparkle.jar binary
- cbits/io_tweag_sparkle_Sparkle.h +53/−0
- sparkle.cabal +2/−1
- src/Control/Distributed/Spark/Context.hs +7/−0
Sparkle.hs view
@@ -6,7 +6,7 @@ import qualified Data.ByteString.Lazy as BS import Paths_sparkle import System.Environment (getArgs)-import System.FilePath ((</>), (<.>), takeBaseName)+import System.FilePath ((</>), (<.>), takeBaseName, takeFileName) import System.Info (os) import System.IO (hPutStrLn, stderr) import System.Process (readProcess)@@ -36,7 +36,7 @@ newjarbytes = fromArchive $ addEntryToArchive appzip (toArchive jarbytes) BS.writeFile ("." </> takeBaseName cmd <.> "jar") newjarbytes where- mkEntry file = toEntry (takeBaseName file) 0 <$> BS.readFile file+ mkEntry file = toEntry (takeFileName file) 0 <$> BS.readFile file main :: IO () main = do
build/libs/sparkle.jar view
binary file changed (11700 → 11704 bytes)
+ cbits/io_tweag_sparkle_Sparkle.h view
@@ -0,0 +1,53 @@+/* DO NOT EDIT THIS FILE - it is machine generated */+#include <jni.h>+/* Header for class io_tweag_sparkle_Sparkle */++#ifndef _Included_io_tweag_sparkle_Sparkle+#define _Included_io_tweag_sparkle_Sparkle+#ifdef __cplusplus+extern "C" {+#endif+/*+ * Class: io_tweag_sparkle_Sparkle+ * Method: sparkMain+ * Signature: ()V+ */+JNIEXPORT void JNICALL Java_io_tweag_sparkle_Sparkle_sparkMain+ (JNIEnv *, jclass);++/*+ * Class: io_tweag_sparkle_Sparkle+ * Method: initializeHaskellRTS+ * Signature: ()V+ */+JNIEXPORT void JNICALL Java_io_tweag_sparkle_Sparkle_initializeHaskellRTS+ (JNIEnv *, jclass);++/*+ * Class: io_tweag_sparkle_Sparkle+ * Method: finalizeHaskellRTS+ * Signature: ()V+ */+JNIEXPORT void JNICALL Java_io_tweag_sparkle_Sparkle_finalizeHaskellRTS+ (JNIEnv *, jclass);++/*+ * Class: io_tweag_sparkle_Sparkle+ * Method: apply+ * Signature: ([B[Ljava/lang/Object;)Ljava/lang/Object;+ */+JNIEXPORT jobject JNICALL Java_io_tweag_sparkle_Sparkle_apply+ (JNIEnv *, jclass, jbyteArray, jobjectArray);++/*+ * Class: io_tweag_sparkle_Sparkle+ * Method: invoke+ * Signature: ([B[Ljava/lang/Object;)V+ */+JNIEXPORT void JNICALL Java_io_tweag_sparkle_Sparkle_invoke+ (JNIEnv *, jclass, jbyteArray, jobjectArray);++#ifdef __cplusplus+}+#endif+#endif
sparkle.cabal view
@@ -1,5 +1,5 @@ name: sparkle-version: 0.1+version: 0.1.0.1 synopsis: Distributed Apache Spark applications in Haskell description: See README.md license: BSD3@@ -11,6 +11,7 @@ build-type: Custom cabal-version: >=1.10 extra-source-files:+ cbits/io_tweag_sparkle_Sparkle.h src/main/java/io/tweag/sparkle/Sparkle.java src/main/java/io/tweag/sparkle/SparkMain.java src/main/java/io/tweag/sparkle/function/HaskellVoidFunction.java
src/Control/Distributed/Spark/Context.hs view
@@ -51,3 +51,10 @@ master sc = do res <- call sc "master" [] reify res++getOrCreate :: SparkConf -> IO SparkContext+getOrCreate cnf = do+ scalaCtx :: J ('Class "org.apache.spark.SparkContext") <-+ callStatic (sing :: Sing "org.apache.spark.SparkContext") "getOrCreate" [coerce cnf]++ callStatic (sing :: Sing "org.apache.spark.api.java.JavaSparkContext") "fromSparkContext" [coerce scalaCtx]