-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSDArcherMain.java
More file actions
30 lines (29 loc) · 1004 Bytes
/
SDArcherMain.java
File metadata and controls
30 lines (29 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Master.SDMasterNode;
import Slave.SDSlaveNode;
import Util.SDUtil;
/**
* Created by amaliujia on 14-12-20.
*/
public class SDArcherMain {
public static void main(String[] args) throws Exception {
if(args.length == 0) {
SDUtil.fatalError("Wrong arguments for main function");
}else if(args[0].equals("master")){
//start master
SDMasterNode master = new SDMasterNode();
master.startService();
}else if(args[0].equals("slave")){
// HKSlaveNode slave = new HKSlaveNode(args[1], Integer.parseInt(args[2]));
// slave.connect();
// new Thread(slave).start();
SDSlaveNode slave = new SDSlaveNode();
slave.startService();
}else if(args[0].equals("RMIServer")){
//TODO: start rmiserver
}else if(args[0].equals("Registry")){
//TODO: start registry
}else{
System.out.println("Arguments wrong");
}
}
}