-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange_config.py
More file actions
88 lines (58 loc) · 2.13 KB
/
change_config.py
File metadata and controls
88 lines (58 loc) · 2.13 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
84
85
86
87
88
import ConfigParser
import os
import sys
import time
config = ConfigParser.RawConfigParser()
config.read('./config/traj_octree.properties')
dataset_sample = [('0.20', 12),
('0.40', 9),
('0.60', 6),
('0.80', 3),
('0.90', 0)]
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']
myfile = '/root/hadoop-3.1.1/etc/hadoop/yarn.exclude'
f=open(myfile, 'w')
#level = ['90', '180', '360']
for d in dataset_sample:
cfgfile = open("./config/traj_octree.properties", 'w')
config.set('Spark', 'spark.fraction_dataset', d[0])
for i in range(0, d[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)
os.system("stop-all.sh")
time.sleep(10)
os.system("start-all.sh")
time.sleep(10)
os.system("yarn rmadmin -refreshNodes")
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=RangeQueries -q > scale_"+d[1]+"_"+d[0])
config.write(cfgfile)
cfgfile.close()
'''
mvn test -Dtest=CreateTables -q
mvn test -Dtest=DropTables -q
'''