ubuntu@VM---ubuntu:~$ sudo apt-get install hadoop-2.8.-src.tar.gz
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package hadoop-2.8.-src.tar.gz
E: Couldn't find any package by glob 'hadoop-2.8.-src.tar.gz'
E: Couldn't find any package by regex 'hadoop-2.8.-src.tar.gz'
ubuntu@VM---ubuntu:~$ sudo wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.8.0/hadoop-2.8.0-src.tar.gz
---- ::-- http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.8.0/hadoop-2.8.0-src.tar.gz
Resolving mirror.bit.edu.cn (mirror.bit.edu.cn)... 202.204.80.77, :da8::::56ff:fea1:
Connecting to mirror.bit.edu.cn (mirror.bit.edu.cn)|202.204.80.77|:... connected.
HTTP request sent, awaiting response... OK
Length: (33M) [application/octet-stream]
Saving to: 'hadoop-2.8.0-src.tar.gz' hadoop-2.8.-src.tar.gz %[==========================================================>] 32.91M .10MB/s in 31s -- :: (1.05 MB/s) - 'hadoop-2.8.0-src.tar.gz' saved [/] ubuntu@VM---ubuntu:~$

Hadoop
计算框架

基于Java开发
安装jdk

sudo apt-get install openjdk-8-jdk

ubuntu@VM-52-248-ubuntu:~$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
ubuntu@VM-52-248-ubuntu:~$
https://www.linuxhelp.com/how-to-install-hadoop-in-ubuntu/
{
cd /usr/local/
sudo wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.8.1/hadoop-2.8.1.tar.gz
tar -xvzf hadoop-2.8.1-src.tar.gz
sudo mv hadoop-2.8.1 hadoop
sudo chown -R hadoop sci:sci
vim hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
}

验证安装成功
mkdir ~/cicsoinput
 cp /usr/local/hadoop/etc/hadoop/*.xml ~/cicsoinput

/usr/local/hadoop/bin/hadoop jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8..jar grep ~/cicsoinput ~/grep_example 'apache'
sci@ubuntu:~/grep_example$ ll
total 20
drwxrwxr-x 2 sci sci 4096 Oct 24 06:12 ./
drwxr-xr-x 12 sci sci 4096 Oct 24 06:12 ../
-rw-r--r-- 1 sci sci 9 Oct 24 06:12 part-r-00000
-rw-r--r-- 1 sci sci 12 Oct 24 06:12 .part-r-00000.crc
-rw-r--r-- 1 sci sci 0 Oct 24 06:12 _SUCCESS
-rw-r--r-- 1 sci sci 8 Oct 24 06:12 ._SUCCESS.crc
sci@ubuntu:~/grep_example$ cat *0
9 apache
sci@ubuntu:~/grep_example$

The import org.apache.hadoop.mapreduce cannot be resolved - Stack Overflow https://stackoverflow.com/questions/21658724/the-import-org-apache-hadoop-mapreduce-cannot-be-resolved

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>3.1.0</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>3.1.0</version>
</dependency>

The import org.apache.hadoop.mapreduce cannot be resolved的更多相关文章

  1. 使用eclipse的快捷键自动生成的map或者reduce函数的参数中:“org.apache.hadoop.mapreduce.Reducer.Context context”

    今天在测试mapreduce的程序时,就是简单的去重,对照课本上的程序和自己的程序,唯一不同的就是“org.apache.hadoop.mapreduce.Reducer.Context contex ...

  2. 报错org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit

    报错 java.lang.Exception: java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSpli ...

  3. Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

    自己搭建了一套伪分布的大数据环境,运行Hadoop包中自带的示例时,出现如下错误: 错误: 找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMas ...

  4. 关于hadoop3.x MR报错:找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster

    用的apache Hadoop3.X,今天运行MR报错: 找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster 关键需要配置两个配置:ma ...

  5. wordcount报错:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:

    Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: In ...

  6. Hive进行数据统计时报错:org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster

    报错详情: 2020-04-09 22:56:58,827 ERROR [Listener at 0.0.0.0/45871] org.apache.hadoop.mapreduce.v2.app.M ...

  7. 下一代Apache Hadoop MapReduce框架的架构

    背景 随着集群规模和负载增加,MapReduce JobTracker在内存消耗,线程模型和扩展性/可靠性/性能方面暴露出了缺点,为此需要对它进行大整修. 需求 当我们对Hadoop MapReduc ...

  8. Yarn 踩坑 : Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

    原因:yarn-site.xml 中,yarn.application.classpath 未配置 解决:其中 hadoop 版本对应更改 <property> <name>y ...

  9. hadoop3.1.1:找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster

    yarn执行MapReduce任务时,找不到主类导致的 解决: 1.在命令行输入:hadoop classpath [hadoop@localhost ~]$ hadoop classpath /da ...

随机推荐

  1. sublime3故障收集emmet无法安装pyv8

    本文主要介绍Sublime Text如何开启debug模式,分析使用过程中一些常见错误情形的解决方法.情形一:Package Control:There are no packages availab ...

  2. 执行npm publish 报错:401 Unauthorized - PUT https://registry.npmjs.org/kunmomotest - You must be logged in to publish packages.

    前言 执行npm publish 报错:401 Unauthorized - PUT https://registry.npmjs.org/kunmomotest - You must be logg ...

  3. jdk8中几个核心的函数式接口笔记

    1. Function接口 /** * function 接口测试 * function 函数只能接受一个参数,要接受两个参数,得使用BiFunction接口 */ public class Func ...

  4. 新建maven子模块 出现 Unable to read parent POM

    新建maven子模块 出现 Unable to read parent POM错误 于是把pom.xml文件中的 中文字符全部删除 包括 注释 最后成功建立

  5. iOS之Run Loop详解

    转自标哥的技术博客(www.henishuo.com) 前言 做了一年多的IOS开发,对IOS和Objective-C深层次的了解还十分有限,大多还停留在会用API的级别,这是件挺可悲的事情.想学好一 ...

  6. new/delete、malloc/free 的区别

    相同点 1.都可以动态的申请或释放内存 2.存储方式相同,动态申请的内存都存放在堆中,无法自动释放,要调用对应的delete和free   区别 1.new能自行的计算需要分配的空间,malloc需要 ...

  7. 简单Spring Cloud 微服务框架搭建

    微服务是现在比较流行的技术,对于程序猿而言,了解并搭建一个基本的微服务框架是很有必要滴. 微服务包含的内容非常多,一般小伙伴们可以根据自己的需求不断添加各种组件.框架. 一般情况下,基本的微服务框架包 ...

  8. CentOS上安装Git及配置远程仓库

    首先登陆CentOS服务器,连接上服务器之后我们使用yum remove git 命令删除已安装的Git,若之前没安装过Git则不需要这一步.注意前提是你的CentOS服务器上安装了yum,这是Cen ...

  9. Linux架构之Nginx 七层负载均衡

    第50章 Nginx七层负载均衡 一.Nginx负载均衡基本概述 1)为什么要使用负载均衡 当我们的Web服务器直接面向用户,往往要承载大量并发请求,单台服务器难以负荷.使用多台Web服务器组成集群, ...

  10. C#设置欢迎窗体由不透明变透明

    public Form1()        {            InitializeComponent();        } private bool isForm1 = true;  //设 ...