New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aggregator: remove synchronous RPCs and extend to generic values #1535
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1535 +/- ##
==========================================
+ Coverage 78.8% 78.81% +<.01%
==========================================
Files 164 164
Lines 30333 30378 +45
==========================================
+ Hits 23905 23941 +36
- Misses 6428 6437 +9
|
431549f
to
51c8f3d
Compare
I made some changes, squashed and forced a push. The testing now tests floating point, string, array, and object value types. The |
This seems like a useful enhancement! Should we open a separate issue on creating a C API and man pages for the aggregator? This can go in as far as I'm concerned, just needs a rebase. |
Update the aggregator to remove use of synchronous RPCs in the forward and sink methods.
Extend the aggregator such that any json_t value can be aggregated. Values will be aggregated for any json_t types where `json_equal` returns true. The aggregator will thus now work for integer and double types, as well as strings, arrays, and even objects. Summary statistics (max,min) are only supported for integer and real types. The max and min members are kept at the top level of the json result written to kvs by the "sink" implementation.
Loosen restrictions on the types of values aggregated by the flux-aggregate test utility. Allow value argument on flux-aggregate cmdline to be a string or a numeric value. Add a `-e, --execute=CODE` argument to allow values that are created from arbitrary Lua CODE. This allows generation of arrays and complex objects for aggregator testing.
Add tests to ensure floating point, string, and complex object types work as the value target of aggregates.
51c8f3d
to
a3563f9
Compare
Restarted a bunch of stalled builders - looks like a travis issue, not one of ours. |
This is overall a fairly minor improvement to the aggregator module.
First the remaining synchronous RPCs were removed. Then the
int64_t
"value" (the target of the aggregate) was replaced with a genericjson_t
value. This allows identical values to be aggregated other than just integers, including floating-point, strings, and even JSON objects. As long asjson_equal()
returns true between two values, they will be coalesced by integer identifier.The "summary statistics" (min, max) are generalized into a summary object, however this is (currently) only supported for real and integer values.