Search in sources :

Example 1 with FlowRunRowKeyPrefix

use of org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunRowKeyPrefix in project hadoop by apache.

the class FlowRunEntityReader method getResults.

@Override
protected ResultScanner getResults(Configuration hbaseConf, Connection conn, FilterList filterList) throws IOException {
    Scan scan = new Scan();
    TimelineReaderContext context = getContext();
    RowKeyPrefix<FlowRunRowKey> flowRunRowKeyPrefix = new FlowRunRowKeyPrefix(context.getClusterId(), context.getUserId(), context.getFlowName());
    scan.setRowPrefixFilter(flowRunRowKeyPrefix.getRowKeyPrefix());
    FilterList newList = new FilterList();
    newList.addFilter(new PageFilter(getFilters().getLimit()));
    if (filterList != null && !filterList.getFilters().isEmpty()) {
        newList.addFilter(filterList);
    }
    scan.setFilter(newList);
    scan.setMaxVersions(Integer.MAX_VALUE);
    return getTable().getResultScanner(hbaseConf, conn, scan);
}
Also used : TimelineReaderContext(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext) FlowRunRowKey(org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunRowKey) FlowRunRowKeyPrefix(org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunRowKeyPrefix) Scan(org.apache.hadoop.hbase.client.Scan) FilterList(org.apache.hadoop.hbase.filter.FilterList) TimelineFilterList(org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList) PageFilter(org.apache.hadoop.hbase.filter.PageFilter)

Aggregations

Scan (org.apache.hadoop.hbase.client.Scan)1 FilterList (org.apache.hadoop.hbase.filter.FilterList)1 PageFilter (org.apache.hadoop.hbase.filter.PageFilter)1 TimelineReaderContext (org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext)1 TimelineFilterList (org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList)1 FlowRunRowKey (org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunRowKey)1 FlowRunRowKeyPrefix (org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunRowKeyPrefix)1