-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from 2lambda123/ft-future
Ft future
- Loading branch information
Showing
39 changed files
with
486 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,8 @@ notes.txt | |
|
||
# python | ||
**/__pycache__/* | ||
.venv | ||
venv | ||
|
||
#testing and plotting | ||
scripts/test_eval/*.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[submodule "pash"] | ||
path = pash | ||
url = https://github.com/binpash/pash.git | ||
branch = dspash-future | ||
branch = ft-future | ||
[submodule "docker-hadoop"] | ||
path = docker-hadoop | ||
url = https://github.com/binpash/docker-hadoop | ||
branch = ft-future |
Submodule docker-hadoop
updated
11 files
+16 −8 | Makefile | |
+15 −8 | base/Dockerfile | |
+1 −1 | datanode/Dockerfile | |
+10 −1 | datanode/run.sh | |
+1 −1 | docker-compose-client.yml | |
+5 −2 | docker-compose.yml | |
+1 −1 | namenode/run.sh | |
+6 −2 | pash-base/Dockerfile | |
+0 −1 | sample-script.sh | |
+18 −6 | setup-compose.sh | |
+2 −1 | stop-compose.sh |
25 changes: 25 additions & 0 deletions
25
evaluation/distr_benchmarks/oneliners/check_ft_correctness.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Specify the folder where the .out files are located | ||
folder="$DISH_TOP/evaluation/distr_benchmarks/oneliners/outputs" | ||
|
||
# Loop through the files in the folder | ||
for script_faults_out in "$folder"/*faults.out; do | ||
# Extract the script name without the extension | ||
script_name=$(basename "$script_faults_out" .faults.out) | ||
|
||
# Check if there is a corresponding .distr.out file | ||
script_distr_out="$folder/$script_name.distr.out" | ||
|
||
if [ -f "$script_distr_out" ]; then | ||
# Perform a diff between the two files | ||
echo "Comparing faults_out and distr_out for script $script_name.sh" | ||
if diff -q "$script_faults_out" "$script_distr_out"; then | ||
echo "Outputs are identical" | ||
else | ||
echo "Files are different. Differences are as follows:" | ||
diff -y "$script_faults_out" "$script_distr_out" | ||
fi | ||
echo "-------------------------------------------" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
evaluation/distr_benchmarks/oneliners/run.distr.faults.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
PASH_FLAGS='--width 8 --r_split' | ||
export TIMEFORMAT=%R | ||
export dict="$PASH_TOP/evaluation/distr_benchmarks/oneliners/input/dict.txt" | ||
curl -sf 'http://ndr.md/data/dummy/dict.txt' | sort > $dict | ||
|
||
|
||
scripts_inputs=( | ||
"nfa-regex;1G.txt" | ||
"sort;3G.txt" | ||
"top-n;3G.txt" | ||
"wf;3G.txt" | ||
"spell;3G.txt" | ||
"diff;3G.txt" | ||
"bi-grams;3G.txt" | ||
"set-diff;3G.txt" | ||
"sort-sort;3G.txt" | ||
"shortest-scripts;all_cmdsx100.txt" | ||
) | ||
|
||
oneliners_bash() { | ||
outputs_dir="outputs" | ||
seq_times_file="seq.res" | ||
seq_outputs_suffix="seq.out" | ||
|
||
mkdir -p "$outputs_dir" | ||
|
||
touch "$seq_times_file" | ||
cat $seq_times_file >> $seq_times_file.d | ||
echo executing one-liners $(date) | tee "$seq_times_file" | ||
echo '' >> "$seq_times_file" | ||
|
||
for script_input in ${scripts_inputs[@]} | ||
do | ||
IFS=";" read -r -a script_input_parsed <<< "${script_input}" | ||
script="${script_input_parsed[0]}" | ||
input="${script_input_parsed[1]}" | ||
|
||
export IN="/oneliners/$input" | ||
export dict= | ||
|
||
printf -v pad %30s | ||
padded_script="${script}.sh:${pad}" | ||
padded_script=${padded_script:0:30} | ||
|
||
seq_outputs_file="${outputs_dir}/${script}.${seq_outputs_suffix}" | ||
|
||
echo "${padded_script}" $({ time ./${script}.sh > "$seq_outputs_file"; } 2>&1) | tee -a "$seq_times_file" | ||
done | ||
} | ||
|
||
oneliners_pash(){ | ||
flags=${1:-$PASH_FLAGS} | ||
prefix=${2:-par} | ||
prefix=$prefix | ||
|
||
times_file="$prefix.res" | ||
outputs_suffix="$prefix.out" | ||
time_suffix="$prefix.time" | ||
outputs_dir="outputs" | ||
pash_logs_dir="pash_logs_$prefix" | ||
|
||
mkdir -p "$outputs_dir" | ||
mkdir -p "$pash_logs_dir" | ||
|
||
touch "$times_file" | ||
cat $times_file >> $times_file.d | ||
echo executing one-liners with $prefix pash with data $(date) | tee "$times_file" | ||
echo '' >> "$times_file" | ||
|
||
for script_input in ${scripts_inputs[@]} | ||
do | ||
IFS=";" read -r -a script_input_parsed <<< "${script_input}" | ||
script="${script_input_parsed[0]}" | ||
input="${script_input_parsed[1]}" | ||
|
||
export IN="/oneliners/$input" | ||
export dict= | ||
|
||
printf -v pad %30s | ||
padded_script="${script}.sh:${pad}" | ||
padded_script=${padded_script:0:30} | ||
|
||
outputs_file="${outputs_dir}/${script}.${outputs_suffix}" | ||
pash_log="${pash_logs_dir}/${script}.pash.log" | ||
single_time_file="${outputs_dir}/${script}.${time_suffix}" | ||
|
||
echo -n "${padded_script}" | tee -a "$times_file" | ||
{ time "$PASH_TOP/pa.sh" $flags --log_file "${pash_log}" ${script}.sh > "$outputs_file"; } 2> "${single_time_file}" | ||
cat "${single_time_file}" | tee -a "$times_file" | ||
done | ||
} | ||
|
||
oneliners_hadoopstreaming(){ | ||
jarpath="/opt/hadoop-3.2.2/share/hadoop/tools/lib/hadoop-streaming-3.2.2.jar" # Adjust as required | ||
basepath="" # Adjust as required | ||
times_file="hadoopstreaming.res" | ||
outputs_suffix="hadoopstreaming.out" | ||
outputs_dir="/outputs/hadoop-streaming/oneliners" | ||
. bi-gram.aux.sh | ||
|
||
cd "hadoop-streaming/" | ||
|
||
hdfs dfs -rm -r "$outputs_dir" | ||
hdfs dfs -mkdir -p "$outputs_dir" | ||
|
||
touch "$times_file" | ||
cat "$times_file" >> "$times_file".d | ||
echo executing oneliners $(date) | tee "$times_file" | ||
echo '' >> "$times_file" | ||
|
||
while IFS= read -r line; do | ||
printf -v pad %20s | ||
name=$(cut -d "#" -f2- <<< "$line") | ||
name=$(sed "s/ //g" <<< $name) | ||
padded_script="${name}.sh:${pad}" | ||
padded_script=${padded_script:0:20} | ||
echo "${padded_script}" $({ time { eval $line &> /dev/null; } } 2>&1) | tee -a "$times_file" | ||
done <"run_all.sh" | ||
cd ".." | ||
mv "hadoop-streaming/$times_file" . | ||
} | ||
|
||
outputs_dir="outputs" | ||
rm -rf "$outputs" | ||
|
||
# oneliners_bash | ||
|
||
# oneliners_pash "$PASH_FLAGS" "par" | ||
|
||
oneliners_pash "$PASH_FLAGS --distributed_exec" "distr" | ||
|
||
# it's important to set the timeout long enough for now to avoid the "crashed" worker coming back alive while its replacement does work | ||
# until it's fully supported! | ||
oneliners_pash "$PASH_FLAGS --distributed_exec --worker_timeout 100" "faults" | ||
|
||
|
||
# oneliners_hadoopstreaming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
eager | ||
split | ||
r_split | ||
r_merge | ||
r_unwrap | ||
r_wrap | ||
set-diff | ||
dspash/socket_pipe | ||
tests/perf* | ||
tests/*out | ||
bin |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.