use of com.alibaba.datax.plugin.reader.otsreader.callable.GetFirstRowPrimaryKeyCallable in project DataX by alibaba.
the class OtsReaderMasterProxy method getPKOfFirstRow.
private RowPrimaryKey getPKOfFirstRow(OTSRange range, Direction direction) throws Exception {
RangeRowQueryCriteria cur = new RangeRowQueryCriteria(this.conf.getTableName());
cur.setInclusiveStartPrimaryKey(range.getBegin());
cur.setExclusiveEndPrimaryKey(range.getEnd());
cur.setLimit(1);
cur.setColumnsToGet(Common.getPrimaryKeyNameList(meta));
cur.setDirection(direction);
return RetryHelper.executeWithRetry(new GetFirstRowPrimaryKeyCallable(ots, meta, cur), conf.getRetry(), conf.getSleepInMilliSecond());
}
Aggregations