-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor #2
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
base: master
Are you sure you want to change the base?
Refactor #2
Changes from all commits
3f06b2c
0e1de6c
4444d6a
fd4ab00
39675f5
b42c6e2
2b1ef97
210e14b
113991c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| target/ | ||
| hadoop-* | ||
| hdfs-mesos-* | ||
| native/ | ||
|
|
||
| # idea | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very nice clean up here |
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
|
||
| if [ -z "$JAVA_HOME" ]; then | ||
| JAVA_HOME_DIR=$(dirname $(readlink -f $(which java))) | ||
| if [ -f $JAVA_HOME_DIR/../../bin/java ]; then | ||
| export JAVA_HOME=$JAVA_HOME_DIR/../.. | ||
| elif [ -f $JAVA_HOME_DIR/../bin/java ]; then | ||
| export JAVA_HOME=$JAVA_HOME_DIR/.. | ||
| else | ||
| echo “Error: Could not determine JAVA_HOME” | ||
| exit 1; | ||
| fi | ||
| fi | ||
|
|
||
| trap "{ $DIR/hdfs-mesos-killtree "$$" ; exit 0; }" EXIT | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,19 +2,7 @@ | |
|
|
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
|
||
| if [ -z "$JAVA_HOME" ]; then | ||
| JAVA_HOME_DIR=$(dirname $(readlink -f $(which java))) | ||
| if [ -f $JAVA_HOME_DIR/../../bin/java ]; then | ||
| export JAVA_HOME=$JAVA_HOME_DIR/../.. | ||
| elif [ -f $JAVA_HOME_DIR/../bin/java ]; then | ||
| export JAVA_HOME=$JAVA_HOME_DIR/.. | ||
| else | ||
| echo “Error: Could not determine JAVA_HOME” | ||
| exit 1; | ||
| fi | ||
| fi | ||
|
|
||
| trap "{ $DIR/hdfs-mesos-killtree "$$" ; exit 0; }" EXIT | ||
| $DIR/hdfs-mesos-env | ||
|
|
||
| function bootstrap_standby() { | ||
| $DIR/hdfs zkfc -formatZK -force | ||
|
|
@@ -31,13 +19,6 @@ function initialize_shared_edits() { | |
| exec $DIR/hdfs namenode -initializeSharedEdits | ||
| } | ||
|
|
||
| function run_namenode() { | ||
| while [ true ] ; do | ||
| $DIR/hdfs namenode | ||
| sleep 10 | ||
| done | ||
| } | ||
|
|
||
| while getopts ":ibs" opt; do | ||
| case $opt in | ||
| i) | ||
|
|
@@ -58,4 +39,4 @@ while getopts ":ibs" opt; do | |
| esac | ||
| done | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we remove the sleep loop, we need to make sure that we are attempting to restart our process repeatedly in our Executors. There are many things that can go wrong, which is why we keep trying to restart the process here, i.e. sometimes upon NN1 failure, we need to keep trying to restart until we're able to connect NN2 with NN1. |
||
| run_namenode | ||
| $DIR/hdfs namenode | ||
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.
Instead of using a yaml config here, what I would prefer to do is something similar to the following PR (which didn't get finished), mesosphere-backup#123. I would like to use environment variables or command line arguments (similar to Cassandra). These values could then be used to generate the *-site.xml configs used by HDFS.