Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sshetty007
Copy link

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.

Copy link
Contributor

@medb medb left a 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 ))
Copy link
Contributor

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.

Comment on lines +55 to +71
# 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/
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants