Skip to content

Commit 2ff7e41

Browse files
committed
Add annotations for each line identified as having a potential issue.
1 parent 23f52e9 commit 2ff7e41

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

samza-shell/src/main/bash/run-class.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ cd $base_dir
2828
base_dir=`pwd`
2929
cd $home_dir
3030

31+
# Note: When using samza-yarn, base_dir and pwd here looks something like:
32+
# /<hadoop path>/usercache/<linux account>/appcache/application_1745893616511_0059/container_e64_1745893616511_0059_01_002027/__package
33+
3134
echo "Current time: $(date '+%Y-%m-%d %H:%M:%S')"
3235

3336
echo home_dir=$home_dir
@@ -78,15 +81,26 @@ fi
7881
# permissions for the classpath-related files when they are in their own directory. An example of where
7982
# this is helpful is when using container images which might have predefined permissions for certain
8083
# directories.
84+
85+
# FIXME(SAMZA-2804): CLASSPATH_WORKSPACE_DIR is shared among all containers running on the host when using samza-yarn.
86+
# Using the same path for all containers running on the host for manifest.txt and pathing.jar is a race condition.
87+
# e.g. "/<hadoop dir>/usercache/<linux account>/appcache/application_1745893616511_0059/container_e64_1745893616511_0059_01_002027/__package/classpath_workspace/pathing.jar"
8188
CLASSPATH_WORKSPACE_DIR=$base_dir/classpath_workspace
8289
mkdir -p $CLASSPATH_WORKSPACE_DIR
90+
91+
# FIXME(SAMZA-2804): This is a race condition when using samza-yarn.
8392
# file containing the classpath string; used to avoid passing long classpaths directly to the jar command
8493
PATHING_MANIFEST_FILE=$CLASSPATH_WORKSPACE_DIR/manifest.txt
94+
95+
# FIXME(SAMZA-2804): This is a race condition when using samza-yarn.
8596
# jar file to include on the classpath for running the main class
8697
PATHING_JAR_FILE=$CLASSPATH_WORKSPACE_DIR/pathing.jar
8798

99+
# FIXME(SAMZA-2804): This is a race condition when using samza-yarn.
88100
# Newlines and spaces are intended to ensure proper parsing of manifest in pathing jar
89101
printf "Class-Path: \n $CLASSPATH \n" > $PATHING_MANIFEST_FILE
102+
103+
# FIXME(SAMZA-2804): This is a race condition when using samza-yarn.
90104
# Creates a new archive and adds custom manifest information to pathing.jar
91105
eval "$JAR -cvmf $PATHING_MANIFEST_FILE $PATHING_JAR_FILE"
92106

@@ -96,10 +110,14 @@ else
96110
JAVA="$JAVA_HOME/bin/java"
97111
fi
98112

113+
# FIXME(SAMZA-2804): This log directory is shared among all containers running on the host when using samza-yarn.
99114
if [ -z "$SAMZA_LOG_DIR" ]; then
100115
SAMZA_LOG_DIR="$base_dir"
101116
fi
102117

118+
# FIXME(SAMZA-2804): This directory is shared among all containers running on the host when using samza-yarn. We should
119+
# likely be using a per-container tmp directory instead.
120+
#
103121
# add usercache directory
104122
mkdir -p $base_dir/tmp
105123
JAVA_TEMP_DIR=$base_dir/tmp

0 commit comments

Comments
 (0)