You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "Hao Chen (JIRA)" <ji...@apache.org> on 2016/03/18 07:12:33 UTC
[jira] [Created] (KYLIN-1506) Refactor time-based filter on
resource
Hao Chen created KYLIN-1506:
-------------------------------
Summary: Refactor time-based filter on resource
Key: KYLIN-1506
URL: https://issues.apache.org/jira/browse/KYLIN-1506
Project: Kylin
Issue Type: Sub-task
Reporter: Hao Chen
Currently all operations like getJobOutputs/getJobs and so on are use two-times scan to get the response, for example, currently the scan always:
1. Get keys, sort, get first and last key (in fact which is just get by prefix filter)
2. Re-scan the keys with timestamp filter.
{code}
public List<ExecutableOutputPO> getJobOutputs(long timeStartInMillis, long timeEndInMillis) throws PersistentException {
try {
NavigableSet<String> resources = store.listResources(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT);
if (resources == null || resources.isEmpty()) {
return Collections.emptyList();
}
// Collections.sort(resources);
String rangeStart = resources.first();
String rangeEnd = resources.last();
return store.getAllResources(rangeStart, rangeEnd, timeStartInMillis, timeEndInMillis, ExecutableOutputPO.class, JOB_OUTPUT_SERIALIZER);
} catch (IOException e) {
logger.error("error get all Jobs:", e);
throw new PersistentException(e);
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)