Liking cljdoc? Tell your friends :D

cascalog.api


<-cljmacro

(<- outvars & predicates)

Constructs a query or predicate macro from a list of predicates. Predicate macros support destructuring of the input and output variables.

Constructs a query or predicate macro from a list of
predicates. Predicate macros support destructuring of the input and
output variables.
raw docstring

?-clj

(?- & bindings)

Executes 1 or more queries and emits the results of each query to the associated tap.

Syntax: (?- sink1 query1 sink2 query2 ...) or (?- query-name sink1 query1 sink2 query2)

If the first argument is a string, that will be used as the name for the query and will show up in the JobTracker UI.

Executes 1 or more queries and emits the results of each query to
the associated tap.

Syntax: (?- sink1 query1 sink2 query2 ...)  or (?- query-name sink1
query1 sink2 query2)

 If the first argument is a string, that will be used as the name
for the query and will show up in the JobTracker UI.
raw docstring

?<-cljmacro

(?<- & args)

Helper that both defines and executes a query in a single call.

Syntax: (?<- out-tap out-vars & predicates) or (?<- "myflow" out-tap out-vars & predicates) ; flow name must be a static string within the ?<- form.

Helper that both defines and executes a query in a single call.

Syntax: (?<- out-tap out-vars & predicates) or (?<- "myflow"
out-tap out-vars & predicates) ; flow name must be a static string
within the ?<- form.
raw docstring

??-clj

(??- & args)

Executes one or more queries and returns a seq of seqs of tuples back, one for each subquery given.

Syntax: (??- query1 query2 ...) or (??- query-name query1 query2 ...)

If the first argument is a string, that will be used as the name for the query and will show up in the JobTracker UI.

Executes one or more queries and returns a seq of seqs of tuples
 back, one for each subquery given.

Syntax: (??- query1 query2 ...) or (??- query-name query1 query2 ...)

If the first argument is a string, that will be used as the name
for the query and will show up in the JobTracker UI.
raw docstring

??<-cljmacro

(??<- & args)

Like ??-, but for ?<-. Returns a seq of tuples.

Like ??-, but for ?<-. Returns a seq of tuples.
raw docstring

aggregatefncljmacro

(aggregatefn & body)

aggregateopclj


bufferfncljmacro

(bufferfn & body)

bufferiterfncljmacro

(bufferiterfn & body)

bufferiteropclj


bufferopclj


cascalog-tapclj

(cascalog-tap source sink)

combineclj

(combine & [g & gens])

Merge the tuples from the subqueries together into a single subquery. Doesn't ensure uniqueness of tuples.

Merge the tuples from the subqueries together into a single
subquery. Doesn't ensure uniqueness of tuples.
raw docstring

compile-flowclj

(compile-flow & args)

Inputs: [& args] Returns: ClojureFlow

Attaches output taps to some number of subqueries and creates a Cascading flow. The flow can be executed with .complete, or introspection can be done on the flow.

Syntax: (compile-flow sink1 query1 sink2 query2 ...) or (compile-flow flow-name sink1 query1 sink2 query2)

If the first argument is a string, that will be used as the name for the query and will show up in the JobTracker UI.

Inputs: [& args]
Returns: ClojureFlow

Attaches output taps to some number of subqueries and creates a
Cascading flow. The flow can be executed with `.complete`, or
introspection can be done on the flow.

Syntax: (compile-flow sink1 query1 sink2 query2 ...)
or (compile-flow flow-name sink1 query1 sink2 query2)

 If the first argument is a string, that will be used as the name
for the query and will show up in the JobTracker UI.
raw docstring

compile-hadoopclj

(compile-hadoop fd)

Inputs: [fd :- FlowDef] Returns: HadoopFlow

Compiles the supplied FlowDef into a Hadoop flow.

Inputs: [fd :- FlowDef]
Returns: HadoopFlow

Compiles the supplied FlowDef into a Hadoop flow.
raw docstring

constructclj

(construct output-fields raw-predicates)

Parses predicates and output fields and returns a proper subquery.

Parses predicates and output fields and returns a proper subquery.
raw docstring

cross-joinclj


defaggregatefncljmacro

(defaggregatefn name doc-string? attr-map? [fn-args*] body)

Defines a filtering operation.

Defines a filtering operation.
raw docstring

defaggregateopcljmacro

(defaggregateop sym__2971__auto__ & body__2972__auto__)

defbufferfncljmacro

(defbufferfn name doc-string? attr-map? [fn-args*] body)

Defines a filtering operation.

Defines a filtering operation.
raw docstring

defbufferiterfncljmacro

(defbufferiterfn name doc-string? attr-map? [fn-args*] body)

Defines a filtering operation.

Defines a filtering operation.
raw docstring

defbufferiteropcljmacro

(defbufferiterop sym__2971__auto__ & body__2972__auto__)

defbufferopcljmacro

(defbufferop sym__2971__auto__ & body__2972__auto__)

deffilterfncljmacro

(deffilterfn name doc-string? attr-map? [fn-args*] body)

Defines a filtering operation.

Defines a filtering operation.
raw docstring

deffilteropcljmacro

(deffilterop sym__2971__auto__ & body__2972__auto__)

defmaincljmacro

(defmain name & forms)

Defines an AOT-compiled function with the supplied name. Containing namespace must be marked for AOT compilation to have any effect.

Defines an AOT-compiled function with the supplied
`name`. Containing namespace must be marked for AOT compilation to
have any effect.
raw docstring

defmapcatfncljmacro

(defmapcatfn name doc-string? attr-map? [fn-args*] body)

Defines a mapcat operation.

Defines a mapcat operation.
raw docstring

defmapcatopcljmacro

(defmapcatop sym__2971__auto__ & body__2972__auto__)

defmapfncljmacro

(defmapfn name doc-string? attr-map? [fn-args*] body)

Defines a map operation.

Defines a map operation.
raw docstring

defmapopcljmacro

(defmapop sym__2971__auto__ & body__2972__auto__)

defparallelaggcljmacro

(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)

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)
raw docstring

defprepfncljmacro

(defprepfn name doc-string? attr-map? [fn-args*] body)

Defines a prepared operation.

Defines a prepared operation.
raw docstring

divclj

(div f & rest)

Perform floating point division on the arguments. Use this instead of / in Cascalog queries since / produces Ratio types which aren't serializable by Hadoop.

Perform floating point division on the arguments. Use this instead
of / in Cascalog queries since / produces Ratio types which aren't
serializable by Hadoop.
raw docstring

expand-querycljmacro

(expand-query outvars & predicates)

explainclj

(explain outfile query)
(explain outfile sink-tap query)

Explains a query (by outputting a DOT file).

outfile - String location for DOT file output. sink-tap - Sink tap for query. Shows on query explanation. Defaults to stdout if omitted. query - Query to be explained.

Syntax: (explain outfile query) or (explain outfile sink query)

Ex: (explain "outfile.dot" (<- [?a ?b] ([[1 2]] ?a ?b)))

Explains a query (by outputting a DOT file).

outfile  - String location for DOT file output.
sink-tap - Sink tap for query. Shows on query explanation. Defaults to stdout if omitted.
query    - Query to be explained.

Syntax: (explain outfile query)  or (explain outfile sink query)

Ex: (explain "outfile.dot" (<- [?a ?b] ([[1 2]] ?a ?b)))
raw docstring

filterfncljmacro

(filterfn & body)

filteropclj


get-out-fieldsclj

(get-out-fields _)

Get the fields of a generator.

Get the fields of a generator.
raw docstring

hfs-seqfileclj

(hfs-seqfile path & opts)

Creates a tap on HDFS using sequence file format. Different filesystems can be selected by using different prefixes for path.

Supports keyword option for :outfields. See cascalog.cascading.tap/hfs-tap for more keyword arguments.

See http://www.cascading.org/javadoc/cascading/tap/Hfs.html and http://www.cascading.org/javadoc/cascading/scheme/SequenceFile.html

Creates a tap on HDFS using sequence file format. Different
 filesystems can be selected by using different prefixes for `path`.

Supports keyword option for `:outfields`. See
`cascalog.cascading.tap/hfs-tap` for more keyword arguments.

 See http://www.cascading.org/javadoc/cascading/tap/Hfs.html and
 http://www.cascading.org/javadoc/cascading/scheme/SequenceFile.html
raw docstring

hfs-tapclj

(hfs-tap scheme
         path-or-file
         &
         {:keys [sinkmode sinkparts sink-template source-pattern templatefields]
          :as options})

Returns a Cascading Hfs tap with support for the supplied scheme, opened up on the supplied path or file object. Supported keyword options are:

:sinkmode - can be :keep, :update or :replace.

:sinkparts - used to constrain the segmentation of output files.

:source-pattern - Causes resulting tap to respond as a GlobHfs tap when used as source.

:sink-template - Causes resulting tap to respond as a TemplateTap when used as a sink.

:templatefields - When pattern is supplied via :sink-template, this option allows a subset of output fields to be used in the naming scheme.

See f.ex. the http://docs.cascading.org/cascading/2.0/javadoc/cascading/scheme/local/TextDelimited.html scheme.

Returns a Cascading Hfs tap with support for the supplied scheme,
opened up on the supplied path or file object. Supported keyword
options are:

`:sinkmode` - can be `:keep`, `:update` or `:replace`.

`:sinkparts` - used to constrain the segmentation of output files.

`:source-pattern` - Causes resulting tap to respond as a GlobHfs tap
when used as source.

`:sink-template` - Causes resulting tap to respond as a TemplateTap when
used as a sink.

`:templatefields` - When pattern is supplied via :sink-template,
this option allows a subset of output fields to be used in the
naming scheme.

See f.ex. the
http://docs.cascading.org/cascading/2.0/javadoc/cascading/scheme/local/TextDelimited.html
scheme.
raw docstring

hfs-textlineclj

(hfs-textline path & opts)

Creates a tap on HDFS using textline format. Different filesystems can be selected by using different prefixes for path. Supported keyword options are:

:outfields - used to select the fields written to the tap

:compression - one of :enable, :disable or :default

See cascalog.cascading.tap/hfs-tap for more keyword arguments.

See http://www.cascading.org/javadoc/cascading/tap/Hfs.html and http://www.cascading.org/javadoc/cascading/scheme/TextLine.html

Creates a tap on HDFS using textline format. Different filesystems
can be selected by using different prefixes for `path`. Supported
keyword options are:

`:outfields` - used to select the fields written to the tap

`:compression` - one of `:enable`, `:disable` or `:default`

See `cascalog.cascading.tap/hfs-tap` for more keyword arguments.

See http://www.cascading.org/javadoc/cascading/tap/Hfs.html and
http://www.cascading.org/javadoc/cascading/scheme/TextLine.html
raw docstring

jcompile-flowclj

(jcompile-flow & args)

Inputs: [& args] Returns: HadoopFlow

Inputs: [& args]
Returns: HadoopFlow
raw docstring

jflow-defclj

(jflow-def & args)

Inputs: [& args] Returns: FlowDef

Inputs: [& args]
Returns: FlowDef
raw docstring

lfs-seqfileclj

(lfs-seqfile path & opts)

Creates a tap that reads data off of the local filesystem in sequence file format.

Supports keyword option for :outfields. See cascalog.cascading.tap/lfs-tap for more keyword arguments.

See http://www.cascading.org/javadoc/cascading/tap/Lfs.html and http://www.cascading.org/javadoc/cascading/scheme/SequenceFile.html

Creates a tap that reads data off of the local filesystem in
 sequence file format.

Supports keyword option for `:outfields`. See
`cascalog.cascading.tap/lfs-tap` for more keyword arguments.

 See http://www.cascading.org/javadoc/cascading/tap/Lfs.html and
 http://www.cascading.org/javadoc/cascading/scheme/SequenceFile.html
raw docstring

lfs-tapclj

(lfs-tap scheme
         path-or-file
         &
         {:keys [sinkmode sinkparts sink-template source-pattern templatefields]
          :as options})

Returns a Cascading Lfs tap with support for the supplied scheme, opened up on the supplied path or file object. Supported keyword options are:

:sinkmode - can be :keep, :update or :replace.

:sinkparts - used to constrain the segmentation of output files.

:source-pattern - Causes resulting tap to respond as a GlobHfs tap when used as source.

:sink-template - Causes resulting tap to respond as a TemplateTap when used as a sink.

:templatefields - When pattern is supplied via :sink-template, this option allows a subset of output fields to be used in the naming scheme.

Returns a Cascading Lfs tap with support for the supplied scheme,
opened up on the supplied path or file object. Supported keyword
options are:

`:sinkmode` - can be `:keep`, `:update` or `:replace`.

`:sinkparts` - used to constrain the segmentation of output files.

`:source-pattern` - Causes resulting tap to respond as a GlobHfs tap
when used as source.

`:sink-template` - Causes resulting tap to respond as a TemplateTap
when used as a sink.

`:templatefields` - When pattern is supplied via :sink-template,
this option allows a subset of output fields to be used in the
naming scheme.
raw docstring

lfs-textlineclj

(lfs-textline path & opts)

Creates a tap on the local filesystem using textline format.

Supports keyword option for :outfields. See cascalog.cascading.tap/lfs-tap for more keyword arguments.

See http://www.cascading.org/javadoc/cascading/tap/Lfs.html and http://www.cascading.org/javadoc/cascading/scheme/TextLine.html

Creates a tap on the local filesystem using textline format.

Supports keyword option for `:outfields`. See
`cascalog.cascading.tap/lfs-tap` for more keyword arguments.

 See http://www.cascading.org/javadoc/cascading/tap/Lfs.html and
 http://www.cascading.org/javadoc/cascading/scheme/TextLine.html
raw docstring

mapcatfncljmacro

(mapcatfn & body)

mapcatopclj


mapfncljmacro

(mapfn & body)

mapopclj


memory-source-tapclj

(memory-source-tap tuples)
(memory-source-tap fields-in tuples)

name-varsclj

(name-vars gen vars)

num-out-fieldsclj

(num-out-fields _)

parallelaggclj


predmacrocljmacro

(predmacro & body)

A more general but more verbose way to create predicate macros.

Creates a function that takes in [invars outvars] and returns a list of predicates. When making predicate macros this way, you must create intermediate variables with gen-nullable-var(s). This is because unlike the (<- [?a :> ?b] ...) way of doing pred macros, Cascalog doesn't have a declaration for the inputs/outputs.

See https://github.com/nathanmarz/cascalog/wiki/Predicate-macros

A more general but more verbose way to create predicate macros.

Creates a function that takes in [invars outvars] and returns a
list of predicates. When making predicate macros this way, you must
create intermediate variables with gen-nullable-var(s). This is
because unlike the (<- [?a :> ?b] ...) way of doing pred macros,
Cascalog doesn't have a declaration for the inputs/outputs.

See https://github.com/nathanmarz/cascalog/wiki/Predicate-macros
raw docstring

predmacro*clj

(predmacro* fun)

Functional version of predmacro. See predmacro for details.

Functional version of predmacro. See predmacro for details.
raw docstring

prepfncljmacro

(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

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
raw docstring

select-fieldsclj

(select-fields gen fields)

Select fields of a named generator.

Example: (<- [?a ?b ?sum] (+ ?a ?b :> ?sum) ((select-fields generator ["?a" "?b"]) ?a ?b))

Select fields of a named generator.

Example:
(<- [?a ?b ?sum]
    (+ ?a ?b :> ?sum)
    ((select-fields generator ["?a" "?b"]) ?a ?b))
raw docstring

sequence-fileclj

(sequence-file field-names)

set-cascading-platform!clj

(set-cascading-platform!)

set-in-memory-platform!clj

(set-in-memory-platform!)

stdoutclj

(stdout)

Creates a tap that prints tuples sunk to it to standard output. Useful for experimentation in the REPL.

Creates a tap that prints tuples sunk to it to standard
output. Useful for experimentation in the REPL.
raw docstring

text-lineclj

(text-line)
(text-line field-names)
(text-line source-fields sink-fields)
(text-line source-fields sink-fields compression)

to-tailclj

(to-tail g & {:keys [fields]})

unionclj

(union & gens)

Merge the tuples from the subqueries together into a single subquery and ensure uniqueness of tuples.

Merge the tuples from the subqueries together into a single
subquery and ensure uniqueness of tuples.
raw docstring

with-job-confcljmacro

(with-job-conf conf & body)

Modifies the job conf for queries executed within the form. Nested with-job-conf calls will merge configuration maps together, with innermost calls taking precedence on conflicting keys.

Modifies the job conf for queries executed within the form. Nested
with-job-conf calls will merge configuration maps together, with
innermost calls taking precedence on conflicting keys.
raw docstring

with-serializationscljmacro

(with-serializations serial-vec & forms)

Enables the supplied serializations for queries executed within the form. Serializations should be provided as a vector of strings or classes, like so:

(import 'org.apache.hadoop.io.serializer.JavaSerialization) (with-serializations [JavaSerialization] (?<- ...))

Serializations nest; nested calls to with-serializations will merge and unique with serializations currently specified by other calls to with-serializations or with-job-conf.

Enables the supplied serializations for queries executed within the
form. Serializations should be provided as a vector of strings or
classes, like so:

(import 'org.apache.hadoop.io.serializer.JavaSerialization)
(with-serializations [JavaSerialization]
   (?<- ...))

Serializations nest; nested calls to with-serializations will merge
and unique with serializations currently specified by other calls to
`with-serializations` or `with-job-conf`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close