Hadoop2.2.0 mapreduce 例子

Hadoop2.6.0子项目hadoop-mapreduce-examples的简单介绍 学习Hadoop的同学们,一定知道如果运行Hadoop自带的各种例子。hadoop-mapreduce-examples项目中还提供了这些例子,本文就其中例子的执行方式进行分析。看看它能否让我们学习mapreduce编程变得更加容易。 阅读详情

发布一个k8s部署视频:https://edu.youkuaiyun.com/course/detail/26967

课程内容:各种k8s部署方式。包括minikube部署,kubeadm部署,kubeasz部署,rancher部署,k3s部署。包括开发测试环境部署k8s,和生产环境部署k8s。

腾讯课堂连接地址https://ke.qq.com/course/478827?taid=4373109931462251&tuin=ba64518

第二个视频发布  https://edu.youkuaiyun.com/course/detail/27109

腾讯课堂连接地址https://ke.qq.com/course/484107?tuin=ba64518

介绍主要的k8s资源的使用配置和命令。包括configmap,pod,service,replicaset,namespace,deployment,daemonset,ingress,pv,pvc,sc,role,rolebinding,clusterrole,clusterrolebinding,secret,serviceaccount,statefulset,job,cronjob,podDisruptionbudget,podSecurityPolicy,networkPolicy,resourceQuota,limitrange,endpoint,event,conponentstatus,node,apiservice,controllerRevision等。

第三个视频发布:https://edu.youkuaiyun.com/course/detail/27574

详细介绍helm命令,学习helm chart语法,编写helm chart。深入分析各项目源码,学习编写helm插件
————————————————------------------------------------------------------------------------------------------------------------------

1wordcount

 

import java.io.IOException;

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;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;

//Administrator
public class WordCountExample {
	private static class WordCountMapper extends Mapper<Object, Text, Text, IntWritable>{

		@Override
		protected void map(Object key, Text value, Context context)
				throws IOException, InterruptedException {
			String str=value.toString();
			String []strArray=str.split(" ");
			for(String s:strArray){
				context.write(new Text(s), new IntWritable(1));
			}
		}
		
	}
	
	private static class WordCountReducer extends Reducer<Text, IntWritable, Text, IntWritable>{

		@Override
		protected void reduce(Text key, Iterable<IntWritable> values,
				Context context)
				throws IOException, InterruptedException {
			int sum=0;
			for(IntWritable count:values){
				sum+=count.get();
			}
			context.write(key, new IntWritable(sum));
		}
		
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		Configuration conf=new Configuration();
		String []argArray=new GenericOptionsParser(conf,args).getRemainingArgs();
		if(argArray.length!=2){
			System.out.println("需要两个参数");
			System.exit(1);
		}
		Job job=new Job(conf,"wordcount");
		job.setJarByClass(WordCountExample.class);
		job.setMapperClass(WordCountMapper.class);
		job.setMapOutputKeyClass(Text.class);
		job.setMapOutputValueClass(IntWritable.class);
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(IntWritable.class);
		job.setReducerClass(WordCountReducer.class);
		FileInputFormat.addInputPath(job, new Path(argArray[0]));
		FileOutputFormat.setOutputPath(job, new Path(argArray[1]));
		System.exit(job.waitForCompletion(true)?0:1);
	}

}


2去重

 

 

import java.io.IOException;

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;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;

//Administrator
public class DeleteRepeatExample {
	private static class DeleteRepeatMapper extends Mapper<Object, Text, Text, IntWritable>{

		@Override
		protected void map(Object key, Text value, Context context)
				throws IOException, InterruptedException {
			context.write(value, new IntWritable(0));
		}
		
	}
	
	private static class DeleteRepeatReducer extends Reducer<Text, IntWritable, Text, Object>{

		@Override
		protected void reduce(Text key, Iterable<IntWritable> values,
				Context context)
				throws IOException, InterruptedException {
			context.write(key, null);
		}
		
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		Configuration conf=new Configuration();
		String[]argArray=new GenericOptionsParser(conf, args).getRemainingArgs();
		if(argArray.length!=2){
			System.out.println("请提供两个参数");
			System.exit(1);
		}
		Job job=new Job(conf,"delete repeat");
		job.setJarByClass(DeleteRepeatExample.class);
		job.setMapperClass(DeleteRepeatMapper.class);
		job.setMapOutputKeyClass(Text.class);
		job.setMapOutputValueClass(IntWritable.class);
		job.setReducerClass(DeleteRepeatReducer.class);
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(Object.class);
		FileInputFormat.addInputPath(job, new Path(argArray[0]));
		FileOutputFormat.setOutputPath(job,new Path(argArray[1]));
		System.exit(job.waitForCompletion(true)?0:1);

	}

}


3排序

 

 

import java.io.IOException;

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;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;

//Administrator
public class SortExample {
	private static class SortMapper extends Mapper<Object, Text, IntWritable, IntWritable>{

		@Override
		protected void map(Object key, Text value, Context context)
				throws IOException, InterruptedException {
			context.write(new IntWritable(Integer.parseInt(value.toString())), new IntWritable(0));
		}
		
	}
	
	private static class SortReducer extends Reducer<IntWritable, IntWritable, Text,Text>{
		private int index=0;
		@Override
		protected void reduce(IntWritable key, Iterable<IntWritable> values,
				Context context)
				throws IOException, InterruptedException {
			for(IntWritable i:values){
				index++;
				context.write(new Text(index+""),new Text(key.get()+""));
			}
		}
		
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		Configuration conf=new Configuration();
		String[]argArray=new GenericOptionsParser(conf, args).getRemainingArgs();
		if(argArray.length!=2){
			System.out.println("请输入两个参数");
			System.exit(1);
		}
		Job job=new Job(conf,"sort");
		job.setJarByClass(SortExample.class);
		job.setMapperClass(SortMapper.class);
		job.setMapOutputKeyClass(IntWritable.class);
		job.setMapOutputValueClass(IntWritable.class);
		job.setReducerClass(SortReducer.class);
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(Text.class);
		FileInputFormat.addInputPath(job, new Path(argArray[0]));
		FileOutputFormat.setOutputPath(job, new Path(argArray[1]));
		System.exit(job.waitForCompletion(true)?0:1);

	}

}

4表自连接

 

package demo;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;
import org.apache.hadoop.vod.Ejob;

public class SelfJoin {
	private static class SelfJoinMapper extends Mapper<Object, Text, Text, Text>{

		@Override
		protected void map(Object key, Text value, Context context)
				throws IOException, InterruptedException {
			String str=value.toString();
			String[] nameArray=str.split(" ");
			context.write(new Text(nameArray[1]), new Text("1-"+nameArray[0]+"-"+nameArray[1]));
			context.write(new Text(nameArray[0]), new Text("2-"+nameArray[0]+"-"+nameArray[1]));
			
		}
		
	}
	private static class SelfJoinReducer extends Reducer<Text, Text, Text, Text>{

		@Override
		protected void reduce(Text key, Iterable<Text> values,
				Context context)
				throws IOException, InterruptedException {
			List<String> outKey=new ArrayList<String>();
			List<String> outValue=new ArrayList<String>();
			/*for(Text value:values){
			context.write(NullWritable.get(), value);
			}
			context.write(NullWritable.get(), new Text("---------"));*/
			for(Text value:values){
				String[] relationArray=value.toString().split("-");
				if(relationArray[0].equals("1")){
					outKey.add(relationArray[1]);
				}else if(relationArray[0].equals("2")){
					outValue.add(relationArray[2]);
				}
			}
			for(String k:outKey){
				for(int i=0;i<outValue.size();i++){
					context.write(new Text(k), new Text(outValue.get(i)));
				}
			}
		}
		
	}
	public static void main(String[] args) throws Exception{
		File jarFile = Ejob.createTempJar("bin");
		  //Ejob.addClasspath("/opt/hadoop/conf");
	      ClassLoader classLoader = Ejob.getClassLoader();
		  Thread.currentThread().setContextClassLoader(classLoader);
		  
		Configuration conf=new Configuration();
		String [] argArray=new GenericOptionsParser(conf, args).getRemainingArgs();
		if(argArray.length!=2){
			System.out.println("参数错误");
			System.exit(1);
		}
		JobConf jobConf=new JobConf(conf);
		jobConf.setJar(jarFile.toString());
		Job job=new Job(jobConf,"self join");
		job.setJarByClass(SelfJoin.class);
		job.setMapperClass(SelfJoinMapper.class);
		job.setMapOutputKeyClass(Text.class);
		job.setMapOutputValueClass(Text.class);
		job.setReducerClass(SelfJoinReducer.class);
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(Text.class);
		FileInputFormat.addInputPath(job, new Path(argArray[0]));
		FileOutputFormat.setOutputPath(job, new Path(argArray[1]));
		System.exit(job.waitForCompletion(true)?0:1);

	}

}


数据:

Tom Lucy
Tom Jack
Jone Lucy
Jone Jack
Lucy Mary
Lucy Ben
Jack Alice
Jack Jesse
Terry Alice
Terry Jesse
Philip Terry
Philip Alma
Mark Terry
Mark Alma

结果:

 

 

Tom	Alice
Tom	Jesse
Jone	Alice
Jone	Jesse
Tom	Mary
Tom	Ben
Jone	Mary
Jone	Ben
Philip	Alice
Philip	Jesse
Mark	Alice
Mark	Jesse

 

 

 

 

 

5多表连接

 

package demo;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;
import org.apache.hadoop.vod.Ejob;

public class MultiTableJoin {
	private static class MultiTableMapper extends Mapper<Object, Text, Text, Text>{

		@Override
		protected void map(Object key, Text value, Context context)
				throws IOException, InterruptedException {
			String str=value.toString();
			if(str.charAt(0)>'0'&&str.charAt(0)<'9'){
				context.write(new Text(str.charAt(0)+""), new Text("2-"+str.substring(1).trim()));
			}else{
				context.write(new Text(str.substring(str.length()-1)), new Text("1-"+str.substring(0, str.length()-1).trim()));
			}
		}
		
	}
	
	private static class MultiTableReducer extends Reducer<Text, Text, Text, Text>{

		@Override
		protected void reduce(Text key, Iterable<Text> values,
				Context context)
				throws IOException, InterruptedException {
			List<String>keyList=new ArrayList<String>();
			List<String>valueList=new ArrayList<String>();
			for(Text value:values){
				String str=value.toString();
				String []strArray=str.split("-");
				if(strArray[0].equals("1")){
					keyList.add(strArray[1]);
				}else if(strArray[0].equals("2")){
					valueList.add(strArray[1]);
				}
			}
			for(String skey:keyList){
				for(String svalue:valueList){
					context.write(new Text(skey), new Text(svalue));
				}
			}
		}
		
	}
	
	
	public static void main(String[] args) throws Exception{
		File jarFile=Ejob.createTempJar("bin");
		ClassLoader classLoader=Ejob.getClassLoader();
		Thread.currentThread().setContextClassLoader(classLoader);
		
		Configuration conf=new Configuration();
		String [] argArray=new GenericOptionsParser(conf, args).getRemainingArgs();
		if(argArray.length!=2){
			System.out.println("参数错误");
			System.exit(1);
		}
		JobConf jobConf=new JobConf(conf);
		jobConf.setJar(jarFile.toString());
		Job job=new Job(jobConf,"multiTalbe join");
		job.setMapperClass(MultiTableMapper.class);
		job.setMapOutputKeyClass(Text.class);
		job.setMapOutputValueClass(Text.class);
		job.setReducerClass(MultiTableReducer.class);
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(Text.class);
		FileInputFormat.addInputPath(job, new Path(argArray[0]));
		FileOutputFormat.setOutputPath(job, new Path(argArray[1]));
		System.exit(job.waitForCompletion(true)?0:1);
		
	}
}


数据:table1.txt

 

 

Beijing Red Star 1
Shenzhen Thunder 3
Guangzhou Honda 2
Beijing Rising 1
Guangzhou Development Bank 2
Tencent 3
Bank of Beijing 1


table2.txt

 

 

1 Beijing
2 Guangzhou
3 Shenzhen
4 Xian


运行结果:

 

 

Beijing Red Star	Beijing
Beijing Rising	Beijing
Bank of Beijing	Beijing
Guangzhou Honda	Guangzhou
Guangzhou Development Bank	Guangzhou
Shenzhen Thunder	Shenzhen
Tencent	Shenzhen

 

 

 

 

 

 

Hadoop2.0到Hadoop3.0简述 Hadoop是一个由Apache基金会所开发的分布式系统基础架构。用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),其中一个组件是HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS 阅读详情

相关推荐

hadoop之MapReduce简介

hadoop之MapReduce的一些简介,架构和分析

cxzaiwyy的博客 4990

java大数据demo_MapReduce Demo详解

17/11/08 11:34:55 INFO mapreduce.Job: Task Id : attempt_1509957441313_0002_m_000000_0, Status : FAILED Error: java.io.IOException: Initialization of all the collectors failed. Error in last collect or...

weixin_39626409的博客 335

Hadoop MapReduce 2.0 架构详解

比以前的版本有了很大的改进。以下是MapReduce的一些亮点;请注意,HDFS也有一些主要的改进,这些不在本文的讨论范围之内。(又名MRv2或YARN)。新的架构将JobTracker管理计算资源到应用程序的全局分配的(RM)。每个应用程序的(AM),用于管理应用程序的生命周期。每个节点上还有一个(NM),用于管理该节点上的用户进程。RM和NM构成集群的计算框架。该设计还允许在NM中运行长时间的辅助服务;这些都是特定于应用程序的服务,作为配置的一部分进行指定,并在启动期间由NM加载。对于YARN。

SmartSi 1275

hadoop-mapreduce-examples

hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-2.3.0-cdh5.1.0.jar pi 2 5 [root@name01 cmake-2.8.12.2]# hadoop version Hadoop 2.3.0-cdh5.1.0 Subversion git://github.sf.cloudera.com/CDH/

hzdxw的专栏 4076

MapReduce-Demo:一个演示MapReduce(Hadoop)程序,用于处理少量数据

MapReduce-Demo 一个演示MapReduce程序,用于处理少量数据 如何: * 1。 通过更新Maven依赖项来编译项目 * 2。 通过指向主要方法类(Students.java)从eclipse导出为.jar * 3。 将输入数据加载到HDFS COMMAND TO LOAD THE INPUT DATA TO HDFS: hadoop fs -put "/my_folder_location/students.txt" hdfs:/students.txt * 4。使用罐子执行作业并提供粗化(输入和输出文件路径) COMMAND TO EXECUTE THE MAPREDUCE JOB: hadoop jar students-high-mark.jar hdfs:/new-students.txt hdfs:/student-out9.txt * 5。 验证

hadoop-mapreduce-examples 官方demo源码

hadoop-mapreduce-examples 官方demo源码 hadoop-mapreduce-examples-2.7.7-sources

Hadoop之hadoop-mapreduce-examples测试执行及报错处理

Hadoop Map/Reduce是一个使用简易的软件框架,基于它写出来的应用程序能够运行在由上千个商用机器组成的大型集群上,并以一种可靠容错的方式并行处理上T级别的数据集。

月生的静心苑 1万+

Hadoop之MapReduce编程实例完整源码

一个自己写的Hadoop MapReduce实例源码,网上看到不少网友在学习MapReduce编程,但是除了wordcount范例外实例比较少,故上传自己的一个。包含完整实例源码,编译配置文件,测试数据,可执行jar文件,执行脚本及操作步骤。学习完此例子后,你能掌握MapReduce基础编程,及如何编译Java文件,打包jar文件,编写shell执行脚本等。后续学习还可以参看本人的优快云博客,如有问题也可以在线为你解答,不过本人也学习Hadoop不足一年,现学现卖而已,也可能力不能及,有些难的也很有可能不懂。希望能够帮助到学习MapReduce的朋友,另外稍微意思下,收取辛苦分1分啊,如果没有积分的就到本人博客下地址,看到后再发到朋友你的邮箱。

hadoop-mapreduce-example中实例介绍

hadoop-0.20.2-examples.jar是hadoop-0.20.2自带了一些实例: aggregatewordcount 计算输入文件中文字个数的基于聚合的MapReduce程序; aggregatewordlist  生成输入文件中文字个数的统计图的基于聚合的MapReduce程序; grep 计算输入文件中匹配正则表达式的文字个数的MapReduce程序; join 合并

hfc623的博客 3533

Hadoop 2.2.0 词频统计例子

基于Hadoop2.2.0的词频统计的例子。包含一个大概十万以上单词的测试数据文件。重写了Partitioner和Combiner,供学习之用。 访问博文 http://blog.csdn.net/zythy/article/details/17852579 以查看详细讲解。

hadoop-mapreduce-examples-2.6.0

Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。

【mapreduce】 Hadoop2.6.0 mapreduce 例子

1. Wordcount [java] view plaincopy import java.io.IOException;      import org.apache.hadoop.conf.Configuration;   import org.apache.hadoop.fs.Path;   import org.apache.hadoo

Rome was not built in one day 498

倍加福(P+F)R2000修改雷达IP

在调试车子的时候,用到了倍加福R2000的一款雷达,设备启动建图时发现建不了图,于是查看/scan发现话题无数据,尝试ping雷达接口发现ping不通,应该是IP地址与上位机端口的IP地址不对。首先查看雷达的IP地址,这个在雷达上有两个按键,按下后可以显示IP: 按两下右边的键再按一下左边的键雷达上会显示出IP号,这里拍的不是很清楚。查看到开始时雷达IP地址为192.168.111.10,而上位机ping的IP地址为192.168.188.50.与实际不同,所以需要对雷达进行配置。一台windows笔记本

YiYeZhiNian的博客 5890

Hadoop2.6.0 mapreduce 例子

Hadoop2.6.0 mapreduce 例子

Rocky 2626

【机器人路径规划】基于改进型A*算法的机器人路径规划(Python代码实现)

本文针对传统A算法在机器人路径规划中存在的搜索效率低、路径不平滑等问题,提出了一种改进型A算法。该算法通过引入跳点搜索(JPS)技术优化子节点扩展方式,结合贝塞尔曲线或B样条曲线进行路径平滑处理,并采用动态启发式函数和自适应邻域搜索策略,显著提升了路径规划的效率和路径质量。实验结果表明,改进型A*算法在复杂环境下能有效减少搜索节点数量,缩短路径长度,提高路径平滑性,且具备动态避障能力。

2501_92867626的博客 1583

Microsemi Libero使用技巧11——CoreUARTAPB RX管脚分配时不显示

调用串口IP核CoreUARTAPB,并例化到顶层设计,发现UART_RX管脚在进行管脚分配时没有显示出来,最后发现是CoreAPB3总线IP核配置不对导致,改为如下配置后正常。

whik1194的博客 759

hadoop-2.0.0-cdh4.7.0伪分布式安装,mapreduce例子执行

安装包已经分享到我的百度云盘(http://pan.baidu.com/s/1bn9zkZX)

ligyu110的专栏 1565

高频注入是否需要对齐和强拖操作?

高频注入技术显著优化了传统FOC启动流程,但仍需部分对齐操作。传统启动必须包含位置检测、对齐和强拖等步骤,而高频注入可实现零速闭环,简化或跳过部分环节。高频注入下的对齐主要用于验证有效性、初始化观测器和建立初始磁链,形式可大幅简化。虽然高频注入基本消除了传统强拖需求,但在重载、弱凸极等特殊情况下仍需辅助。实际应用中可采用自适应混合策略,根据负载和电机类型选择最优启动方案。高频注入使对齐和强拖从"必须"变为"可选优化项",是无传感器控制的重要进步。

汽车软件开发 207

hadoop2.0 MapReduce编程(java客户端)

1  通用开发步骤        创建java工程        引入相应的hadoop相关jar                share/hadoop/mapreduce下面的全部jar                share/hadoop/common/hadoop-common-2.7.1.jar                share/hadoop/common/li

wyl6019的博客 876

HDR 成像技术学习(三)—— LOFIC

LOFIC(Lateral Overflow Integration Capacitor,横向溢出集合电容)介绍,从像素结构到工作时序。

沧海一升的博客 9729

基于FPGA的多通道音频信号采样系统设计

FPGA是随着数字集成电路的发展而逐步演变而来的。从早期的电子管、晶体管、小规模集成电路,到超大规模集成电路(VLSIC),数字集成电路的集成度和性能不断提升。FPGA的出现为系统设计师提供了灵活的设计平台,使其能够在不依赖半导体厂商的情况下快速设计专用集成电路(ASIC)。FPGA具有设计周期短、成本低、开发工具先进等优点,广泛应用于原型设计和产品生产中。VHDL是一种用于描述数字系统的硬件描述语言,其语言形式类似于计算机高级语言,但包含了许多硬件特征语句。

qq_62634009的博客 709

【Hadoop入门学习系列之五】MapReduce 2.0编程实战

一.MapReduce2.0编程模型关于MR编程模型请参考上一篇:【Hadoop入门学习系列之四】MapReduce 2.0应用场景和原理、基本架构和编程模型二.MapReduce2.0编程接口三种编程方式Java(最原始的方式) Java编程接口组成; 旧API所在java包:org.apache.hadoop.mapred 新API所在java包 :org.apache.hadoop.map

生命奇迹泉的专栏 2429

Transformer模型详解

​本文主要介绍Transformer系列,从基础到理论,对注意力机制进行总结并解释《Attention is all you need》,提出解决sequence to sequence问题的transformer模型,用全attention的结构代替了lstm,抛弃了之前传统的encoder-decoder模型必须结合cnn或者rnn的固有模式,只用attention。文章的主要目的是在减少计算量和提高并行效率的同时不损害最终的实验结果。

专注大数据与人工智能技术分享,欢迎私信加群互相学习! 5311

Hadoop2.0 Mapreduce实例WordCount体验

在Hadoop2.0中MapReduce程序的都需要继承org.apache.hadoop.mapreduce.Mapper 和 org.apache.hadoop.mapreduce.Reducer这两个基础类,来定制自己的mapreduce功能,源码中主要的函数如下 Mapper.java public void run(Context context) throws IOExceptio

水上骑兵 8201

【系统架构设计师】十、统一建模语言UML(基本概念|UML2.0|SysML)

UML 2.0 提供了 14 种图,分别是类图、对象图、用例图、序列图、通信图(协作图)、状态图、活动图、构件图(组件图)、部署图、制品图、组合结构图、包图、交互概览图和计时图(定时图)。序列图、通信图、交互概览图和计时图均被称为交互图。 系统建模语言(SysML)是一种通用图形建模语言,用于指定,分析,设计和验证可能包括硬件,软件,信息,人员,程序和设施的复杂系统。特别是,该语言提供了图形表示,其具有用于建模系统需求,行为,结构和参数的语义基础,用于与其他工程分析模型集成。

帅次的博客 2523

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

编写简单的Mapreduce程序并部署在Hadoop2.2.0上运行

经过几天的折腾,终于配置好了Hadoop2.2.0(如何配置在Linux平台部署Hadoop请参见本博客《在Fedora上部署Hadoop2.2.0伪分布式平台》),今天主要来说说怎么在Hadoop2.2.0伪分布式上面运行我们写好的Mapreduce程序。先给出这个程序所依赖的Maven包:01020304050607080910111213141516171819202122

过往记忆大数据 1万+

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

上一篇: 从hadoop2.2,HBase0.96 mapreduce操作
下一篇: hadoop1.2.1安装配置
hxpjava1
博客等级 码龄19年 1365粉丝 511原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hxpjava1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值