[
https://issues.apache.org/jira/browse/KYLIN-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196955#comment-15196955
]
Hao Chen commented on KYLIN-1434:
---------------------------------
As a simpler backward compatible solution, we could simply push the filtering
logic from webserver-side into storage-layer like following into hbase using
customize filter:
{code}
List<CubingJob> results =
Lists.newArrayList(FluentIterable.from(getExecutableManager().getAllExecutables(timeStartInMillis,
timeEndInMillis)).filter(new Predicate<AbstractExecutable>() {
@Override
public boolean apply(AbstractExecutable executable) {
if (executable instanceof CubingJob) {
if (cubeName == null) {
return true;
}
return
CubingExecutableUtil.getCubeName(executable.getParams()).equalsIgnoreCase(cubeName);
} else {
return false;
}
}
}).transform(new Function<AbstractExecutable, CubingJob>() {
@Override
public CubingJob apply(AbstractExecutable executable) {
return (CubingJob) executable;
}
}).filter(new Predicate<CubingJob>() {
@Override
public boolean apply(CubingJob executable) {
if (null == projectName || null ==
getProjectManager().getProject(projectName)) {
return true;
} else {
ProjectInstance project =
getProjectManager().getProject(projectName);
return project.containsRealization(RealizationType.CUBE,
CubingExecutableUtil.getCubeName(executable.getParams()));
}
}
}).filter(new Predicate<CubingJob>() {
@Override
public boolean apply(CubingJob executable) {
return
statusList.contains(allOutputs.get(executable.getId()).getState());
}
}));
{code}
> Kylin Job Monitor API: /kylin/api/jobs is too slow
> --------------------------------------------------
>
> Key: KYLIN-1434
> URL: https://issues.apache.org/jira/browse/KYLIN-1434
> Project: Kylin
> Issue Type: Bug
> Affects Versions: v1.4.0
> Reporter: Hao Chen
>
> The API request for Job Monitor page like:
> {code}/kylin/api/jobs?limit=15&offset=15{code} takes more than 11 seconds for
> fetching only 15 row records (25.1 KB), which is too slow.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)