smali

среда, 11 марта 2015 г.

Apache Hadoop for Windows Platform

2 комментария:

  1. ///////////////

    hadoop fs -mkdir /in
    hadoop fs -mkdir /out

    hadoop fs -copyFromLocal c:\Hwork\recipeitems-latest.json /in

    hadoop jar c:\Hwork\Recipe.jar Recipe /in /out

    hadoop fs -ls /out
    hadoop fs -cat /out/part-r-00000
    hadoop fs -ls /in

    start hadoop jar c:\Hwork\Recipe.jar Recipe /in /out


    ///////////////
    javac -classpath C:\hadoop-2.3.0\share\hadoop\common\hadoop-common-2.3.0.jar;C:\hadoop-2.3.0\share\hadoop\mapreduce\hadoop-mapreduce-client-core-2.3.0.jar;C:\hadoop-2.3.0\share\hadoop\common\lib\gson-2.2.4.jar;C:\hadoop-2.3.0\share\hadoop\common\lib\commons-cli-1.2.jar Recipe.java

    jar -cvf Recipe.jar *.class

    ///////////////

    - hadoop
    - hadooop conf
    - HADOOP_HOME
    - PATH <- Hadoop/bin
    -- JAVA_HOME
    -- java/bin -> path
    - etc\hadoop\hadoop_env.cfg
    -- java_home

    - cd hadoop/bin
    -- hadoop
    -- hadoop namenode -format
    --- c:\hadoop -- data

    - cd hadoop/sbin
    -- start-yarn
    -- start-dfs

    -c:\hwork
    -- java
    -- json
    --- javac Recipe.java

    - google-gson
    -- in hadoop/share/hadoop/common/lib/google-gson

    - jar

    - hadoop fs -mkdir /in
    - hadoop fs -copyFromLocal json
    - hadoop fs -ls /in
    - hadoop jar
    - hadoop fs -ls /out
    - hadoop fs -cat /out/part-r-00000

    - localhost:50070

    ///////////////////////////////////

    ОтветитьУдалить
  2. 15/03/12 15:05:08 INFO mapreduce.Job: map 0% reduce 0%
    15/03/12 15:05:16 INFO mapreduce.Job: Task Id : attempt_1426165389823_0002_m_000
    000_0, Status : FAILED
    Error: java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileS
    plit cannot be cast to org.apache.hadoop.mapred.InputSplit
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:403)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma
    tion.java:1548)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)

    ОтветитьУдалить