I meant in addition to API exposed via KuduScanner::OrderMode ( https://kudu.apache.org/cpp-client-api/classkudu_1_1client_1_1KuduScanner.html#a3d6c79325c9da9741d0accf1b43bf7f9 for Kudu C++ client API and corresponding Java counterpart), I don't think there are other ways documented in the API to have returned tablet rows ordered.
Thanks, Alexey On Sat, Jul 25, 2020 at 2:53 PM Alexey Serbin <aser...@cloudera.com> wrote: > Hi Petar, > > Yes, you are right: fault-tolerant scans sort their results in primary key > order (note: within a tablet only; this sort is not global). I'm not sure > there are other explicit guarantees exposed in the API in that regard. > > > Kind regards, > > Alexey > > On Thu, Jul 23, 2020 at 4:07 PM Petar Nikolov <petar.nikolo...@gmail.com> > wrote: > >> Hi all, >> >> I have a use case where I'd like to scan a single tablet and get back >> data sorted by primary key. >> My understanding is that Kudu scans read DiskRowSets, which are ordered, >> but if PK range spans more than 1 (not yet compacted) rowset, ordering >> would not be guaranteed. >> >> I saw a "setFaultTolerant" option in Kudu Java API. This adds the benefit >> of having a resumable scan and (implicitly?) sorts by PK? >> It is not explicitly mentioned in the Javadoc, so I'd like to know if I >> can rely on this API for ordering guarantees or is there another more >> suitable API? >> >> Best, >> Petar >> >