TODO: Some of these things need to move into hadoop-util.
TODO: Some of these things need to move into hadoop-util.
(delete-all bindings)delete-file-recursively is preemptive delete on exiting the code block for repl and tests run in the same process.
delete-file-recursively is preemptive delete on exiting the code block for repl and tests run in the same process.
(delete-all-fs fs paths)(delete-file-recursively f & [silently])Delete file f. If it's a directory, recursively delete all its contents. Raise an exception if any deletion fails unless silently is true.
Delete file f. If it's a directory, recursively delete all its contents. Raise an exception if any deletion fails unless silently is true.
(get-bytes bytes)Extracts a byte array from a Hadoop BytesWritable object. As
mentioned in the BytesWritable javadoc, only
the first N bytes are valid, where N = (.getLength byteswritable).
Extracts a byte array from a Hadoop BytesWritable object. As mentioned in the [BytesWritable javadoc](http://goo.gl/cjjlD), only the first N bytes are valid, where N = `(.getLength byteswritable)`.
(temp-dir sub-path)1) creates a directory in System.getProperty("java.io.tmpdir")
2) calls tempDir.deleteOn Exit() so the file is deleted by the jvm.
reference: ;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4735419
deleteOnExit is last resort cleanup on jvm exit.(temp-path sub-path)Use this variable as key in JobConf if you want to override the root of temporary paths. See with-fs-tmp.
Use this variable as key in JobConf if you want to override the root of temporary paths. See with-fs-tmp.
(unique-tmp-file s)Inputs: [s :- s/Str] Returns: File
Inputs: [s :- s/Str] Returns: File
(with-fs-tmp [fs-sym & tmp-syms] & body)Generates unique, temporary path names as subfolders of <root>/cascalog_reserved.
<root> by default will be '/tmp', but you can configure it via the
JobConf property cascalog.io/tmp-dir-property.
Generates unique, temporary path names as subfolders of <root>/cascalog_reserved. <root> by default will be '/tmp', but you can configure it via the JobConf property `cascalog.io/tmp-dir-property`.
(with-log-level level & body)(with-tmp-files bindings & body)(write-lines f lines)Writes lines (a seq) to f, separated by newlines. f is opened with writer, and automatically closed at the end of the sequence.
Writes lines (a seq) to f, separated by newlines. f is opened with writer, and automatically closed at the end of the sequence.
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 |