Skip to content

Commit

Permalink
Fix presto SQL does not start prometheus service by default (apache#7030
Browse files Browse the repository at this point in the history
)

Signed-off-by: xiaolong.ran <rxl@apache.org>
  • Loading branch information
wolfstudy authored and Huanli-Meng committed Jun 1, 2020
1 parent 6d6dd27 commit 666b5ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ public ConnectorRecordSetProvider getRecordSetProvider() {
return recordSetProvider;
}

public void initConnectorCache() throws Exception {
PulsarConnectorCache.getConnectorCache(pulsarConnectorConfig);
}

@Override
public final void shutdown() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public Connector create(String connectorId, Map<String, String> config, Connecto
.setRequiredConfigurationProperties(config)
.initialize();

return injector.getInstance(PulsarConnector.class);
PulsarConnector connector = injector.getInstance(PulsarConnector.class);
connector.initConnectorCache();
return connector;
} catch (Exception e) {
throwIfUnchecked(e);
throw new RuntimeException(e);
Expand Down

0 comments on commit 666b5ed

Please sign in to comment.