ASTERIXDB-1175 Ensure Feed Central Manager Starts
This change fixes the connection refused exception that shows
up when asterix is started. The reason for this connection refused
is that the feed central manager was not started and local feed
managers try to connect to it.
Change-Id: Ifeaf7f70864a0efad38f3f2627b97ebdff06a0c1
Reviewed-on: https://asterix-gerrit.ics.uci.edu/502
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 24d2283..80ce5ea 100644
--- a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -37,9 +37,11 @@
import org.apache.asterix.common.config.AsterixExternalProperties;
import org.apache.asterix.common.config.AsterixMetadataProperties;
import org.apache.asterix.common.config.AsterixReplicationProperties;
+import org.apache.asterix.common.feeds.api.ICentralFeedManager;
import org.apache.asterix.compiler.provider.AqlCompilationProvider;
import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
import org.apache.asterix.event.service.ILookupService;
+import org.apache.asterix.feeds.CentralFeedManager;
import org.apache.asterix.feeds.FeedLifecycleListener;
import org.apache.asterix.metadata.MetadataManager;
import org.apache.asterix.metadata.api.IAsterixStateProxy;
@@ -66,6 +68,7 @@
private Server webServer;
private Server jsonAPIServer;
private Server feedServer;
+ private ICentralFeedManager centralFeedManager;
private static IAsterixStateProxy proxy;
private ICCApplicationContext appCtx;
@@ -100,6 +103,8 @@
feedServer.start();
ExternalLibraryBootstrap.setUpExternaLibraries(false);
+ centralFeedManager = CentralFeedManager.getInstance();
+ centralFeedManager.start();
AsterixGlobalRecoveryManager.INSTANCE = new AsterixGlobalRecoveryManager(
(HyracksConnection) getNewHyracksClientConnection());