APEXMALHAR-2234 FilterOperator documentation #409
Conversation
@chinmaykolhatkar Could you please review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please take care of comments and squash and rebase with master?
|
||
## Operator Objective | ||
This operator receives an POJO ([Plain Old Java Object](https://en.wikipedia.org/wiki/Plain_Old_Java_Object)) as an incoming tuple | ||
and based on the filter condition it shall emit the filtered POJO on one output port and the rest on another output port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reword it as follows:
"...it emits filtered tuples on one output port and rest on another output port"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This operator receives an POJO ([Plain Old Java Object](https://en.wikipedia.org/wiki/Plain_Old_Java_Object)) as an incoming tuple | ||
and based on the filter condition it shall emit the filtered POJO on one output port and the rest on another output port. | ||
|
||
Filter operator supports quasi Java expressions to specify filter rule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not be for this review. But we need a documentation on quasi-Java expressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APEXMALHAR-2266 created for this
Filter operator does not hold any state and is **idempotent**, **fault-tolerant** and **statically/dynamically partitionable**. | ||
|
||
## Operator Usecase | ||
1. ***Customer data*** usually contains a field customer category/segment. One wants some analysis to be done for specific customer segment. One could filter the records based on segment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"One could use this filter operator to filter the records based on segment for some analysis for specific customer segment."
2. ***Log data*** processing pipeline may want to filter logs from specific machine/router/switch. | ||
|
||
## Operator Information | ||
1. Operator location: ***malhar-library*** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make this a link to : https://github.com/apache/apex-malhar/tree/master/library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| **Property** | **Description** | **Type** | **Mandatory** | **Default Value** | | ||
| -------- | ----------- | ---- | ------------------ | ------------- | | ||
| *condition* | condition/expression with which Filtering is done. | String | Yes | N/A | | ||
| *additionalExpressionFunctions* | List of import classes/method that should be made statically available to expression to use. | `List< String>`| No | Empty List | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List there is a space between < & S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
|
||
### Ports | ||
| **Port** | **Description** | **Type** | **Mandatory** | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of "Mandatory", can we make the tuple as "Connection Required"?
| **Port** | **Description** | **Type** | **Mandatory** | | ||
| -------- | ----------- | ---- | ------------------ | | ||
| *input* | Tuple which needs to be filtered are received on this port | Object (POJO) | Yes | | ||
| *truePort* | Tuples which satisfies `condition` are emitted on this port | Object (POJO) | No | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link condition to "props"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| -------- | ----------- | ---- | ------------------ | | ||
| *input* | Tuple which needs to be filtered are received on this port | Object (POJO) | Yes | | ||
| *truePort* | Tuples which satisfies `condition` are emitted on this port | Object (POJO) | No | | ||
| *falsePort* | Tuples which does not satisfy `condition` are emitted on this port | Object (POJO) | No | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link "condition" to props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Please add link to mkdocs.yml for the link to this document to appear in navigation. |
79d40d5
to
3f2ace4
Compare
@chinmaykolhatkar Incorporated review comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good.
@yogidevendra Please rebase with master. I'll merge it then. |
3f2ace4
to
9ca4e7a
Compare
Travis CI is passing but Jenkins build is failing. I would like to merge this PR as the change are only related to docs folder. This change does not impact CI builds. |
9ca4e7a
to
dd9d3d3
Compare
FilterOperator documentation``
dd9d3d3
to
5aa6250
Compare
No description provided.