Skip to content

Commit

Permalink
Fix #1504, Fix long-run action state update issue
Browse files Browse the repository at this point in the history
  • Loading branch information
littlezhou committed Dec 25, 2017
1 parent bd0f994 commit 3d134fa
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,17 @@ public ActionGroup(List<ActionInfo> actions, long totalNumOfActions) {

public ActionGroup listActions(long pageIndex, long numPerPage,
List<String> orderBy, List<Boolean> isDesc) throws IOException, MetaStoreException {
List<ActionInfo> infos = metaStore.listPageAction((pageIndex - 1) * numPerPage,
numPerPage, orderBy, isDesc);
for (ActionInfo info : infos) {
ActionInfo memInfo = idToActions.get(info.getActionId());
if (memInfo != null) {
info.setCreateTime(memInfo.getCreateTime());
info.setProgress(memInfo.getProgress());
}
}

return new ActionGroup(metaStore.listPageAction((pageIndex - 1) * numPerPage,
numPerPage, orderBy, isDesc), metaStore.getCountOfAllAction());
return new ActionGroup(infos, metaStore.getCountOfAllAction());
}

public List<ActionInfo> getActions(long rid, int size) throws IOException {
Expand Down

0 comments on commit 3d134fa

Please sign in to comment.