sparkle 0.7.1 → 0.7.2
raw patch · 6 files changed
+52/−1 lines, 6 files
Files
- CHANGELOG.md +6/−0
- README.md +10/−0
- build.gradle +21/−0
- build/libs/sparkle.jar binary
- sparkle.cabal +2/−1
- src/Control/Distributed/Spark/RDD.hs +13/−0
CHANGELOG.md view
@@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). +## [Unreleased]++### Added++* More `RDD` method bindings: `sortBy`.+ ## [0.6] - 2017-07-16 ### Added
README.md view
@@ -189,6 +189,16 @@ See [#104](https://github.com/tweag/sparkle/issues/104) for more details. +### java.io.IOException: No FileSystem for scheme: s3n++Spark 2.2 requires explicitly specifying extra JAR files to `spark-submit`+in order to work with AWS. To work around this, add an additional 'packages'+argument when submitting the job:++```+spark-submit --packages com.amazonaws:aws-java-sdk:1.7.4,org.apache.hadoop:hadoop-aws:2.7.2,com.google.guava:guava:12.0+```+ ## License Copyright (c) 2015-2016 EURL Tweag.
+ build.gradle view
@@ -0,0 +1,21 @@+apply plugin: 'java'++repositories {+ mavenCentral()+}++dependencies {+ compile 'org.apache.spark:spark-core_2.10:1.6.0'+ compile 'org.apache.spark:spark-mllib_2.10:1.6.0'+}++compileJava {+ sourceCompatibility = 1.7+ targetCompatibility = 1.7+}++jar {+ manifest {+ attributes "Main-Class": "io.tweag.sparkle.SparkMain"+ }+}
build/libs/sparkle.jar view
binary file changed (13586 → 13104 bytes)
sparkle.cabal view
@@ -1,5 +1,5 @@ name: sparkle-version: 0.7.1+version: 0.7.2 synopsis: Distributed Apache Spark applications in Haskell description: See https://www.stackage.org/package/sparkle. homepage: http://github.com/tweag/sparkle#readme@@ -26,6 +26,7 @@ src/main/java/Helper.java CHANGELOG.md README.md+ build.gradle data-dir: build/libs data-files: sparkle.jar
src/Control/Distributed/Spark/RDD.hs view
@@ -36,6 +36,7 @@ , distinct , intersection , union+ , sortBy , sample , first , getNumPartitions@@ -124,6 +125,18 @@ f <- unsafeUngeneric <$> reflectFun (sing :: Sing 2) clos res :: JObject <- [java| $rdd.reduce($f) |] reify (unsafeCast res)++sortBy+ :: (Static (Reify a), Static (Reflect b), Typeable a, Typeable b)+ => Closure (a -> b)+ -> Choice "ascending"+ -> Int32+ -- ^ Number of partitions.+ -> RDD a+ -> IO (RDD a)+sortBy clos ascending numPartitions rdd = do+ f <- unsafeUngeneric <$> reflectFun (sing :: Sing 1) clos+ [java| $rdd.sortBy($f, $ascending, $numPartitions) |] aggregate :: (Static (Reify a), Static (Reify b), Static (Reflect b), Typeable a, Typeable b)