随笔分类 - Hadoop02
摘要:1. Flume介绍 Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方, 用于收集数据;同时,Flume提供对数据进行简单处理,并写到各种数据接受方(可定制)的能力。 1.2.1 日志收集 Flume最早是
阅读全文
摘要://之前一直用的是memory缓存 channels通道类型为文件形式 [root@linux05 conf]# vim filechannel.conf [root@linux05 conf]# flume-ng agent -c . -f filechannel.conf -n a1 -Dflu
阅读全文
摘要:[root@linux05 conf]# vim hdfssink.conf //从缓存拿出来 直接到hdfs 中 ****************************************** a1.sources=r1a1.channels=c1a1.sinks=k1 a1.sources
阅读全文
摘要:flume常用命令 //复制 文件 cp exec.conf tcp.conf flume-ng agent -c . -f avro.conf -n a1 -Dflume.root.logger=info,console flume-ng avro-client -c . -H linux05 -
阅读全文
摘要:add jar /root/Downloads/apache-hive-1.2.0-bin/lib/udf.jar; 1.引jar 写自己想用的方法 2.将jar 放入hive中的lib下 3.创建一个临时的方法 create temporary function allsal as "com.bw
阅读全文
摘要:hive> select pmod(sal,2) from emp; //创建表 人名 分数 hive> create table sc(name string,scores Array<int>) row format delimited fields terminated by " " coll
阅读全文
摘要:lateral viem 表的关联只能和explode使用 hive> select explode(info) from t_map where id=1; 1 CN_lldd2 CN_sjd3 CN_jp4 CN_rpt5 USA_yns6 USA_sd7 USA_ydfdf8 USA_gdff
阅读全文
摘要:所有的命令都显示找不到了,原因是修改了/etc/profile造成的 解决方法 执行: export PATH=/bin:/usr/bin:$PATH
阅读全文
摘要:1 zhangsan 1999-08-03 3000 2 zhangsan 2008-08-08 5000 3 lisi 2000-08-08 5000 4 zhangsan 2018-08-09 15000 5 lisi 2010-09-06 8000 6 lisi 2016-10-10 15000 7 lisi 2019-05-10 28000
阅读全文
摘要:create index id_index on table t_cluster(id) as "org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler" with deferred rebuild;
阅读全文
摘要:看的次数多 或者 评分高 每个用户最喜欢哪个类型的电影 row_number() ratings表中一个电影出现几次? 一个电影有几种类型? 类型在movies 评分或者观看次数ratings movies join ratings //将类型炸开 select mid,mname,lx from
阅读全文
摘要:alter table store set SERDEPROPERTIES('field.delim'='\t');
阅读全文
摘要:1,F,1,10,48067 2,M,56,16,70072 3,M,25,15,55117 4,M,45,7,02460 5,M,25,20,55455 6,F,50,9,55117 7,M,35,1,06810 8,M,25,12,11413 9,M,25,17,61614 10,F,35,1,95370 11,F,25,1,04093 12,M,25,12,32793 13,M,45,1,...
阅读全文
摘要:1,1193,5,978300760 1,661,3,978302109 1,914,3,978301968 1,3408,4,978300275 1,2355,5,978824291 1,1197,3,978302268 1,1287,5,978302039 1,2804,5,978300719 1,594,4,978302268 1,919,4,978301368 1,595,5,97882...
阅读全文
摘要:在关系型数据库中会存在一个一个的分区,那么这些分区主要是 为了让我们在查询数据的时候减小压力
阅读全文

浙公网安备 33010602011771号