Skip to content

Instantly share code, notes, and snippets.

@jecyhw
Created November 27, 2017 01:44
Show Gist options
  • Save jecyhw/469945c09ea55d9c77b45190caa561bf to your computer and use it in GitHub Desktop.
Save jecyhw/469945c09ea55d9c77b45190caa561bf to your computer and use it in GitHub Desktop.
start-dfs.sh start-yarn.sh mr-jobhistory-daemon.sh start historyserver
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Start all hadoop daemons. Run this on master node.
hadoop="${HADOOP}"
# start hdfs daemons if hdfs is present
if [ -f "${hadoop}"/sbin/start-dfs.sh ]; then
"${hadoop}"/sbin/start-dfs.sh
fi
# start yarn daemons if yarn is present
if [ -f "${hadoop}"/sbin/start-yarn.sh ]; then
"${hadoop}"/sbin/start-yarn.sh
fi
# start jobhistory daemons if jobhistory is present
if [ -f "${hadoop}"/sbin/mr-jobhistory-daemon.sh ]; then
"${hadoop}"/sbin/mr-jobhistory-daemon.sh start historyserver
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment