-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.xml
242 lines (177 loc) · 15.3 KB
/
build.xml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?xml version="1.0" encoding="UTF-8"?>
<project name="JPregel" basedir=".">
<description>
Builds, tests and runs JPregel.
</description>
<!-- codebase properties -->
<property name="jpregel_folder" value="jpregel"/>
<property name="src" location="source"/>
<property name="build" location="build/classes"/>
<property name="build_dev" location="build_dev/"/>
<property name="dist" location="dist"/>
<property name="port" value="3672"/>
<!-- host names -->
<property name="host1" value="dudley.cs.ucsb.edu"/>
<property name="host2" value="blondie.cs.ucsb.edu"/>
<property name="host3" value="lisa.cs.ucsb.edu"/>
<property name="host4" value="butthead.cs.ucsb.edu"/>
<property name="host5" value="pinky.cs.ucsb.edu"/>
<property name="host6" value="yogi.cs.ucsb.edu"/>
<property name="host7" value="taz.cs.ucsb.edu"/>
<property name="host8" value="speed.cs.ucsb.edu"/>
<property name="host9" value="cartman.cs.ucsb.edu"/>
<property name="host10" value="kyle.cs.ucsb.edu"/>
<property name="host11" value="nat.cs.ucsb.edu"/>
<property name="host12" value="booboo.cs.ucsb.edu"/>
<property name="host13" value="beavis.cs.ucsb.edu"/>
<property name="host14" value="brain.cs.ucsb.edu"/>
<property name="host15" value="bugs.cs.ucsb.edu"/>
<property name="host16" value="linus.cs.ucsb.edu"/>
<property name="master" value="snoopy.cs.ucsb.edu"/>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="compile" description="compiles the source">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="build_dev" description="builds jpregel dev JAR" depends="compile">
<!-- Create the build dev directory -->
<mkdir dir="${build_dev}"/>
<!-- Make jpregel-dev.jar file -->
<jar jarfile="${build_dev}/jpregel-dev.jar" basedir="${build}" includes="api/Vertex.class system/Message.class graphs/Edge.class system/JPregelConstants.class"/>
</target>
<target name="build_jpregel" description="builds jpregel JAR" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Make computer.jar file -->
<jar jarfile="${dist}/jpregel.jar" basedir="${build}" includes="api/** system/** utility/** graphs/** exceptions/**"/>
</target>
<target name="javadoc" description="create javadocs" depends="compile">
<javadoc packagenames="api.*, system.*, utility.*, graphs.*, exceptions.*" sourcepath="${src}" destdir="documents/javadoc"/>
</target>
<target name="runGraphGenerator" depends="build_jpregel" description="runs graph generator">
<!-- runs graph generator -->
<java classname="graphs.GraphGenerator" fork="true">
<arg value="${num_vertices}"/>
<arg value="${max_cost}"/>
<classpath>
<pathelement location="${dist}/jpregel.jar"/>
</classpath>
</java>
</target>
<target name="runLocalWkrManager" depends="build_jpregel" description="runs a worker manager locally">
<!-- run local worker manager -->
<java classname="system.WorkerManagerImpl" fork="true">
<jvmarg value="-Djava.security.policy=policy/policy"/>
<arg value="localhost:${port}"/>
<arg value="${vertex_class}"/>
<classpath>
<pathelement location="${dist}/jpregel.jar"/>
<pathelement location="${app}"/>
</classpath>
</java>
</target>
<target name="runWkrManager" description="runs a worker manager on remote host">
<!-- run remote worker manager -->
<java classname="system.WorkerManagerImpl" fork="true">
<jvmarg value="-Djava.security.policy=policy/policy"/>
<arg value="${master}:${port}"/>
<arg value="${vertex_class}"/>
<classpath>
<pathelement location="${dist}/jpregel.jar"/>
<pathelement location="${app}"/>
</classpath>
</java>
</target>
<target name="run1WkrManagers" depends="build_jpregel" description="starts 1 remote worker manager through ssh">
<!-- run worker manager in remote hosts -->
<parallel>
<sshexec host="${host1}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
</parallel>
</target>
<target name="run4WkrManagers" depends="build_jpregel" description="starts 4 remote worker manager through ssh">
<!-- run worker managers in remote hosts -->
<parallel>
<sshexec host="${host1}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host2}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host3}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host4}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
</parallel>
</target>
<target name="run16WkrManagers" depends="build_jpregel" description="starts 16 remote worker manager through ssh">
<!-- run worker managers in remote hosts -->
<parallel>
<sshexec host="${host1}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host2}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host3}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host4}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host5}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host6}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host7}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host8}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host9}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host10}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host11}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host12}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host13}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host14}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host15}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
<sshexec host="${host16}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runWkrManager -Dvertex_class=${vertex_class} -Dapp=${app}" passphrase=""/>
</parallel>
</target>
<target name="kill" description="kills java processes in all remote machines started through ssh">
<!-- kill java processes in remote hosts -->
<parallel>
<sshexec host="${host1}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host2}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host3}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host4}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host5}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host6}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host7}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host8}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host9}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host10}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host11}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host12}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host13}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host14}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host15}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${host16}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
<sshexec host="${master}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="killall java" passphrase=""/>
</parallel>
</target>
<target name="runLocalMaster" depends="build_jpregel" description="starts master locally">
<!-- run master -->
<java classname="system.MasterImpl" fork="true">
<jvmarg value="-Djava.security.policy=policy/policy"/>
<arg value="${vertex_class}"/>
<arg value="${num_machines}"/>
<classpath>
<pathelement location="${dist}/jpregel.jar"/>
<pathelement location="${app}"/>
</classpath>
</java>
</target>
<target name="runRemoteMaster" depends="build_jpregel" description="starts master remotely through ssh">
<!-- run master in remote hosts -->
<sshexec host="${master}" username="${username}" keyfile="/cs/student/${username}/.ssh/headless_rsa" trust="true" command="cd /cs/student/${username}/${jpregel_folder}/; ant runMaster -Dusername=${username} -Dapp=${app} -Dvertex_class=${vertex_class} -Dnum_machines=${num_machines}" passphrase=""/>
</target>
<target name="runMaster" description="runs master on the remote host">
<!-- run remote master -->
<java classname="system.MasterImpl" fork="true">
<jvmarg value="-Djava.security.policy=policy/policy"/>
<arg value="${vertex_class}"/>
<arg value="${num_machines}"/>
<classpath>
<pathelement location="${dist}/jpregel.jar"/>
<pathelement location="${app}"/>
</classpath>
</java>
</target>
</project>