HDFS-7204. balancer doesn't run as a daemon (aw)

This commit is contained in:
Allen Wittenauer 2014-10-21 14:26:08 -07:00
parent b85919feef
commit 4baca311ff
4 changed files with 6 additions and 3 deletions

View File

@ -253,6 +253,8 @@ Trunk (Unreleased)
HDFS-6981. Fix DN upgrade with layout version change. (Arpit Agarwal) HDFS-6981. Fix DN upgrade with layout version change. (Arpit Agarwal)
HDFS-7204. balancer doesn't run as a daemon (aw)
Release 2.7.0 - UNRELEASED Release 2.7.0 - UNRELEASED

View File

@ -83,6 +83,7 @@ shift
case ${COMMAND} in case ${COMMAND} in
balancer) balancer)
daemon="true"
CLASS=org.apache.hadoop.hdfs.server.balancer.Balancer CLASS=org.apache.hadoop.hdfs.server.balancer.Balancer
hadoop_debug "Appending HADOOP_BALANCER_OPTS onto HADOOP_OPTS" hadoop_debug "Appending HADOOP_BALANCER_OPTS onto HADOOP_OPTS"
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_BALANCER_OPTS}" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_BALANCER_OPTS}"

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
function usage function hadoop_usage
{ {
echo "Usage: start-balancer.sh [--config confdir] [-policy <policy>] [-threshold <threshold>]" echo "Usage: start-balancer.sh [--config confdir] [-policy <policy>] [-threshold <threshold>]"
} }
@ -42,4 +42,4 @@ fi
# Start balancer daemon. # Start balancer daemon.
exec "${bin}/hadoop-daemon.sh" --config "${HADOOP_CONF_DIR}" start balancer "$@" exec "${HADOOP_HDFS_HOME}/bin/hdfs" --config "${HADOOP_CONF_DIR}" --daemon start balancer "$@"

View File

@ -43,4 +43,4 @@ fi
# Stop balancer daemon. # Stop balancer daemon.
# Run this on the machine where the balancer is running # Run this on the machine where the balancer is running
"${bin}/hadoop-daemon.sh" --config "${HADOOP_CONF_DIR}" stop balancer exec "${HADOOP_HDFS_HOME}/bin/hdfs" --config "${HADOOP_CONF_DIR}" --daemon stop balancer