Pass compilation provider to QueryServiceServlet

Change-Id: I795a2dab622ab40b39f6aaf548a27ffbd40c9efd
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1043
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
index 2e6ee58..f208694 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryServiceServlet.java
@@ -61,7 +61,7 @@
 
     private static final Logger LOGGER = Logger.getLogger(QueryServiceServlet.class.getName());
 
-    private transient final ILangCompilationProvider compilationProvider = new SqlppCompilationProvider();
+    private transient final ILangCompilationProvider compilationProvider;
 
     public enum Parameter {
         // Standard
@@ -210,6 +210,10 @@
         }
     }
 
+    public QueryServiceServlet(final ILangCompilationProvider compilationProvider) {
+        this.compilationProvider = compilationProvider;
+    }
+
     private static String getParameterValue(String content, String attribute) {
         int sc = content.indexOf(';');
         if (sc < 0) {
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index b77544e..916c81f 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -233,7 +233,7 @@
             case QUERY_RESULT:
                 return new QueryResultAPIServlet();
             case QUERY_SERVICE:
-                return new QueryServiceServlet();
+                return new QueryServiceServlet(new SqlppCompilationProvider());
             case CONNECTOR:
                 return new ConnectorAPIServlet();
             case SHUTDOWN: