zoukankan      html  css  js  c++  java
  • docker安装hadoop

      

      docker为hadoop的云化带来了极大便利,安装和应用也会更快更方便.进入正题:

    docker search hadoop

      将会看到如下结果:

    INDEX       NAME                                       DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
    docker.io   docker.io/sequenceiq/hadoop-docker         An easy way to try Hadoop                       301                  [OK]
    docker.io   docker.io/sequenceiq/hadoop-ubuntu         An easy way to try Hadoop on Ubuntu             31                   [OK]
    docker.io   docker.io/ruo91/hadoop                     Apache hadoop 2.x - Pseudo-Distributed Mode     11                   [OK]
    docker.io   docker.io/uhopper/hadoop                   Base Hadoop image with dynamic configurati...   6                    [OK]
    docker.io   docker.io/gelog/hadoop                     WORK IN PROGRESS. NOT PRODUCTION READY          4                    [OK]
    docker.io   docker.io/uhopper/hadoop-resourcemanager   Hadoop resourcemanager                          3                    [OK]
    docker.io   docker.io/dockmob/hadoop                   Docker images for Apache Hadoop (YARN, HDF...   2                    [OK]
    docker.io   docker.io/lewuathe/hadoop-master           Multiple node hadoop cluster on Docker.         2                    [OK]
    docker.io   docker.io/uhopper/hadoop-datanode          Hadoop datanode                                 2                    [OK]
    docker.io   docker.io/uhopper/hadoop-namenode          Hadoop namenode                                 2                    [OK]
    docker.io   docker.io/uhopper/hadoop-nodemanager       Hadoop nodemanager                              2                    [OK]
    docker.io   docker.io/falkonry/hadoop                  Docker config for hadoop image                  1                    [OK]
    docker.io   docker.io/ading1977/hadoop                 Docker image for multi-node hadoop cluster.     0                    [OK]

    我们当然选择星最多的.选择第一个:

    docker pull sequenceiq/hadoop-docker

    然后等待下载.

    下载完毕之后启动docker镜像:

    docker run -it --name hadoop sequenceiq/hadoop-docker /etc/bootstrap.sh -bash

    测试运行:

    cd $HADOOP_PREFIX
    # run the mapreduce
    bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.0.jar grep input output 'dfs[a-z.]+'
    
    # check the output
    bin/hdfs dfs -cat output/*

    我下载的时候最新的还是这个2.7版本.后来的小伙伴也不一定是2.7呦.可以进入share目录去看一下提供的测试jar包是什么版本然后运行,然后查看输出结果

  • 相关阅读:
    bzoj4598: [Sdoi2016]模式字符串
    bzoj3156: 防御准备
    bzoj1966: [Ahoi2005]VIRUS 病毒检测
    bzoj3170: [Tjoi2013]松鼠聚会
    bzoj3171: [Tjoi2013]循环格
    POJ1068Parencodings
    2013年山东省第四届ACM大学生程序设计竞赛 Alice and Bob
    POJ2632Crashing Robots
    POJ1328Radar Installation
    POJ2586Y2K Accounting Bug
  • 原文地址:https://www.cnblogs.com/garfieldcgf/p/5462038.html
Copyright © 2011-2022 走看看