Repository: lens
Updated Branches:
  refs/heads/master 9ace50b3e -> 1362e667e


LENS-1170: Queries can get stuck in EXECUTED state on restart


Project: http://git-wip-us.apache.org/repos/asf/lens/repo
Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/aad1250d
Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/aad1250d
Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/aad1250d

Branch: refs/heads/master
Commit: aad1250db9449cea7b65c6bad0b747dd158203b1
Parents: 9ace50b
Author: Rajat Khandelwal <pro...@apache.org>
Authored: Wed Jun 8 23:09:58 2016 +0530
Committer: Rajat Khandelwal <rajatgupt...@gmail.com>
Committed: Wed Jun 8 23:09:58 2016 +0530

----------------------------------------------------------------------
 .../lens/server/query/QueryExecutionServiceImpl.java      | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lens/blob/aad1250d/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
 
b/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
index 23c7743..fde432f 100644
--- 
a/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
+++ 
b/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
@@ -1335,6 +1335,14 @@ public class QueryExecutionServiceImpl extends 
BaseLensService implements QueryE
           } catch (final Exception e) {
             log.error("Query not restored:QueryContext:{}", ctx, e);
           }
+          // If EXECUTED, try to nudge result formatting forward
+          if (ctx.getStatus().getStatus() == EXECUTED) {
+            try {
+              getEventService().notifyEvent(newStatusChangeEvent(ctx, null, 
ctx.getStatus().getStatus()));
+            } catch (LensException e) {
+              log.error("Couldn't notify event for query executed for {}", 
ctx, e);
+            }
+          }
           break;
         case SUCCESSFUL:
         case FAILED:
@@ -1895,7 +1903,7 @@ public class QueryExecutionServiceImpl extends 
BaseLensService implements QueryE
    *
    * @param query
    * @param sessionHandle
-   * @param qconf
+   * @param conf
    * @param queryName
    * @return
    */

Reply via email to