mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-24 17:18:02 +00:00
fix(schemaRegistry): change api servlet check to only apply to internal to fix glue support (#8693)
This commit is contained in:
parent
47571e6257
commit
9c5ab1bcd3
@ -1,6 +1,7 @@
|
|||||||
package com.linkedin.metadata.boot;
|
package com.linkedin.metadata.boot;
|
||||||
|
|
||||||
import com.linkedin.gms.factory.config.ConfigurationProvider;
|
import com.linkedin.gms.factory.config.ConfigurationProvider;
|
||||||
|
import com.linkedin.gms.factory.kafka.schemaregistry.InternalSchemaRegistryFactory;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@ -48,12 +49,17 @@ public class OnBootApplicationListener {
|
|||||||
public void onApplicationEvent(@Nonnull ContextRefreshedEvent event) {
|
public void onApplicationEvent(@Nonnull ContextRefreshedEvent event) {
|
||||||
log.warn("OnBootApplicationListener context refreshed! {} event: {}",
|
log.warn("OnBootApplicationListener context refreshed! {} event: {}",
|
||||||
ROOT_WEB_APPLICATION_CONTEXT_ID.equals(event.getApplicationContext().getId()), event);
|
ROOT_WEB_APPLICATION_CONTEXT_ID.equals(event.getApplicationContext().getId()), event);
|
||||||
|
String schemaRegistryType = provider.getKafka().getSchemaRegistry().getType();
|
||||||
if (ROOT_WEB_APPLICATION_CONTEXT_ID.equals(event.getApplicationContext().getId())) {
|
if (ROOT_WEB_APPLICATION_CONTEXT_ID.equals(event.getApplicationContext().getId())) {
|
||||||
executorService.submit(isSchemaRegistryAPIServeletReady());
|
if (InternalSchemaRegistryFactory.TYPE.equals(schemaRegistryType)) {
|
||||||
|
executorService.submit(isSchemaRegistryAPIServletReady());
|
||||||
|
} else {
|
||||||
|
_bootstrapManager.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Runnable isSchemaRegistryAPIServeletReady() {
|
public Runnable isSchemaRegistryAPIServletReady() {
|
||||||
return () -> {
|
return () -> {
|
||||||
final HttpGet request = new HttpGet(provider.getKafka().getSchemaRegistry().getUrl());
|
final HttpGet request = new HttpGet(provider.getKafka().getSchemaRegistry().getUrl());
|
||||||
int timeouts = 30;
|
int timeouts = 30;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user