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.conf
get
renamed get-param
set
renamed set-param
set-if-missing
renamed set-param-default
remove
renamed unset-param
master
no longer sets "local[*]"
if provided no argumentsto-string
renamed debug-str
sparkling.function
The 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.core
spark-context
moved to sparkplug.context/spark-context
local-spark-context
not implementeddefault-min-partitions
replaced by sparkplug.context/info
default-parallelism
replaced by sparkplug.context/info
stop
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->pairs
map-values
renamed map-vals
values
renamed vals
flat-map
renamed mapcat
flat-map-to-pair
renamed mapcat->pairs
flat-map-values
renamed mapcat-vals
map-partition
renamed map-partitions
map-partitions-to-pair
renamed map-partitions->pairs
map-partition-with-index
renamed map-partitions-indexed
sort-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-indexed
zip-with-unique-id
renamed zip-unique-ids
partitionwise-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/parallelize
parallelize-pairs
/into-pair-rdd
moved to sparkplug.rdd/parallelize-pairs
text-file
moved to sparkplug.rdd/text-file
whole-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-levels
cache
/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.broadcast
broadcast
moved to sparkplug.core/broadcast
value
not implemented, deref the broadcast values insteadsparkling.accumulator
accumulator
replaced with type-specific v2 constructors:
long-accumulator
double-accumulator
collection-accumulator
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close