未验证 提交 2f43cb94 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Fix start when not config in provider and don't get module in prepare stage. (#1711)

上级 69cccd15
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册