Fix start when not config in provider and don't get module in prepare stage. (#1711)
This commit is contained in:
parent
69cccd1541
commit
2f43cb940e
|
|
@ -90,6 +90,9 @@ public abstract class ModuleDefine {
|
|||
|
||||
private void copyProperties(ModuleConfig dest, Properties src, String moduleName,
|
||||
String providerName) throws IllegalAccessException {
|
||||
if (dest == null) {
|
||||
return;
|
||||
}
|
||||
Enumeration<?> propertyNames = src.propertyNames();
|
||||
while (propertyNames.hasMoreElements()) {
|
||||
String propertyName = (String)propertyNames.nextElement();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ public class MeshReceiverProvider extends ModuleProvider {
|
|||
}
|
||||
|
||||
@Override public void prepare() throws ServiceNotProvidedException, ModuleStartException {
|
||||
}
|
||||
|
||||
@Override public void start() throws ServiceNotProvidedException, ModuleStartException {
|
||||
MeshDataBufferFileCache cache = new MeshDataBufferFileCache(config);
|
||||
try {
|
||||
cache.start();
|
||||
|
|
@ -54,9 +57,6 @@ public class MeshReceiverProvider extends ModuleProvider {
|
|||
} catch (IOException e) {
|
||||
throw new ModuleStartException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void start() throws ServiceNotProvidedException, ModuleStartException {
|
||||
CoreRegisterLinker.setModuleManager(getManager());
|
||||
GRPCHandlerRegister service = getManager().find(CoreModule.NAME).getService(GRPCHandlerRegister.class);
|
||||
service.addHandler(new MeshGRPCHandler());
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ receiver-register:
|
|||
default:
|
||||
receiver-trace:
|
||||
default:
|
||||
bufferPath: ../buffer/ # Path to trace buffer files, suggest to use absolute path
|
||||
bufferPath: ../trace-buffer/ # Path to trace buffer files, suggest to use absolute path
|
||||
bufferOffsetMaxFileSize: 100 # Unit is MB
|
||||
bufferDataMaxFileSize: 500 # Unit is MB
|
||||
bufferFileCleanWhenRestart: false
|
||||
|
|
@ -61,6 +61,10 @@ receiver-jvm:
|
|||
default:
|
||||
service-mesh:
|
||||
default:
|
||||
bufferPath: ../mesh-buffer/ # Path to trace buffer files, suggest to use absolute path
|
||||
bufferOffsetMaxFileSize: 100 # Unit is MB
|
||||
bufferDataMaxFileSize: 500 # Unit is MB
|
||||
bufferFileCleanWhenRestart: false
|
||||
istio-telemetry:
|
||||
default:
|
||||
query:
|
||||
|
|
|
|||
Loading…
Reference in New Issue