Skip to content

Commit

Permalink
minor configuration fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Sep 8, 2024
1 parent 9793aa7 commit def047d
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 12 deletions.
27 changes: 15 additions & 12 deletions scripts/expjson_singlequery_8slot/q5-aggregate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"ctype": "aws",
"jarpath": "/home/ubuntu/data/flink-placement-16/queries/nexmark/target/Query6-jar-with-dependencies.jar",
"jarargs": {
"ratelist": "118000_360000000_118000_360000000",
"ratelist": "59300_360000000_59300_360000000",
"psa": "2",
"psb": "2",
"pj": "16",
"pagg": "8",
"pj": "23",
"pagg": "4",
"psink": "1"
},
"iplist": [
Expand All @@ -28,7 +28,7 @@
"TMPROOT": "~/data/tmp",
"SAVEROOT": "/home/ubuntu/data/savepoint",
"resetsec": 90,
"srcratelist": [{"SourceAuction":118000}, {"SourceBid":118000}],
"srcratelist": [{"SourceAuction":58000}, {"SourceBid":58000}],
"oprlist": [{"Q5_JoinBidsWithAuctions": "pj"}, {"Q5_AggregateFunction": "pagg"}],
"mapping": {
"Q5_AggregateFunction": "Q5_AggregateFunction",
Expand All @@ -46,33 +46,36 @@
},
"workers_slot": 8,
"schedulercfg1st": [
"Q5_SourceAuction; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_JoinBidsWithAuctions; 192.168.1.101",
"Q5_AggregateFunction; 192.168.1.101",
"Q5_AggregateFunction; 192.168.1.101",
"Q5_Sink; 192.168.1.101",
"Q5_SourceBid; 192.168.1.102",
"Q5_SourceBid; 192.168.1.101",
"Q5_Sink; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_JoinBidsWithAuctions; 192.168.1.102",
"Q5_AggregateFunction; 192.168.1.102",
"Q5_AggregateFunction; 192.168.1.102",
"Q5_SourceBid; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_AggregateFunction; 192.168.1.103",
"Q5_AggregateFunction; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_JoinBidsWithAuctions; 192.168.1.103",
"Q5_SourceAuction; 192.168.1.103",
"Q5_SourceBid; 192.168.1.103",
"Q5_SourceAuction; 192.168.1.104",
"Q5_JoinBidsWithAuctions; 192.168.1.104",
"Q5_JoinBidsWithAuctions; 192.168.1.104",
"Q5_JoinBidsWithAuctions; 192.168.1.104",
"Q5_JoinBidsWithAuctions; 192.168.1.104",
"Q5_JoinBidsWithAuctions; 192.168.1.104",
"Q5_AggregateFunction; 192.168.1.104",
"Q5_AggregateFunction; 192.168.1.104"
]
Expand Down
66 changes: 66 additions & 0 deletions scripts/runallTemp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import sys, os
from exputils import *

fjson=sys.argv[1]
RUNID=sys.argv[2]

# 0: start from the profiling phase
# 1 or any other input: start from the 2nd iteration (profiling folder already exists)
START_ITER=sys.argv[3]


def changeConfigFileOnScheduling(policy):
file = open('aws/flink-conf.yaml', 'r')
lines = file.readlines()
file.close()

file = open('aws/flink-conf.yaml', 'w')

if policy == "custom":
for line in lines:
if "jobmanager.scheduler: Custom" in line:
file.write("jobmanager.scheduler: Custom\n")
elif "cluster.evenly-spread-out-slots: true" in line:
file.write("#cluster.evenly-spread-out-slots: true\n")
else:
file.write(line)
elif policy == "even":
for line in lines:
if "jobmanager.scheduler: Custom" in line:
file.write("#jobmanager.scheduler: Custom\n")
elif "cluster.evenly-spread-out-slots: true" in line:
file.write("cluster.evenly-spread-out-slots: true\n")
else:
file.write(line)
elif policy == "random":
for line in lines:
if "jobmanager.scheduler: Custom" in line:
file.write("#jobmanager.scheduler: Custom\n")
elif "cluster.evenly-spread-out-slots: true" in line:
file.write("#cluster.evenly-spread-out-slots: true\n")
else:
file.write(line)
else:
file.close()
sys.exit("policy input error")
file.close()

if START_ITER == '0':
changeConfigFileOnScheduling("custom")
os.system("python3 runds2placement.py "+fjson+" start profile 0 custom")
else:

changeConfigFileOnScheduling("custom")
RUNID_custom = RUNID + "_custom"
for rx in range(5):
os.system("python3 runds2placement.py "+fjson+" start "+RUNID_custom+str(rx)+" "+START_ITER + " custom")

changeConfigFileOnScheduling("even")
RUNID_even = RUNID + "_even"
for rx in range(5):
os.system("python3 runds2placement.py "+fjson+" start "+RUNID_even+str(rx)+" "+START_ITER + " even")

changeConfigFileOnScheduling("random")
RUNID_random = RUNID + "_random"
for rx in range(5):
os.system("python3 runds2placement.py "+fjson+" start "+RUNID_random+str(rx)+" "+START_ITER + " random")

0 comments on commit def047d

Please sign in to comment.