-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclusterDecNode_knn.py
More file actions
83 lines (52 loc) · 2.04 KB
/
clusterDecNode_knn.py
File metadata and controls
83 lines (52 loc) · 2.04 KB
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
import os
import sys
import time
myfile = '/root/hadoop-3.1.1/etc/hadoop/yarn.exclude'
f=open(myfile, 'w')
patterns = ['192.168.0.20',
'192.168.0.19',
'192.168.0.18',
'192.168.0.17',
'192.168.0.16',
'192.168.0.15',
'192.168.0.14',
'192.168.0.13',
'192.168.0.12',
'192.168.0.11',
'192.168.0.10',
'192.168.0.9',
'192.168.0.8',
'192.168.0.7',
'192.168.0.5']
for i in range (0, int(sys.argv[1])):
f.write(patterns[i]+"\n")
f.close()
os.system("kill -9 $(lsof -t -i:9083)")
time.sleep(10)
os.system("kill -9 $(lsof -t -i:10000)")
time.sleep(10)
os.system("yarn rmadmin -refreshNodes")
time.sleep(10)
time.sleep(10)
os.system("nohup /root/apache-hive-2.3.3-bin/bin/hive --service metastore > metastore.out &")
time.sleep(10)
os.system("nohup /root/apache-hive-2.3.3-bin/bin/hive --service hiveserver2 --hiveconf hive.root.logger=INFO,console --hiveconf mapreduce.map.memory.mb=7168 --hiveconf mapreduce.map.java.opts=-Xmx5734m --hiveconf mapreduce.reduce.memory.mb=7168 --hiveconf mapreduce.reduce.java.opts=-Xmx5734m --hiveconf hive.aux.jars.path=file:///root/implementation/HiveTrajSPARQL/target/HiveTrajSPARQL-jar-with-dependencies.jar > hiveserver.out &")
time.sleep(10)
os.system("mvn test -Dtest=knnQueries_arrPID -q >> "+str(15-int(sys.argv[1]))+"_worker_knn")
time.sleep(60)
os.system("mvn test -Dtest=knnQueries_arrIndex -q >> "+str(15-int(sys.argv[1]))+"_worker_knn")
#time.sleep(60)
#os.system("mvn test -Dtest=knnQueries_binaryPID -q >>"+str(15-int(sys.argv[1]))+"_worker")
#time.sleep(60)
#os.system("mvn test -Dtest=knnQueries_binaryIndex -q >>"+str(15-int(sys.argv[1]))+"_worker")
time.sleep(60)
os.system("mvn test -Dtest=knnQueries_traj -q >> "+str(15-int(sys.argv[1]))+"_worker_knn")
time.sleep(60)
'''
#!/bin/sh
python clusterDecNode_knn.py 0
python clusterDecNode_knn.py 3
python clusterDecNode_knn.py 6
python clusterDecNode_knn.py 9
python clusterDecNode_knn.py 12
'''