- Transformation is done through Pipe #40
- branch : Chain of pipes without merge or split is called as branch #40
- Pipe Operations #40
- Filter
- Function
- Aggregator
- Count
- Buffer
- Assertion
- Examples
- ----- Example 1
- Pipe firstPipe = new Pipe("main");
- Pipe eachPipe = new Each(firstPipe, new MyFunction());
- eachPipe = new Each(firstPipe, new MyFilter());
- 'Each' (given above in example) #41
- Flows tuples one at a time through processing chain
- Allows 'Function' or 'Filter' operation
- ----- Example 1
- Pipe payroll =Pipe("payroll");
-
payroll = new Each(payroll, new calc_raise(), new Fields("name","division","salary","raise"));
- Splitting a Pipe #42
- ----- Example 1
- Pipe hrdata = new Each("hrdata", new Fields("name","address","phone"));
-
Pipe developers = new Each(hrdata, new GetDevelopers()); //This is a filter
- Pipe managers = new Each(hrdata, new GetManagers()); // This is a filter
- 'GroupBy' Pipe (GroupBy & sorting) #44
- ----- Example 1
- Pipe payroll = new Each("payroll", new Fields("division", "name", "salary", "rise"), new Identity());
-
// Group by division, sort by salaryFields groupFields = new Fields( "division");Fields sortFields = new Fields( "salary" );Pipe assembly = new GroupBy( payroll, groupFields, sortFields );
- 'Every' Pipe #44
- Operates on Groups of records (from GroupBy or CoGroup pipes)
- 'Merge' Pipe #46
- To join multiple stream into a single stream
- Join pipes #46
- CoGroup Pipe
- HashJoin Pipe
Wednesday, October 12, 2016
Pipe : 101
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment