Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-WIC-Cnf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CommunityXG
OpenXG-WIC-Cnf
Commits
ec05c963
Commit
ec05c963
authored
Jul 10, 2020
by
Hu Jintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加路径计算代码模块
parent
8ba09f7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
+7
-7
cnf-client-starter/src/main/java/top/ninwoo/bishe/starter/config/ClientProperties.java
...ava/top/ninwoo/bishe/starter/config/ClientProperties.java
+1
-1
No files found.
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
View file @
ec05c963
...
@@ -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
(
11111
l
);
clusterConfig
.
setId
(
11111
l
);
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完成"
);
...
...
cnf-client-starter/src/main/java/top/ninwoo/bishe/starter/config/ClientProperties.java
View file @
ec05c963
...
@@ -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"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment