asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: ASTERIXDB-1256: wait for job completion on SYNC results deli...
Date Mon, 11 Jan 2016 17:01:26 GMT
Murtadha Hubail has submitted this change and it was merged.

Change subject: ASTERIXDB-1256: wait for job completion on SYNC results delivery
......................................................................


ASTERIXDB-1256: wait for job completion on SYNC results delivery

Change-Id: Ib8a214ba4ff636d12927720c2311a9a5ca247d9e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/580
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
---
M asterix-app/src/main/java/org/apache/asterix/aql/translator/QueryTranslator.java
1 file changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified



diff --git a/asterix-app/src/main/java/org/apache/asterix/aql/translator/QueryTranslator.java
b/asterix-app/src/main/java/org/apache/asterix/aql/translator/QueryTranslator.java
index 7c055e2..01b0514 100644
--- a/asterix-app/src/main/java/org/apache/asterix/aql/translator/QueryTranslator.java
+++ b/asterix-app/src/main/java/org/apache/asterix/aql/translator/QueryTranslator.java
@@ -218,7 +218,7 @@
     private final IRewriterFactory rewriterFactory;
 
     public QueryTranslator(List<Statement> aqlStatements, SessionConfig conf,
-            ILangCompilationProvider compliationProvider) throws MetadataException, AsterixException
{
+            ILangCompilationProvider compliationProvider) {
         this.statements = aqlStatements;
         this.sessionConfig = conf;
         this.declaredFunctions = getDeclaredFunctions(aqlStatements);
@@ -414,8 +414,7 @@
         }
     }
 
-    private void handleSetStatement(AqlMetadataProvider metadataProvider, Statement stmt,
Map<String, String> config)
-            throws RemoteException, ACIDException {
+    private void handleSetStatement(AqlMetadataProvider metadataProvider, Statement stmt,
Map<String, String> config) {
         SetStatement ss = (SetStatement) stmt;
         String pname = ss.getPropName();
         String pvalue = ss.getPropValue();
@@ -2487,6 +2486,7 @@
                         hcc.waitForCompletion(jobId);
                         break;
                     case SYNC:
+                        hcc.waitForCompletion(jobId);
                         ResultReader resultReader = new ResultReader(hcc, hdc);
                         resultReader.open(jobId, metadataProvider.getResultSetId());
 
@@ -2498,8 +2498,6 @@
                             ResultUtils.displayCSVHeader(metadataProvider.findOutputRecordType(),
sessionConfig);
                         }
                         ResultUtils.displayResults(resultReader, sessionConfig);
-
-                        hcc.waitForCompletion(jobId);
                         break;
                     case ASYNC_DEFERRED:
                         handle = new JSONArray();

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/580
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8a214ba4ff636d12927720c2311a9a5ca247d9e
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>

Mime
View raw message