Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DC7A10790 for ; Fri, 28 Mar 2014 05:38:27 +0000 (UTC) Received: (qmail 93932 invoked by uid 500); 28 Mar 2014 05:38:18 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 93319 invoked by uid 500); 28 Mar 2014 05:38:15 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 93283 invoked by uid 99); 28 Mar 2014 05:38:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Mar 2014 05:38:14 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of avinz50@gmail.com designates 74.125.83.54 as permitted sender) Received: from [74.125.83.54] (HELO mail-ee0-f54.google.com) (74.125.83.54) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Mar 2014 05:38:08 +0000 Received: by mail-ee0-f54.google.com with SMTP id d49so3588145eek.41 for ; Thu, 27 Mar 2014 22:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=a9pYfp/GLJrf7qaCnwu+dQOcH++Id3omhU1UHtG/9SU=; b=mRwd1gh1rKbuhcyXcVsh2+WbvpDtsIo4M91z7TSD/GH/CsbNThSxId+dZT6n+/k3e2 ZcLh2oIbFKyDQhctvL7KmGaMAYKxU6XPkYfXEgAkz4cRu486sifupFj1Lhd6sPWJqJbi XZv5saaMaxD8hwdjlj8znN2fkAeHEvXxetM/OuwjZKWsc+wqUtqPIMPn0/QJyyUO9AgR AaRQ/ZGsqtzABXezPMpiUuBO8Szmd5OD+OEyfwg/ALztI8dx3hKxI1aGrvunQoDPcQsv ASPw3uuKLGhuuWctTS7jAweXs8MFxLknrnWgiWrQGsOmc41St0emYgwYDWil+h4pDP35 jpPA== MIME-Version: 1.0 X-Received: by 10.15.64.132 with SMTP id o4mr7326471eex.14.1395985067025; Thu, 27 Mar 2014 22:37:47 -0700 (PDT) Received: by 10.14.178.71 with HTTP; Thu, 27 Mar 2014 22:37:46 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Mar 2014 22:37:46 -0700 Message-ID: Subject: Re: HADOOP_MAPRED_HOME not found! From: Avinash Kujur To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a11c3e742082a5f04f5a41a38 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3e742082a5f04f5a41a38 Content-Type: text/plain; charset=ISO-8859-1 yes, it is there. then why execution of that command throwing such error. Do i need to change anything in this hadoop file ? #!/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. # This script runs the hadoop core commands. bin=`which $0` bin=`dirname ${bin}` bin=`cd "$bin" ; pwd` DEFAULT_LIBEXEC_DIR="$bin"/../libexec HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} . $HADOOP_LIBEXEC_DIR/hadoop-config.sh function print_usage(){ echo "Usage: hadoop [--config confdir] COMMAND" echo " where COMMAND is one of:" echo " fs run a generic filesystem user client" echo " version print the version" echo " jar run a jar file" echo " checknative [-a|-h] check native hadoop and compression libraries availability" echo " distcp copy file or directories recursively" echo " archive -archiveName NAME -p * create a hadoop archive" echo " classpath prints the class path needed to get the" echo " Hadoop jar and the required libraries" echo " daemonlog get/set the log level for each daemon" echo " or" echo " CLASSNAME run the class named CLASSNAME" echo "" echo "Most commands print help when invoked w/o parameters." } if [ $# = 0 ]; then print_usage exit fi COMMAND=$1 case $COMMAND in # usage flags --help|-help|-h) print_usage exit ;; #hdfs commands namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups) echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2 echo "Instead use the hdfs command for it." 1>&2 echo "" 1>&2 #try to locate hdfs and if present, delegate to it. shift if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@" elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@" else echo "HADOOP_HDFS_HOME not found!" exit 1 fi ;; #mapred commands for backwards compatibility pipes|job|queue|mrgroups|mradmin|jobtracker|tasktracker|mrhaadmin|mrzkfc|jobtrackerha) echo "DEPRECATED: Use of this script to execute mapred command is deprecated." 1>&2 echo "Instead use the mapred command for it." 1>&2 echo "" 1>&2 #try to locate mapred and if present, delegate to it. shift if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} "$@" elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} "$@" else echo "HADOOP_MAPRED_HOME not found!" exit 1 fi ;; classpath) if $cygwin; then CLASSPATH=`cygpath -p -w "$CLASSPATH"` fi echo $CLASSPATH exit ;; #core commands *) # the core commands if [ "$COMMAND" = "fs" ] ; then CLASS=org.apache.hadoop.fs.FsShell elif [ "$COMMAND" = "version" ] ; then CLASS=org.apache.hadoop.util.VersionInfo elif [ "$COMMAND" = "jar" ] ; then CLASS=org.apache.hadoop.util.RunJar elif [ "$COMMAND" = "key" ] ; then CLASS=org.apache.hadoop.crypto.key.KeyShell elif [ "$COMMAND" = "checknative" ] ; then CLASS=org.apache.hadoop.util.NativeLibraryChecker elif [ "$COMMAND" = "distcp" ] ; then CLASS=org.apache.hadoop.tools.DistCp CLASSPATH=${CLASSPATH}:${TOOL_PATH} elif [ "$COMMAND" = "daemonlog" ] ; then CLASS=org.apache.hadoop.log.LogLevel elif [ "$COMMAND" = "archive" ] ; then CLASS=org.apache.hadoop.tools.HadoopArchives CLASSPATH=${CLASSPATH}:${TOOL_PATH} elif [[ "$COMMAND" = -* ]] ; then # class and package names cannot begin with a - echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'" exit 1 else CLASS=$COMMAND fi shift # Always respect HADOOP_OPTS and HADOOP_CLIENT_OPTS HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS" #make sure security appender is turned off HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,NullAppender}" if $cygwin; then CLASSPATH=`cygpath -p -w "$CLASSPATH"` fi export CLASSPATH=$CLASSPATH exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@" ;; esac thank you. On Thu, Mar 27, 2014 at 10:19 PM, divye sheth wrote: > Which version of hadoop are u using? AFAIK the hadoop mapred home is the > directory where hadoop is installed or in other words untarred. > > Thanks > Divye Sheth > On Mar 28, 2014 10:43 AM, "Avinash Kujur" wrote: > >> hi, >> >> when i am trying to execute this command: >> hadoop job -history ~/1 >> its giving error like: >> DEPRECATED: Use of this script to execute mapred command is deprecated. >> Instead use the mapred command for it. >> >> HADOOP_MAPRED_HOME not found! >> >> from where can i get HADOOP_MAPRED_HOME? >> >> thanks. >> > --001a11c3e742082a5f04f5a41a38 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
yes, it is there. then why execution of that com= mand throwing such error.
Do i need to change anything in this ha= doop file ?

#!/usr/bin/env bash

# Licensed to the Apache Soft= ware Foundation (ASF) under one or more
# contributor license agreements.=A0 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.=A0 You may obtain a copy of the License at
#
= #=A0=A0=A0=A0 http:/= /www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software<= br># distributed under the License is distributed on an "AS IS" B= ASIS,
# 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.

# This script runs the hadoop core co= mmands.

bin=3D`which $0`
bin=3D`dirname ${bin}`
bin=3D`cd &qu= ot;$bin" ; pwd`
=A0
DEFAULT_LIBEXEC_DIR=3D"$bin"/../libexec
HADOOP_LIBEXEC_= DIR=3D${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
. $HADOOP_LIBEXEC_DIR/= hadoop-config.sh

function print_usage(){
=A0 echo "Usage: ha= doop [--config confdir] COMMAND"
=A0 echo "=A0=A0=A0=A0=A0=A0 where COMMAND is one of:"
=A0 ech= o "=A0 fs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 run a = generic filesystem user client"
=A0 echo "=A0 version=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 print the version"
=A0 echo "= =A0 jar <jar>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 run a jar file" =A0 echo "=A0 checknative [-a|-h]=A0 check native hadoop and compressi= on libraries availability"
=A0 echo "=A0 distcp <srcurl>= <desturl> copy file or directories recursively"
=A0 echo &qu= ot;=A0 archive -archiveName NAME -p <parent path> <src>* <de= st> create a hadoop archive"
=A0 echo "=A0 classpath=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 prints the cl= ass path needed to get the"
=A0 echo "=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Hadoop jar and the required libr= aries"
=A0 echo "=A0 daemonlog=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 get/set the log level for each daemon"
=A0 echo " or"
=A0 echo "=A0 CLASSNAME=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 run the class named CLASSNAME"
=A0 echo ""= ;
=A0 echo "Most commands print help when invoked w/o parameters.&q= uot;
}

if [ $# =3D 0 ]; then
=A0 print_usage
=A0 exit
fi

COMMAND=3D$1
case $COMMAND in=A0 # usage flags
=A0 --help|-help|-h)
=A0=A0=A0 print_usage
=A0= =A0=A0 exit
=A0=A0=A0 ;;

=A0 #hdfs commands
=A0 namenode|secon= darynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups)
=A0=A0=A0 echo "DEPRECATED: Use of this script to execute hdfs command= is deprecated." 1>&2
=A0=A0=A0 echo "Instead use the h= dfs command for it." 1>&2
=A0=A0=A0 echo "" 1>&= amp;2
=A0=A0=A0 #try to locate hdfs and if present, delegate to it.=A0 <= br> =A0=A0=A0 shift
=A0=A0=A0 if [ -f "${HADOOP_HDFS_HOME}"/bin/hd= fs ]; then
=A0=A0=A0=A0=A0 exec "${HADOOP_HDFS_HOME}"/bin/hdfs= ${COMMAND/dfsgroups/groups}=A0 "$@"
=A0=A0=A0 elif [ -f "= ;${HADOOP_PREFIX}"/bin/hdfs ]; then
=A0=A0=A0=A0=A0 exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgro= ups/groups} "$@"
=A0=A0=A0 else
=A0=A0=A0=A0=A0 echo "= HADOOP_HDFS_HOME not found!"
=A0=A0=A0=A0=A0 exit 1
=A0=A0=A0 fi=
=A0=A0=A0 ;;

=A0 #mapred commands for backwards compatibility =A0 pipes|job|queue|mrgroups|mradmin|jobtracker|tasktracker|mrhaadmin|mrzkf= c|jobtrackerha)
=A0=A0=A0 echo "DEPRECATED: Use of this script to e= xecute mapred command is deprecated." 1>&2
=A0=A0=A0 echo &q= uot;Instead use the mapred command for it." 1>&2
=A0=A0=A0 echo "" 1>&2
=A0=A0=A0 #try to locate mapred = and if present, delegate to it.
=A0=A0=A0 shift
=A0=A0=A0 if [ -f &qu= ot;${HADOOP_MAPRED_HOME}"/bin/mapred ]; then
=A0=A0=A0=A0=A0 exec &= quot;${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} &quo= t;$@"
=A0=A0=A0 elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then
=A0= =A0=A0=A0=A0 exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroup= s/groups} "$@"
=A0=A0=A0 else
=A0=A0=A0=A0=A0 echo "HA= DOOP_MAPRED_HOME not found!"
=A0=A0=A0=A0=A0 exit 1
=A0=A0=A0 fi
=A0=A0=A0 ;;

=A0 classpath= )
=A0=A0=A0=A0=A0 if $cygwin; then
=A0=A0=A0=A0=A0 CLASSPATH=3D`cygpa= th -p -w "$CLASSPATH"`
=A0=A0=A0 fi
=A0=A0=A0 echo $CLASSPA= TH
=A0=A0=A0 exit
=A0=A0=A0 ;;

=A0 #core commands=A0
=A0 *)
=A0=A0=A0 # the core commands
=A0=A0=A0 if [ "$COMMAND&qu= ot; =3D "fs" ] ; then
=A0=A0=A0=A0=A0 CLASS=3Dorg.apache.hadoo= p.fs.FsShell
=A0=A0=A0 elif [ "$COMMAND" =3D "version&quo= t; ] ; then
=A0=A0=A0=A0=A0 CLASS=3Dorg.apache.hadoop.util.VersionInfo =A0=A0=A0 elif [ "$COMMAND" =3D "jar" ] ; then
=A0= =A0=A0=A0=A0 CLASS=3Dorg.apache.hadoop.util.RunJar
=A0=A0=A0 elif [ &quo= t;$COMMAND" =3D "key" ] ; then
=A0=A0=A0=A0=A0 CLASS=3Dor= g.apache.hadoop.crypto.key.KeyShell
=A0=A0=A0 elif [ "$COMMAND" =3D "checknative" ] ; then<= br>=A0=A0=A0=A0=A0 CLASS=3Dorg.apache.hadoop.util.NativeLibraryChecker
= =A0=A0=A0 elif [ "$COMMAND" =3D "distcp" ] ; then
= =A0=A0=A0=A0=A0 CLASS=3Dorg.apache.hadoop.tools.DistCp
=A0=A0=A0=A0=A0 CLASSPATH=3D${CLASSPATH}:${TOOL_PATH}
=A0=A0=A0 elif [ &= quot;$COMMAND" =3D "daemonlog" ] ; then
=A0=A0=A0=A0=A0 C= LASS=3Dorg.apache.hadoop.log.LogLevel
=A0=A0=A0 elif [ "$COMMAND&qu= ot; =3D "archive" ] ; then
=A0=A0=A0=A0=A0 CLASS=3Dorg.apache.hadoop.tools.HadoopArchives
=A0=A0=A0= =A0=A0 CLASSPATH=3D${CLASSPATH}:${TOOL_PATH}
=A0=A0=A0 elif [[ "$CO= MMAND" =3D -*=A0 ]] ; then
=A0=A0=A0=A0=A0=A0=A0 # class and packag= e names cannot begin with a -
=A0=A0=A0=A0=A0=A0=A0 echo "Error: No= command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMM= AND#-}'"
=A0=A0=A0=A0=A0=A0=A0 exit 1
=A0=A0=A0 else
=A0=A0=A0=A0=A0 CLASS=3D$= COMMAND
=A0=A0=A0 fi
=A0=A0=A0 shift
=A0=A0=A0
=A0=A0=A0 # Alw= ays respect HADOOP_OPTS and HADOOP_CLIENT_OPTS
=A0=A0=A0 HADOOP_OPTS=3D&= quot;$HADOOP_OPTS $HADOOP_CLIENT_OPTS"

=A0=A0=A0 #make sure sec= urity appender is turned off
=A0=A0=A0 HADOOP_OPTS=3D"$HADOOP_OPTS -Dhadoop.security.logger=3D${HAD= OOP_SECURITY_LOGGER:-INFO,NullAppender}"
if $cygwin; then
=A0=A0= =A0=A0=A0 CLASSPATH=3D`cygpath -p -w "$CLASSPATH"`
=A0=A0=A0 f= i
=A0=A0=A0 export CLASSPATH=3D$CLASSPATH
=A0=A0=A0 exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$= @"
=A0=A0=A0 ;;

esac

thank you.


On Thu, Mar 27, 2014 at 10:19 PM, divye sheth <= divs.sheth@gmail.= com> wrote:

Which version of hadoop are u= using? AFAIK the hadoop mapred home is the directory where hadoop is insta= lled or in other words untarred.

Thanks
Divye Sheth

On Mar 28, 2014 10:43 AM, "Avinash Kujur&qu= ot; <avinz50@gmai= l.com> wrote:
hi,

when i am trying to execut= e this command:
hadoop job -history ~/1
its giving error like:
DEP= RECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

HADOOP_MAPRED_HOME not found!

from where can i get HADOOP_= MAPRED_HOME?

thanks.

--001a11c3e742082a5f04f5a41a38--