Пример #1
0
  @Override
  public void onPush(RowBatch rowBatch) {
    if (rowBatch.selectedInUse) {
      for (int i = 0; i < rowBatch.size; i++) {
        int p = rowBatch.selected[i];
        Row row = rowBatch.rows[p];

        String line = (String) row.get("line");
        if (line == null) continue;

        String sig = makeSignature(line);
        row.put("signature", sig);
      }
    } else {
      for (int i = 0; i < rowBatch.size; i++) {
        Row row = rowBatch.rows[i];

        String line = (String) row.get("line");
        if (line == null) continue;

        String sig = makeSignature(line);
        row.put("signature", sig);
      }
    }

    pushPipe(rowBatch);
  }
Пример #2
0
  @Override
  public void onPush(Row m) {
    String line = (String) m.get("line");
    if (line == null) return;

    String sig = makeSignature(line);
    m.put("signature", sig);
    pushPipe(m);
  }