hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r936121 - in /hadoop/mapreduce/trunk: ./ src/contrib/raid/ src/contrib/raid/bin/
Date Wed, 21 Apr 2010 00:19:46 GMT
Author: dhruba
Date: Wed Apr 21 00:19:45 2010
New Revision: 936121

URL: http://svn.apache.org/viewvc?rev=936121&view=rev
Log:
MAPREDUCE-1673. Scripts to start and stop RaidNode.
(Rodrigo Schmidt via dhruba)


Added:
    hadoop/mapreduce/trunk/src/contrib/raid/bin/
    hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode-remote.sh
    hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode.sh
    hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode-remote.sh
    hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode.sh
Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/raid/README

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=936121&r1=936120&r2=936121&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Wed Apr 21 00:19:45 2010
@@ -251,6 +251,9 @@ Trunk (unreleased changes)
     MAPREDUCE-1538. TrackerDistributedCacheManager manages the
     number of files. (Scott Chen via dhruba)
 
+    MAPREDUCE-1673. Scripts to start and stop RaidNode.
+    (Rodrigo Schmidt via dhruba)
+
   OPTIMIZATIONS
 
     MAPREDUCE-270. Fix the tasktracker to optionally send an out-of-band

Modified: hadoop/mapreduce/trunk/src/contrib/raid/README
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/raid/README?rev=936121&r1=936120&r2=936121&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/raid/README (original)
+++ hadoop/mapreduce/trunk/src/contrib/raid/README Wed Apr 21 00:19:45 2010
@@ -144,6 +144,19 @@ on any machine irrespective of whether t
 You can start the RaidNode by running the following on the selected machine:
 nohup $HADOOP_HOME/bin/hadoop org.apache.hadoop.raid.RaidNode >> /xxx/logs/hadoop-root-raidnode-hadoop.xxx.com.log
&
 
+Optionally, we provide two scripts to start and stop the RaidNode. Copy the scripts
+start-raidnode.sh and stop-raidnode.sh to the directory $HADOOP_HOME/bin in the machine
+you would like to deploy the daemon. You can start or stop the RaidNode by directly 
+callying the scripts from that machine. If you want to deploy the RaidNode remotely,
+copy start-raidnode-remote.sh and stop-raidnode-remote.sh to $HADOOP_HOME/bin at 
+the machine from which you want to trigger the remote deployment and create a text
+file $HADOOP_HOME/conf/raidnode at the same machine containing the name of the server
+where the RaidNode should run. These scripts run ssh to the specified machine and 
+invoke start/stop-raidnode.sh there. As an example, you might want to change
+start-mapred.sh in the JobTracker machine so that it automatically calls 
+start-raidnode-remote.sh (and do the equivalent thing for stop-mapred.sh and 
+stop-raidnode-remote.sh).
+
 Run fsckraid periodically (being developed as part of another JIRA). This valudates parity
 blocsk of a file.
 

Added: hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode-remote.sh
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode-remote.sh?rev=936121&view=auto
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode-remote.sh (added)
+++ hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode-remote.sh Wed Apr 21 00:19:45
2010
@@ -0,0 +1,43 @@
+#!/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 hadoop RaidNode process on machine specified on file conf/raidnode
+
+usage="Usage: start-raidnode-remote.sh"
+
+params=$#
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+. "$bin"/hadoop-config.sh
+
+# get arguments
+if [ $# -ge 1 ]; then
+    echo $usage
+    exit
+fi
+
+if [ -f "${HADOOP_CONF_DIR}/raidnode" ]; then
+  export HADOOP_SLAVES="${HADOOP_CONF_DIR}/raidnode"
+  echo "Starting raidnode at "`cat ${HADOOP_SLAVES}`
+  "$bin"/slaves.sh --config $HADOOP_CONF_DIR cd "$HADOOP_HOME" \; "$bin/start-raidnode.sh"
+else
+  echo "No raidnode file in ${HADOOP_CONF_DIR}/raidnode"
+fi
+
+

Added: hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode.sh
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode.sh?rev=936121&view=auto
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode.sh (added)
+++ hadoop/mapreduce/trunk/src/contrib/raid/bin/start-raidnode.sh Wed Apr 21 00:19:45 2010
@@ -0,0 +1,40 @@
+#!/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 hadoop RaidNode process
+# Run this on RaidNode machine
+
+usage="Usage: start-raidnode.sh"
+
+params=$#
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+. "$bin"/hadoop-config.sh
+
+# get arguments
+if [ $# -ge 1 ]; then
+    echo $usage
+fi
+
+if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
+  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
+fi
+export HADOOP_OPTS="$HADOOP_OPTS $HADOOP_RAIDNODE_OPTS"
+
+"$bin"/hadoop-daemon.sh --config $HADOOP_CONF_DIR start org.apache.hadoop.raid.RaidNode

Added: hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode-remote.sh
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode-remote.sh?rev=936121&view=auto
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode-remote.sh (added)
+++ hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode-remote.sh Wed Apr 21 00:19:45
2010
@@ -0,0 +1,40 @@
+#!/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.
+
+
+# Stop hadoop RaidNode process on machine specified on file conf/raidnode
+
+usage="Usage: stop-raidnode-remote.sh"
+
+params=$#
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+. "$bin"/hadoop-config.sh
+
+# get arguments
+if [ $# -ge 1 ]; then
+    echo $usage
+fi
+
+if [ -f "${HADOOP_CONF_DIR}/raidnode" ]; then
+  export HADOOP_SLAVES="${HADOOP_CONF_DIR}/raidnode"
+  echo "Stopping raidnode at "`cat ${HADOOP_SLAVES}`
+  "$bin"/slaves.sh --config $HADOOP_CONF_DIR cd "$HADOOP_HOME" \; "$bin/stop-raidnode.sh"
+else
+  echo "No raidnode file in ${HADOOP_CONF_DIR}/raidnode"
+fi

Added: hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode.sh
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode.sh?rev=936121&view=auto
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode.sh (added)
+++ hadoop/mapreduce/trunk/src/contrib/raid/bin/stop-raidnode.sh Wed Apr 21 00:19:45 2010
@@ -0,0 +1,37 @@
+#!/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.
+
+
+# Stop hadoop RaidNode process
+# Run this on RaidNode machine.
+
+usage="Usage: stop-raidnode.sh"
+
+params=$#
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+. "$bin"/hadoop-config.sh
+
+# get arguments
+if [ $# -ge 1 ]; then
+    echo $usage
+fi
+
+export HADOOP_OPTS="$HADOOP_OPTS $HADOOP_RAIDNODE_OPTS"
+
+"$bin"/hadoop-daemon.sh --config $HADOOP_CONF_DIR stop org.apache.hadoop.raid.RaidNode



Mime
View raw message