Created
September 23, 2011 20:53
-
-
Save nathanmarz/1238411 to your computer and use it in GitHub Desktop.
Cascalog operation redesign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defaggregateop my-aggregator | |
{:params [a b c] | |
:prepare true} | |
[flow-process] | |
(let [] | |
(aggregator | |
(init [] | |
) | |
(aggregate [state field1 field2] | |
) | |
(complete [state] | |
) | |
(cleanup [] | |
)))) | |
(defaggregateop my-aggregator2 | |
{:params [a b c]} | |
(init [] | |
) | |
(aggregate [state field1 field2] | |
) | |
(complete [state] | |
)) | |
(defbufferop my-buffer [tuples] | |
) | |
(deffilterop my-filter | |
{:params [a b c] | |
:prepare true} | |
[flow-process] | |
(let [] | |
(operation | |
(execute [field1 field2] | |
) | |
(cleanup [] | |
)))) | |
(deffilterop my-filter2 {:params [a b c]} | |
[field1 field2] | |
) | |
(def op (my-filter2 1 2 3)) | |
(deffilterop my-filter3 [field1 field2] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment