Commit ec05c963 authored by Hu Jintao's avatar Hu Jintao

添加路径计算代码模块

parent 8ba09f7e
...@@ -265,7 +265,7 @@ public class WxTests { ...@@ -265,7 +265,7 @@ public class WxTests {
SeparatedClusterConfig separatedClusterConfig = new SeparatedClusterConfig(); SeparatedClusterConfig separatedClusterConfig = new SeparatedClusterConfig();
List<ContainerDescription> cds = new ArrayList<>(); List<ContainerDescription> cds = new ArrayList<>();
// TODO: 这个ID应该是从借口获取的 // TODO: 这个ID应该是从借口获取的
separatedClusterConfig.setEdgeNodeId("192.168.190.135:18088"); separatedClusterConfig.setEdgeNodeId("192.168.47.130:18088");
ClusterConfig clusterConfig = new ClusterConfig(); ClusterConfig clusterConfig = new ClusterConfig();
clusterConfig.setId(11111l); clusterConfig.setId(11111l);
clusterConfig.setOwner("joliu"); clusterConfig.setOwner("joliu");
...@@ -275,7 +275,7 @@ public class WxTests { ...@@ -275,7 +275,7 @@ public class WxTests {
ToponetImpl tp = new ToponetImpl(); ToponetImpl tp = new ToponetImpl();
SimData sd = new SimData(); SimData sd = new SimData();
//tp.delHistory(); //tp.delHistory();
File file = new File("C:\\WorkSpace\\test\\topusim_1.txt"); File file = new File("D:\\LabratoryJavaPro\\codingDownload\\latestCoding\\topusim_1.txt");
List<WeiXingData> wxData = wx.iniTopo(file,sd.getZhouqi()); List<WeiXingData> wxData = wx.iniTopo(file,sd.getZhouqi());
int[][] toponet = tp.getTopology(wxData,sd); int[][] toponet = tp.getTopology(wxData,sd);
...@@ -310,8 +310,8 @@ public class WxTests { ...@@ -310,8 +310,8 @@ public class WxTests {
//下发逻辑拓扑 //下发逻辑拓扑
clusterService.sendLogicTopoToEdgeNode(clusterConfigs); clusterService.sendLogicTopoToEdgeNode(clusterConfigs);
out:for (int i = 1; ; i++) { for (int i = 1;i<sd.getZhouqi()/sd.getJiange(); i++) {
Thread.sleep(2000); //Thread.sleep(2000);
int time = i * sd.getJiange(); int time = i * sd.getJiange();
List<WeiXingData> changetp = wx.changeTopo(wxData,time); List<WeiXingData> changetp = wx.changeTopo(wxData,time);
...@@ -319,9 +319,9 @@ public class WxTests { ...@@ -319,9 +319,9 @@ public class WxTests {
//下发修改后逻辑拓扑 //下发修改后逻辑拓扑
clusterService.adjustLogicTopoToEdgeNode(clusterConfigs); clusterService.adjustLogicTopoToEdgeNode(clusterConfigs);
Boolean tag = false; //Boolean tag = false;
for(int k=1;k<toponet[0].length;k++){ /* for(int k=1;k<toponet[0].length;k++){
for (int j=0;j<k;j++){ for (int j=0;j<k;j++){
if(toponet[k][j] == tp.getTopology(changetp, sd)[k][j]){ if(toponet[k][j] == tp.getTopology(changetp, sd)[k][j]){
tag = true; tag = true;
...@@ -330,7 +330,7 @@ public class WxTests { ...@@ -330,7 +330,7 @@ public class WxTests {
} }
if(tag){ if(tag){
break out; break out;
} }*/
} }
System.out.println("所有topo完成"); System.out.println("所有topo完成");
......
...@@ -7,7 +7,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; ...@@ -7,7 +7,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "bishe.app") @ConfigurationProperties(prefix = "bishe.app")
public class ClientProperties { public class ClientProperties {
private String zookeeperUrl = "zookeeper://127.0.0.1:2181"; private String zookeeperUrl = "zookeeper://127.0.0.1:2181";
private String cloudUrl = "127.0.0.1:9300"; private String cloudUrl = "127.0.0.1:9300";//"192.168.47.130:9091";
private String appName = "default"; private String appName = "default";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment