-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimized count, maximum, minimum in es adapter
fixes #39 with this we'll have a tremendous performance boost since since these reductions are done in the storage layer and we don't need to pull thousands of data points all the way into the **flume** runtime engine in order to calculate the same things. As an example of the performance boost: ```bash rlgomes@t460s> flume "emit(limit=100000, start='1970-01-01') | put(count=count()) | write('elastic', index='test', batch=1024)" 2016-09-06 21:39:50 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=38.256s rlgomes@t460s> flume --no-optimize "read('elastic', index='test') | reduce(count=count()) | write('stdio')" {"count": 100000, "time": "1970-01-01T00:00:00.000Z"} 2016-09-06 21:41:26 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=72.940s rlgomes@t460s> flume "read('elastic', index='test') | reduce(count=count()) | write('stdio')" {"count": 100000, "time": "1970-01-01T00:00:00.000Z"} 2016-09-06 21:42:07 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=.473s rlgomes@t460s> flume --no-optimize "read('elastic', index='test') | reduce(max=maximum('count')) | write('stdio')" {"max": 100000, "time": "1970-01-01T00:00:00.000Z"} 2016-09-06 21:43:21 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=57.814s rlgomes@t460s> flume "read('elastic', index='test') | reduce(max=maximum('count')) | write('stdio')" {"max": 100000.0, "time": "1970-01-01T00:00:00.000Z"} 2016-09-06 21:44:17 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=.439s rlgomes@t460s> flume --no-optimize "read('elastic', index='test') | reduce(min=minimum('count')) | write('stdio')" {"time": "1970-01-01T00:00:00.000Z", "min": 1} 2016-09-06 21:45:16 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=44.500s rlgomes@t460s> flume "read('elastic', index='test') | reduce(min=minimum('count')) | write('stdio')" {"min": 1.0, "time": "1970-01-01T00:00:00.000Z"} 2016-09-06 21:45:24 $?=0 pwd=/home/rlgomes/workspace/python/flume venv=env branch=(no duration=.381s ``` The above example is just when applied to 100K data points and yet the different is anywhere from 117x to 154x faster with the new optimizations.
- Loading branch information
Showing
7 changed files
with
424 additions
and
151 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.