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-7204. balancer doesn't run as a daemon (aw)
Release 2.7.0 - UNRELEASED

View File

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

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
function usage
function hadoop_usage
{
echo "Usage: start-balancer.sh [--config confdir] [-policy <policy>] [-threshold <threshold>]"
}
@ -42,4 +42,4 @@ fi
# 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.
# 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