Changeset 232 for hadoop4win-setup


Ignore:
Timestamp:
Dec 22, 2010, 12:43:15 AM (14 years ago)
Author:
jazz
Message:
  • 加入 0.1.3 變更內容,保留 0.1.2 的 cygwin_mirror/setup.ini
Location:
hadoop4win-setup
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • hadoop4win-setup/hadoop4win-setup.bat

    r144 r232  
    1919REM ####################################################################
    2020
    21 set HADOOP_FILE=hadoop-0.20.1.tar.gz
    22 set HADOOP_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/core/hadoop-0.20.1
     21set HADOOP_FILE=hadoop-0.20.2.tar.gz
     22set HADOOP_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/core/hadoop-0.20.2
    2323set JDK_FILE=jdk1.6.0_18.zip
    24 set JDK_MIRROR=http://tsmc.classcloud.org
    25 set HBASE_FILE=hbase-0.20.3.tar.gz
    26 set HBASE_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3
     24set JDK_MIRROR=http://www.classcloud.org/hadoop4win
     25set HBASE_FILE=hbase-0.20.4.tar.gz
     26set HBASE_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.4
    2727set CYGWIN_ROOT=C:\hadoop4win
    2828set LOCAL_REPOSITORY=%cd%
     
    105105REM real do cygwin installation
    106106
    107 IF NOT EXIST "%CYGWIN_ROOT%\bin\bash.exe" (
    108   "%CYGWIN_SETUP%" -q -d -L -l "%LOCAL_REPOSITORY%\cygwin_mirror" -R "%CYGWIN_ROOT%" -P cygrunsrv,file,openssh,perl,procps,ncurses,rsync,sharutils,shutdown,subversion,tcp_wrappers,termcap,unzip,wget,zip,zlib
    109 )
     107"%CYGWIN_SETUP%" -q -d -L -l "%LOCAL_REPOSITORY%\cygwin_mirror" -R "%CYGWIN_ROOT%"
     108REM "%CYGWIN_SETUP%" -q -d -L -l "%LOCAL_REPOSITORY%\cygwin_mirror" -R "%CYGWIN_ROOT%" -P cygrunsrv,file,openssh,perl,procps,ncurses,rsync,sharutils,shutdown,subversion,tcp_wrappers,termcap,unzip,wget,zip,zlib
    110109
    111110REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
    151150echo "=====================================================" 
    152151%CYGWIN_ROOT%\bin\bash --login -c "/bin/hadoop4win-init"
     152%CYGWIN_ROOT%\bin\bash --login -c "/bin/hbase-init"
    153153cls
    154 echo "====================================================="
    155 echo " Use `start-hadoop' and `stop-hadoop' to run single  "
    156 echo " machine hadoop configuration.                       "
    157 echo " .                                                   "
    158 echo " Use `jps' to check java process for troubleshooting."
    159 echo " .                                                   "
    160 echo " Use `hbase-init' to install single machine HBase .  "
    161 echo "=====================================================" 
    162154set PATH=%OLDPATH%
    163155CALL "%CYGWIN_ROOT%\Cygwin.bat"
  • hadoop4win-setup/my_packages/hadoop/bin/hadoop4win-init

    r143 r232  
    2525chmod a+x `find . -name "*.exe"`
    2626chmod a+x `find . -name "*.dll"`
    27 javac -version
    2827cd /opt/hadoop
    2928bin/hadoop namenode -format
     29source /etc/profile
    3030/bin/start-hadoop
    3131bin/hadoop fs -mkdir tmp
  • hadoop4win-setup/my_packages/hadoop/bin/start-hadoop

    r140 r232  
    11#!/bin/bash
    2 cygstart --showminnoactive /bin/bash -c /bin/start-hadoop-daemon
    3 for ((i=1;i<=10;i++)); do sleep 1; printf "."; done
    4 printf "\n"
    5 jps
     2if [ -z "$(jps | grep NameNode)" ]; then
     3  cygstart --showminnoactive /bin/bash -c /bin/start-hadoop-daemon
     4  for ((i=1;i<=10;i++)); do sleep 1; printf "."; done
     5  printf "\n"
     6  jps
     7else
     8  echo "Hadoop had already started!!"
     9  jps
     10fi
     11
     12echo "==============================================="
     13echo " check http://localhost:50030 for Job Status.  "
     14echo " check http://localhost:50070 for HDFS status. "
     15echo "==============================================="
  • hadoop4win-setup/my_packages/hadoop/bin/start-hadoop-daemon

    r142 r232  
    11#!/bin/bash
    22/opt/hadoop/bin/hadoop-daemon.sh start namenode
     3/opt/hadoop/bin/hadoop-daemon.sh start secondarynamenode
    34/opt/hadoop/bin/hadoop-daemon.sh start datanode
    45/opt/hadoop/bin/hadoop-daemon.sh start jobtracker
  • hadoop4win-setup/my_packages/hadoop/bin/stop-hadoop

    r129 r232  
    11#!/bin/bash
    2 /opt/hadoop/bin/hadoop-daemon.sh stop tasktracker
    3 /opt/hadoop/bin/hadoop-daemon.sh stop jobtracker
    4 /opt/hadoop/bin/hadoop-daemon.sh stop datanode
    5 /opt/hadoop/bin/hadoop-daemon.sh stop namenode
     2if [ ! -z "$(jps | grep TaskTracker)" ];then /opt/hadoop/bin/hadoop-daemon.sh stop tasktracker ; fi
     3if [ ! -z "$(jps | grep DataNode)" ];then /opt/hadoop/bin/hadoop-daemon.sh stop datanode ; fi
     4if [ ! -z "$(jps | grep JobTracker)" ];then /opt/hadoop/bin/hadoop-daemon.sh stop jobtracker ; fi
     5if [ ! -z "$(jps | grep SecondaryNameNode)" ];then /opt/hadoop/bin/hadoop-daemon.sh stop secondarynamenode ; fi
     6if [ ! -z "$(jps | grep NameNode)" ]; then /opt/hadoop/bin/hadoop-daemon.sh stop namenode ; fi
  • hadoop4win-setup/my_packages/hadoop/conf-examples/core-site.xml

    r129 r232  
    99        <value>hdfs://localhost:9000</value>
    1010      </property>
     11    <property>
     12    <name>hadoop.tmp.dir</name>
     13    <value>/var/hadoop</value>
     14    </property>
    1115</configuration>
  • hadoop4win-setup/my_packages/hadoop/conf-examples/hdfs-site.xml

    r129 r232  
    55
    66<configuration>
    7 
     7  <property>
     8    <name>dfs.replication</name>
     9    <value>1</value>
     10  </property>
    811</configuration>
  • hadoop4win-setup/my_packages/hbase/bin/hbase-init

    r143 r232  
    11#!/bin/bash
    2 if [ ! -f /usr/src/hbase-0.20.3.tar.gz ]; then
    3   wget http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3/hbase-0.20.3.tar.gz -O /usr/src/hbase-0.20.3.tar.gz
     2if [ ! -f /usr/src/hbase-*.tar.gz ]; then
     3  echo "Hbase tar ball not found at /usr/src/hbase-*.tar.gz!!"
     4  exit
    45fi
    56
    67if [ ! -f /opt/hase* ]; then
    7   tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt
     8  tar zxvf /usr/src/hbase-*.tar.gz -C /opt
    89  ln -s /opt/hbase-* /opt/hbase
    910
     
    5253EOF
    5354
    54   clear
    55   echo "=========================================="
    56   echo " !! NOTE !!                               "
    57   echo " please 'source /etc/profile' to update   "
    58   echo " current \$PATH environment variables or  "
    59   echo " login again to update \$PATH variables.  "
    60   echo " .                                        "
    61   echo " run 'start-hbase' to start hbase daemons."
    62   echo " run 'stop-hbase'  to stop hbase daemons. "
    63   echo " run 'hbase shell hbase-test'  to test    "
    64   echo " hbase services.                          "
    65   echo "=========================================="
     55cat >> /etc/profile << EOF
     56  echo "============================================"
     57  echo " Use 'start-hadoop' to start hadoop daemons."
     58  echo " Use 'start-hadoop' to stop  hadoop daemons."
     59  echo " ."
     60  echo " run 'start-hbase' to start hbase daemons.  "
     61  echo " run 'stop-hbase'  to stop hbase daemons.   "
     62  echo " run 'hbase shell hbase-test'  to test      "
     63  echo " hbase services.                            "
     64  echo " ."
     65  echo " Use 'jps' to check java process for        "
     66  echo " troubleshooting.                           "
     67  echo "============================================"
     68EOF
    6669
    6770  echo " Starting HBase ....."
  • hadoop4win-setup/my_packages/hbase/bin/start-hbase

    r141 r232  
    11#!/bin/bash
    2 cygstart --showminnoactive /bin/bash -c /bin/start-hbase-daemon
    3 for ((i=1;i<=10;i++)); do sleep 1; printf "."; done
    4 printf "\n"
    5 jps
     2if [ -z "$(jps | grep NameNode)" ]; then /bin/start-hadoop; fi
     3if [ -z "$(jps | grep HRegionServer)" ]; then
     4  cygstart --showminnoactive /bin/bash -c /bin/start-hbase-daemon
     5  for ((i=1;i<=10;i++)); do sleep 1; printf "."; done
     6  printf "\n"
     7  jps
     8else
     9  echo "HBase had already started!!"
     10  jps
     11fi
     12
     13echo "============================================"
     14echo " run 'cd ~; hbase shell hbase-test' to test "
     15echo " hbase services.                            "
     16echo "============================================"
  • hadoop4win-setup/my_packages/hbase/bin/stop-hbase

    r141 r232  
    11#!/bin/bash
    2 /opt/hbase/bin/hbase-daemon.sh stop regionserver
    3 /opt/hbase/bin/hbase-daemon.sh stop master
    4 /opt/hbase/bin/hbase-daemon.sh stop zookeeper
     2if [ ! -z "$(jps | grep HRegionServer)" ];then /opt/hbase/bin/hbase-daemon.sh stop regionserver ; fi
     3if [ ! -z "$(jps | grep HMaster)" ];then /opt/hbase/bin/hbase-daemon.sh stop master ; fi
     4if [ ! -z "$(jps | grep HQuorumPeer)" ];then /opt/hbase/bin/hbase-daemon.sh stop zookeeper ; fi
Note: See TracChangeset for help on using the changeset viewer.