(Tuple input)
| 139 | |
| 140 | static public class Initial extends EvalFunc<Tuple> { |
| 141 | @Override |
| 142 | public Tuple exec(Tuple input) throws IOException { |
| 143 | if (input == null || input.size() == 0) |
| 144 | return null; |
| 145 | Tuple output = TupleFactory.getInstance().newTuple(input.size()*(input.size()-1)); |
| 146 | try { |
| 147 | int k = -1; |
| 148 | for(int i=0;i<input.size();i++){ |
| 149 | for(int j=i+1;j<input.size();j++){ |
| 150 | DataBag first = (DataBag)input.get(i); |
| 151 | DataBag second = (DataBag)input.get(j); |
| 152 | output.set(++k, computeAll(first, second)); |
| 153 | output.set(++k, (Long)first.size()); |
| 154 | } |
| 155 | } |
| 156 | } catch(Exception t) { |
| 157 | System.err.println("Failed to process input record; error - " + t.getMessage()); |
| 158 | return null; |
| 159 | } |
| 160 | return output; |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | static public class Intermed extends EvalFunc<Tuple> { |
nothing calls this directly
no test coverage detected