- Deprecate Tasks.par(...) for safer alternative Task.par(...) that does not throw IllegalArgumentException on empty collection.
- Enable automatic cross-thread stack tracing. It is an optional feature, turned off by default. See
ParSeqGlobalConfiguration.setCrossThreadStackTracesEnabled()
.
- Fixed unbatching various types of BATCH_GET requests from BATCH_GET for complex keys.
- Fixing test in TestRequestContextProvider
- Adding a notion of taskType in ShallowTrace. The idea is to set a type (string) to tasks such as timerTask, withSideEffectTask, remoteTask etc. This tag would be displayed in trace visualization.
- Added RequestContext provider to ParSeqRestClient
- Added compile and master configurations to parseq's master ivy file to make it interact correctly with ivy files automatically generated from maven's pom files.
- Fixed unbatching GET from BATCH_GET for complex keys.
- Handle uncaught exception in SerialExecutor more gracefully
- Allow user to wire custom TaskQueue implementation into SerialExecutor
- Refactoring ZKClient in parseq-zk-client contrib project to use interface + builder pattern
- Fixed bug which caused shareable, batchable tasks to hang
- Added tasks with retry policy: Task.withRetryPolicy(...)
- Added MaxConcurrentPlans configuration parameter to Engine that enforces limit on how many concurrent Plans can be executed by Engine.
- Fixed backwards incompatible changes to Trace and TraceBuilder introduced in 2.4.0.
- Fixed backwards incompatible change to EngineBuilder introduced in 2.4.0.
- Added flexible timeout and batching configuration to ParSeqRestClient.
- Allow adding description to timeout task and TimeoutException.
- Renamed "timeoutTimer" task to "timeout".
- Truncating task names to 1024 characters.
- Decoupled batch size from number of keys in the batch.
- Added critical path filtering to Tracevis.
- Added PlanCompletionListener.
- Fixed type of response for BatchEntityResponse in batching restli client
- Fixed unwrapping EntityResponse from batch get response in batching restli client
- Trace.toString() now returns JSON representation that can be directly used in trace visualization tools
- Significant progress towards fully functional batching restli client
- Added convenience methods to BaseEngineTest
- Added Task based batching strategy to parseq-batching contrib project. It allows defining strategy using Task API.
- Fixed bug in setting system hidden attribute on fused task.
- Added parseq-batching contrib project. It allows automatic batching of asynchronous operations based on user defined strategy.
- Fixed bug in tracevis that caused filtering option not work correctly for certain types of graphs.
- Added tooltip to Graphviz view in tracevis.
- Improved documentation of SerialExecutor.
- Fixed bug in ShallowTraceBuilder that could cause NPE when getTrace() was called and task was cancelled at the same time.
- Fixed bug in recovery methods when task was cancelled.
- Tracing improvements:
- Changed the way tasks fusion is reflected in trace so that it is more intuitive and better reflects performance of individual transformations
- Added class name of lambdas passed to functional API to default task descriptions
- Changed ParTaskImpl to not be system hidden
- Revert behavior of Task.andThen(Task) to pre-2.0.7 because fix implemented in 2.0.7 is a backwards incompatible change. Change of semantics of Task.andThen(Task) will be revisited on next major version upgrade.
- Fix bug which caused that in expression first.andThen(second) second was executed even if first task failed.
- Include stack trace in the trace's value for failed tasks.
- Add checking for null values in various methods of Task.
- Updated dependencies of contrib projects
- Fixed invalid svg url in Graphviz view when html has base tag
- Fixed Content-type of POST to dot: application/json replaced with text/plain
- Fixed layout of zoom control in Graphviz view
- Fixed typos
- Generalized TracevisServer into a separate GraphvisEngine which can be used by many frameworks e.g. jetty or play
- Fix NPE in ShallowTraceBuilder copy constructor.
- Added version number to tracevis (issue #56).
- Degrade gracefully instead of showing error pop-up when tracevis-server is not accessible (issue #57).
- Added spellcheck="false" to textarea where JSON trace is pasted (issue #36).
- Added TraceUtil class to simplify generating JSON trace for a task.
- Fixed Javadoc to display better in Intellij IDEA.
- Internal implementation changes: simplified continuations implementation.
Fixes bug which caused errors propagated by flatMap to be nested in PromiseException
- Introduces new "functional" API in Task interface and deprecated most of v1.x API
- Added contrib folder for complementary projects:
- parseq-examples with v2.0 API examples
- parseq-legacy-exampels with v1.x API examples
- parseq-http-client that provides integration with Async Http Client library
- parseq-exec that provides integration with Java Process API
- parseq-tracevis-server that serves tracevis tool and is capable of rendering graphviz diagrams
- Refactored tracing mechanism:
- each task has unique id
- added configurable limit on number of relationships that are part of a trace this allows tracing large plans (millions of tasks)
- gracefully handle cycles in generated trace
- traces of all tasks belonging to the same plan are equal
- tasks trace is a trace of a plan that executed it
- tasks value is not included by default it (see Task.setTraceValueSerializer())
- Changed logging API so that it is possible to pass planClass to Engine.run()
- Improved reliability of promise propagation to avoid stack overflow in large plans (millions of tasks)
- Introduced blocking() method which allows integration of blocking APIs using multiple dedicated Executors
- Tracevis improvements:
- support for server-side graphviz diagrams generated by parseq-tracevis-server
- added zooming/panning in graphviz-view
- added "time slider" to graphviz-view
- Added shareable() method to allow sharing tasks among plans (avoid automatic cancellation)
- Introduced FusionTask that improves performance of non-blocking synchronous transformations
- Added side effect task.
- Removed hashCode() and equals() from TraceImpl to speed up trace creation.
- Numerous improvements to the tracevis tool
- We now cancel a plan if its execution fails due to a RejectedExecutionException being raised from the engine's task executor.
- Fixes to tracevis packaging.
- Tracevis bug fix.
- Publish parseq-tracevis package.
- Minor fixes to tests and examples.
- Added "ThrowableCallable" a Callable that allows a Throwable to be thrown
- Use slf4j-api to replace slf4j-log4j12 in build dependency.
- Changed BaseTask.run(Context) to throw Throwable instead of Exception.
- Performance improvements (i.e. quicker garbage collection) for timer tasks.
- Improvements to waterfall trace visualization including the ability to collapse composite tasks.
- BaseTask will now catch Throwable instead of Exception. Any Throwable caught will fail the task.
- Added AsyncCallableTask which makes it possible to use blocking tasks asynchronously. The intention is to use this for tasks that involve blocking IO. Thanks to cheftako for the contribution!
- Removed vararg methods for
Tasks.par
andTasks.seq
. In their place we've added type-safe alternatives that take up to 10 tasks. This change is not backward compatible for cases where an array was supplied to the varargs version ofTasks.par
andTasks.seq
or where a single task was given toTasks.par
orTasks.seq
. - Made JsonTraceDeserializer package private - it is not for public consumption
- Miscellaneous Javadoc improvements
- Minor performance improvements.
- Add visualization support to hide all parent tasks.
- PromiseListener.onResolved(..) now has the Promise that was completed as a parameter.
- Trace output now contains relationship of potential parents. A potential parent relationship is defined as a parent task running a child task that has already been completed.
- Dag visualization now includes:
- Dash edge between a potential parent to an potential child task.
- Dash edge between a predecessor to a successor task that has been completed.
- Solid edge between a potential parent to an potential child sink task.
- No changes
- Dist target now includes a tarball for tracevis.
- Added support for system hidden task with support for visualization. User defined hidden task should use ShallowTrace.setHidden(...).
- Misc code hygiene improvements
- BACKWARD INCOMPATIBLE:
- Removed Tasks.async. Use BaseTask instead.
- Renamed Tasks.sync to Tasks.callable.
- Removed Tasks.value which was only used for test purposes.
- Removed getStartNanos() and getEndNanos() from Task. Instead use Task.getShallowTrace() which returns a ShallowTrace that contains the getStartNanos() and getEndNanos().
- Engine creation has changed:
- Replace: new Engine(taskExecutor, timerExecutor)
- With: new EngineBuilder() .setTaskExecutor(taskExecutor) .setTimerExecutor(timerExecutor) .build();
- Engine.awaitTermination(...) provides a mechanism to wait for the engine to shutdown.
- Visualization improvements / fixes:
- Table: use a textarea for values
- Waterfall: use nanosecond precision for laying out bars
- Don't include value.toString() in task name for value task.
- Logging
- We now provide three loggers to collect task information at runtime:
- com.linkedin.parseq.Engine:all - logs all tasks
- com.linkedin.parseq.Engine:root - logs root tasks only
- com.linkedin.parseq.Engine:planClass=xyz - When xyz is a root class it and all of its descendants are logged.
- We provide two log levels with these loggers:
- DEBUG - logs task name and result type
- TRACE - logs task name, result type, and value
- We now provide three loggers to collect task information at runtime:
- Added Tasks.seq to support Iterable<Tasks<?>> as a parameter.
- Added support for hidden trace to indicate if it should be displayed in the visualization.
- Added attributes to trace such that additional information can be added.
- Added TraceBuilder to support customize Trace information.
- Added support for priorities to Tasks. Task priorities only influence ordering in a particular context.
- Remove the existing waterfall trace visualization and replace it with a more scalable and interactive javascript visualization.
- Rename BaseTask.run(...) to BaseTask.contextRun(...) and BaseTask.doRun(...) to BaseTask.run(...) to better match the method purpose.
- Replace existing trace printers with javascript based equivalents.
- Dag trace now includes the start time of the task.
- Added par(Iterable<Task> tasks) to the Tasks class. The new par(...) will
return the result of each of the supplied tasks. The ParTask will fail
if any of the executed task fails. Additional methods are available for
ParTask:
- getTasks() for the set of tasks related to ParTask.
- getSuccessful() to get the values of successfully executed tasks.
- Updated par(...) to return ParTask.
- Misc code hygiene improvements
-
Trace improvements
- Rename TaskTrace to Trace
- Move JsonTraceCodec to com.linkedin.parseq.trace.codec.json
- Move trace printers to com.linkedin.parseq.trace.printer
- More compact JSON serialization for traces:
- Don't include null or empty fields
- Render each trace once
- Set up edges independently of the traces
- Tasks now use null to indicate no value for startNanos and endNanos
- Traces are now fully immutable and thread-safe. Use TraceBuilders to create new traces or to copy and edit existing ones.
-
Task construction improvments
- Remove TaskDefs (use Tasks.action, Tasks.sync, Tasks.async, and new BaseTask()) in their place
- Added ValueTask - returns a pre-determined value upon execution
- Remove Named. The Tasks factory methods take a name and Task has a constructor that takes a name. If the empty Task constructor is used then getName() will return the value of toString() unless it has been overridden.
- Promises and Tasks now take Throwables instead of Exceptions. This provides better interoperability with frameworks like Pegasus and Play.
- Trace creation has changed:
- Old: TaskTraces.convertToTaskTrace(trace)
- New: task.getTrace()
- Remove/rename "assembler"
- Move com.linkedin.parseq.assembler.trace to com.linkedin.parseq.trace
- Move all classes in com.linkedin.parseq.assember to com.linkedin.parseq
- Rename Assembler to Engine
- Replace references to "assembler" with "engine"