|
|
@@ -1,6 +1,5 @@
|
|
|
package cn.reghao.oss.store.config.spring;
|
|
|
|
|
|
-import cn.reghao.jutil.jdk.machine.id.MachineId;
|
|
|
import cn.reghao.jutil.jdk.serializer.JsonConverter;
|
|
|
import cn.reghao.jutil.jdk.store.LocalStores;
|
|
|
import cn.reghao.jutil.jdk.store.SubDirCount;
|
|
|
@@ -36,18 +35,16 @@ public class AppLifecycle implements ApplicationRunner, DisposableBean {
|
|
|
private final DataBlockMapper dataBlockMapper;
|
|
|
private final FileTask fileTask;
|
|
|
private final SpringProperties springProperties;
|
|
|
- private final MachineId machineId;
|
|
|
private final OssConsoleClient ossConsoleClient;
|
|
|
private final StoreLocalCache storeLocalCache;
|
|
|
private final StoreChannelService storeChannelService;
|
|
|
|
|
|
public AppLifecycle(DataBlockMapper dataBlockMapper, FileTask fileTask, SpringProperties springProperties,
|
|
|
- MachineId machineId, OssConsoleClient ossConsoleClient, StoreLocalCache storeLocalCache,
|
|
|
+ OssConsoleClient ossConsoleClient, StoreLocalCache storeLocalCache,
|
|
|
StoreChannelService storeChannelService) {
|
|
|
this.dataBlockMapper = dataBlockMapper;
|
|
|
this.fileTask = fileTask;
|
|
|
this.springProperties = springProperties;
|
|
|
- this.machineId = machineId;
|
|
|
this.ossConsoleClient = ossConsoleClient;
|
|
|
this.storeLocalCache = storeLocalCache;
|
|
|
this.storeChannelService = storeChannelService;
|
|
|
@@ -93,7 +90,7 @@ public class AppLifecycle implements ApplicationRunner, DisposableBean {
|
|
|
private void initStoreNode() throws Exception {
|
|
|
log.info("初始化 StoreNode...");
|
|
|
List<StoreDiskDto> list = storeLocalCache.getStoreDisks();
|
|
|
- String nodeAddr = machineId.ipv4();
|
|
|
+ String nodeAddr = springProperties.getHost();
|
|
|
int httpPort = springProperties.getHttpPort();
|
|
|
int rpcPort = springProperties.getRpcPort();
|
|
|
StoreNodeDto storeNodeDto = new StoreNodeDto(nodeAddr, httpPort, rpcPort, list);
|