use of com.google.code.or.common.glossary.Pair in project databus by linkedin.
the class ORListener method updateRows.
private void updateRows(UpdateRowsEvent ure) {
if (_ignoreSource) {
LOG.info("Ignoring update rows for " + _curSourceName);
return;
}
List<Pair<Row>> lp = ure.getRows();
List<Row> lr = new ArrayList<Row>(lp.size());
for (Pair<Row> pr : lp) {
Row r = pr.getAfter();
lr.add(r);
}
if (lr.size() > 0) {
LOG.info("UPDATE " + _curSourceName + ": " + lr.size());
frameAvroRecord(ure.getTableId(), ure.getHeader(), lr, DbusOpcode.UPSERT);
}
}
use of com.google.code.or.common.glossary.Pair in project databus by linkedin.
the class ORListener method updateRows.
private void updateRows(UpdateRowsEventV2 ure) {
if (_ignoreSource) {
LOG.info("Ignoring update rows for " + _curSourceName);
return;
}
List<Pair<Row>> lp = ure.getRows();
List<Row> lr = new ArrayList<Row>(lp.size());
for (Pair<Row> pr : lp) {
Row r = pr.getAfter();
lr.add(r);
}
if (lr.size() > 0) {
LOG.info("UPDATE " + _curSourceName + ": " + lr.size());
frameAvroRecord(ure.getTableId(), ure.getHeader(), lr, DbusOpcode.UPSERT);
}
}