parkour.fs documentation
*temp-dir*
Default path to system temporary directory on the default
filesystem. May be overridden in configuration via the property
`parkour.temp.dir`.
Coercions
Protocol for coercing objects to Hadoop `Path`s and `java.net.URI`s. Logical
extension of `clojure.java.io/Coercions`.
distcache!
(distcache! conf uri-map)
Update Hadoop `conf` to merge the `uri-map` of local file paths to
URIs into the distributed cache configuration.
distcache-files
(distcache-files conf)
Retrieve map of existing distcache entries from `conf`.
distcacher
(distcacher uri-map)
Return a function for merging the `uri-map` of local paths to URIs
into the distributed cache files of a Hadoop configuration.
hidden?
(hidden? p)
True iff `p` is an HDFS-hidden ('_'-prefixed) file.
path
(path x)
(path x y)
(path x y & more)
Coerce argument(s) to a Path, resolving successive arguments against base.
path-array
(path-array ps)
Array of `Path`s for each entry in seq `ps`.
path-create
(path-create p)
(path-create fs p)
Create an output stream on `p` for `fs`, or default `fs` if not provided.
path-delete
(path-delete p)
(path-delete fs p)
Recursively delete files at path `p`.
path-exists?
(path-exists? p)
(path-exists? fs p)
path-fs
(path-fs p)
(path-fs conf p)
Hadoop filesystem for the path `p`.
path-glob
(path-glob p)
(path-glob fs p)
Expand path glob `p` to set of matching paths.
path-list
(path-list p)
(path-list fs p)
List the entries in the directory at path `p`.
path-map
(path-map dir)
(path-map fs dir)
Return map of file basename to full path for all files in `dir`.
path-open
(path-open p)
(path-open fs p)
Open an input stream on `p`, or default `fs` if not provided.
path-qualified
(path-qualified p)
(path-qualified fs p)
Expand path `p` to a filesystem-qualified path.
path?
(path? x)
True iff `x` is a Path.
temp-root
(temp-root conf)
uri
(uri x)
(uri x y)
(uri x y & more)
Coerce argument(s) to a URI, resolving successive arguments against base.
uri?
(uri? x)
True iff `x` is a URI.
with-copies
macro
(with-copies [name uri-map conf] & body)
Copy the URI values of `uri-map` to a temporary directory on the
default Hadoop filesystem, optionally specified by `conf`. Evaluate
`body` forms with `name` bound to the map of original `uri-map` keys
to new temporary paths.
with-copies*
(with-copies* conf uri-map f)
Function form of `with-copies`.
with-temp-dir
macro
(with-temp-dir [temp-dir conf] & body)
Run the forms in `body` with `temp-dir` bound to a Hadoop filesystem
temporary directory path, created via the optional `conf`.
with-temp-dir*
(with-temp-dir* f)
(with-temp-dir* conf f)
Function version of `with-temp-dir`.