0

i am getting this error.

-bash: .bashrc: line 122: syntax error: unexpected end of file

Could you look at the my bashrc

cat -An ~/.bashrc | tail -3
   119  export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native$
   120  export PATH=$PATH:$HADOOP_HOME/sbin$
   121  export PATH=$HADOOP_HOME/bin$

Thanks

zero323
  • 322,348
  • 103
  • 959
  • 935

1 Answers1

0

I guess that you didn't set it correctly please follow this:

vi $HOME/.bashrc put the following lines at the end of the file: (change the hadoop home as yours)

 # Set Hadoop-related environment variables 
 export HADOOP_HOME=/usr/local/hadoop

 # Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on) 
 export JAVA_HOME=/usr/lib/jvm/java-6-sun

 # Some convenient aliases and functions for running Hadoop-related commands 
  unalias fs &> /dev/null
  alias fs="hadoop fs"
  unalias hls &> /dev/null 
  alias hls="fs -ls"

 # If you have LZO compression enabled in your Hadoop cluster and
 # compress job outputs with LZOP (not covered in this tutorial):
 # Conveniently inspect an LZOP compressed file from the command
 # line; run via:
 #
 # $ lzohead /hdfs/path/to/lzop/compressed/file.lzo
 #
 # Requires installed 'lzop' command.
  lzohead () {
     hadoop fs -cat $1 | lzop -dc | head -1000 | less 
    }

 # Add Hadoop bin/ directory to PATH
  export PATH=$PATH:$HADOOP_HOME/bin