Migrating from Sparkling should require very little work - a few functions have
changed names, but the API is extremely similar by design. The major change is
obviously to update the namespaces you're requiring; for example, instead of
requiring [sparkling.core :as spark], require [sparkplug.core :as spark].
Specific changes to be aware of are documented by namespace below.
sparkling.confget renamed get-paramset renamed set-paramset-if-missing renamed set-param-defaultremove renamed unset-parammaster no longer sets "local[*]" if provided no argumentsto-string renamed debug-strsparkling.functionThe names of all of the function interop classes changed and their serialization is slightly more efficient. Otherwise consumers shouldn't need to change much here.
sparkling.corespark-context moved to sparkplug.context/spark-contextlocal-spark-context not implementeddefault-min-partitions replaced by sparkplug.context/infodefault-parallelism replaced by sparkplug.context/infostop moved to sparkplug.context/stop!with-context moved to sparkplug.context/with-context and now expects a
two-element binding vector instead of separate symbol/config args.map-to-pair renamed map->pairsmap-values renamed map-valsvalues renamed valsflat-map renamed mapcatflat-map-to-pair renamed mapcat->pairsflat-map-values renamed mapcat-valsmap-partition renamed map-partitionsmap-partitions-to-pair renamed map-partitions->pairsmap-partition-with-index renamed map-partitions-indexedsort-by-key no longer auto-detects whether the first argument is a
comparator - explicitly pass the ascending? argument to provide a custom
comparison functionsample has more arities and a different argument signaturezip-with-index renamed zip-indexedzip-with-unique-id renamed zip-unique-idspartitionwise-sampled-rdd not implementedpartitioner-aware-union not implementedintersect-by-key not implementedglom not implementedcollect returns a vector instead of a mutable Java listcollect-map not implemented, use (spark/into {} rdd) insteadsave-as-text-file moved to sparkplug.rdd namespacehistogram not implementedparallelize/into-rdd moved to sparkplug.rdd/parallelizeparallelize-pairs/into-pair-rdd moved to sparkplug.rdd/parallelize-pairstext-file moved to sparkplug.rdd/text-filewhole-text-files moved to sparkplug.rdd namespacehash-partitioner moved to sparkplug.rdd namespacepartitions moved to sparkplug.rdd namespacepartitioner moved to sparkplug.rdd namespacepartition-by moved to sparkplug.rdd namespacerepartition moved to sparkplug.rdd namespacerepartition moved to sparkplug.rdd namespacecoalesce moved to sparkplug.rdd namespacecoalesce-max not implementedrekey not implementedSTORAGE-LEVELS moved to sparkplug.rdd/storage-levelscache/storage-level! replaced by sparkplug.rdd/cache!uncache moved to sparkplug.rdd/uncache!checkpoint moved to sparkplug.rdd/checkpoint!tuple moved to sparkplug.scala namespacecount-partitions not implementedtuple-by not implementedkey-by-fn not implementedrdd-name replaced by sparkplug.rdd/name and sparkplug.rdd/set-name for
the read and write operations, respectivelysparkling.broadcastbroadcast moved to sparkplug.core/broadcastvalue not implemented, deref the broadcast values insteadsparkling.accumulatoraccumulator replaced with type-specific v2 constructors:
long-accumulatordouble-accumulatorcollection-accumulatorCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |