-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 944: Added support for CentOS. Copy jars to hdfs to run example… #948
base: master
Are you sure you want to change the base?
Issue 944: Added support for CentOS. Copy jars to hdfs to run example… #948
Conversation
…s in cluster mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May you separate changes that are required to run this init action on CentOS as is from other improvements in different PRs?
local cmd="$1" | ||
for ((i = 0; i < 10; i++)); do | ||
if eval "$cmd"; then | ||
return 0 | ||
fi | ||
sleep 5 | ||
sleep $((i * 5 )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert, this will make backoff exponential, which we probably do not want to do.
# Setup symlinks for hadoop jar dependencies on centos | ||
ln -sf /usr/lib/hadoop/hadoop-common.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop/hadoop-auth.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop/hadoop-annotations.jar /usr/lib/oozie/lib/ | ||
|
||
ln -sf /usr/lib/hadoop-hdfs/hadoop-hdfs-client.jar /usr/lib/oozie/lib/ | ||
|
||
ln -sf /usr/lib/hadoop-yarn/hadoop-yarn-common.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-yarn/hadoop-yarn-client.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-yarn/hadoop-yarn-server-common.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-yarn/hadoop-yarn-api.jar /usr/lib/oozie/lib/ | ||
|
||
ln -sf /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-jobclient.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-app.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-common.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-core.jar /usr/lib/oozie/lib/ | ||
ln -sf /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-shuffle.jar /usr/lib/oozie/lib/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary for CentOS, but other OSes?
@@ -48,8 +49,30 @@ function install_oozie() { | |||
master_node=$(/usr/share/google/get_metadata_value attributes/dataproc-master) | |||
|
|||
# Upgrade the repository and install Oozie | |||
retry_apt_command "apt-get update" | |||
retry_apt_command "apt-get install -q -y oozie oozie-client" | |||
if [[ "$DATAPROC_IMAGE" == *"cen"* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use if command -v apt-get >/dev/null; then
check for consistency with other scripts.
PR for issue #944 (add CentOS support to init action). Changes include adding support for CentOS, copying dependent jars to run the Spark example in cluster mode and using the MySQL database.