cascalog.logic.def documentation
This namespace contains the tools required to define custom
Cascalog operations, instantiated with appropriate metadata.
->ParallelAggregator
(->ParallelAggregator init-var combine-var present-var)
Positional factory function for class cascalog.logic.def.ParallelAggregator.
->ParallelBuffer
(->ParallelBuffer init-var combine-var present-var num-intermediate-vars-fn buffer-var)
Positional factory function for class cascalog.logic.def.ParallelBuffer.
->Prepared
(->Prepared op)
Positional factory function for class cascalog.logic.def.Prepared.
aggregatefn
macro
(aggregatefn & body)
aggregateop?
(aggregateop? op)
bufferfn
macro
(bufferfn & body)
bufferiterfn
macro
(bufferiterfn & body)
defaggregatefn
macro
(defaggregatefn name doc-string? attr-map? [fn-args*] body)
Defines a filtering operation.
defaggregateop
macro
(defaggregateop sym__898__auto__ & body__899__auto__)
defbufferfn
macro
(defbufferfn name doc-string? attr-map? [fn-args*] body)
Defines a filtering operation.
defbufferiterfn
macro
(defbufferiterfn name doc-string? attr-map? [fn-args*] body)
Defines a filtering operation.
defbufferiterop
macro
(defbufferiterop sym__898__auto__ & body__899__auto__)
defbufferop
macro
(defbufferop sym__898__auto__ & body__899__auto__)
defdefop
macro
(defdefop sym & body)
Helper macro to define the def*op macros.
defdeprecated
macro
(defdeprecated old new)
deffilterfn
macro
(deffilterfn name doc-string? attr-map? [fn-args*] body)
Defines a filtering operation.
deffilterop
macro
(deffilterop sym__898__auto__ & body__899__auto__)
defhelper
(defhelper name op-sym body)
defmapcatfn
macro
(defmapcatfn name doc-string? attr-map? [fn-args*] body)
Defines a mapcat operation.
defmapcatop
macro
(defmapcatop sym__898__auto__ & body__899__auto__)
defmapfn
macro
(defmapfn name doc-string? attr-map? [fn-args*] body)
Defines a map operation.
defmapop
macro
(defmapop sym__898__auto__ & body__899__auto__)
defparallelagg
macro
(defparallelagg name doc-string? attr-map? & {:keys [init-var combine-var present-var]})
Binds an efficient aggregator to the supplied symbol. A parallel
aggregator processes each tuple through an initializer function,
then combines the results each tuple's initialization until one
result is achieved. `defparallelagg` accepts two keyword arguments:
:init-var -- A var bound to a fn that accepts raw tuples and returns
an intermediate result; #'one, for example.
:combine-var -- a var bound to a fn that both accepts and returns
intermediate results.
For example,
(defparallelagg sum
:init-var #'identity
:combine-var #'+)
Used as
(sum ?x :> ?y)
defparallelbuf
macro
(defparallelbuf name doc-string? attr-map? & {:keys [init-var combine-var extract-var num-intermediate-vars-fn buffer-var]})
defprepfn
macro
(defprepfn name doc-string? attr-map? [fn-args*] body)
Defines a prepared operation.
filterfn
macro
(filterfn & body)
map->ParallelAggregator
(map->ParallelAggregator m__5818__auto__)
Factory function for class cascalog.logic.def.ParallelAggregator, taking a map of keywords to field values.
map->ParallelBuffer
(map->ParallelBuffer m__5818__auto__)
Factory function for class cascalog.logic.def.ParallelBuffer, taking a map of keywords to field values.
map->Prepared
(map->Prepared m__5818__auto__)
Factory function for class cascalog.logic.def.Prepared, taking a map of keywords to field values.
mapcatfn
macro
(mapcatfn & body)
prepared
(prepared afn)
Marks the supplied operation as needing to be prepared by
Cascading. The supplied op should take two arguments and return
another IFn for use by Cascading.
prepared?
(prepared? op)
Returns true if the supplied operation needs to be supplied the
FlowProcess and operation call by Cascading on instantiation, false
otherwise.
prepfn
macro
(prepfn args & body)
Defines a prepared operation. Pass in an argument vector of two
items and return either a function or a Map with two
keywords; :operate and :cleanup