Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Distributed Computing and Network Fusion System
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
WirelessInformationCollaborate
Distributed Computing and Network Fusion System
Commits
e16ebe33
Commit
e16ebe33
authored
Sep 05, 2020
by
Elf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试发送问题
parent
d8be2e7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
apps/cnf-distributed-business-computing/dbc-business-client/src/main/java/top/ninwoo/dbc/client/service/FileService.java
.../main/java/top/ninwoo/dbc/client/service/FileService.java
+7
-0
apps/cnf-distributed-business-computing/dbc-business-server/src/main/java/top/ninwoo/dbc/server/serviceimpl/FileServiceImpl.java
...va/top/ninwoo/dbc/server/serviceimpl/FileServiceImpl.java
+5
-1
No files found.
apps/cnf-distributed-business-computing/dbc-business-client/src/main/java/top/ninwoo/dbc/client/service/FileService.java
View file @
e16ebe33
...
...
@@ -91,6 +91,9 @@ public class FileService{
for
(
int
i
=
0
;
i
<
wxName_list
.
length
;
i
++){
ipList
=
getIpList
(
clusterId
,
wxName_list
[
i
]);
//通过卫星名字获取卫星ip
}
//查看ip
System
.
out
.
println
(
ipList
.
length
);
System
.
out
.
println
(
Arrays
.
toString
(
ipList
));
int
sliceNum
=
ipList
.
length
;
...
...
@@ -103,10 +106,14 @@ public class FileService{
while
(
true
){
try
{
sendFileSlice
(
ipList
[
ipIndex
],
slice
);
//
System
.
out
.
println
(
"send "
+
ipList
[
ipIndex
]+
"sucess"
);
ipIndex
=
(
ipIndex
+
1
)
%
ipList
.
length
;
break
;
}
catch
(
Exception
e
){
ipIndex
=
(
ipIndex
+
1
)
%
ipList
.
length
;
//
System
.
out
.
println
(
"send "
+
ipList
[
ipIndex
]+
"failed"
);
}
}
}
...
...
apps/cnf-distributed-business-computing/dbc-business-server/src/main/java/top/ninwoo/dbc/server/serviceimpl/FileServiceImpl.java
View file @
e16ebe33
package
top.ninwoo.dbc.server.serviceimpl
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
top.ninwoo.dbc.api.po.ComputingResult
;
import
top.ninwoo.dbc.api.po.FileSlice
;
...
...
@@ -13,6 +14,9 @@ import java.io.IOException;
@Service
public
class
FileServiceImpl
implements
FileService
{
@Value
(
"${dbc.directory.output}"
)
private
String
directoryOutput
;
//分散计算
@Override
public
String
fileComputing
(
FileSlice
fileSlice
)
throws
IOException
{
...
...
@@ -55,7 +59,7 @@ public class FileServiceImpl implements FileService {
}
}
//这里需提供新的文件输出
ImageIO
.
write
(
grayImage
,
"jpg"
,
new
File
(
"\\tmp\\statics\\out.jpg
"
));
ImageIO
.
write
(
grayImage
,
"jpg"
,
new
File
(
directoryOutput
+
"out
"
));
System
.
out
.
println
(
"download sucess"
);
return
true
;
}
...
...
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