- 博客(52)
- 资源 (9)
- 收藏
- 关注
原创 开发SparkStreaming消费Kafka的应用要注意OutOfMemoryError
这里写自定义目录标题遇到的问题新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入遇到的问题其他部门的同事开发了一个SparkStreaming消费Kafka数据的应用,运行了一个多月后,不能消费数据了,但是应用在Yarn上
2021-03-07 23:38:26 314 1
原创 采用Ansible配置集群节点
采用Ansible配置ssh和jdkAnsible简介安装Ansible配置ssh和jdk1. 创建Ansible配置文件ansible.cfghostsvars/main.ymljdk.ymlssh.yml运行Ansible命令配置集群ssh配置集群jdkAnsible简介Ansible 是基于 Python 语言开发的,主流的自动化运维管理工具,其余的工具还有Puppet和Saltstack。Ansible只需要在一台普通的服务器上运行即可,不需要在客户端服务器上安装客户端。因为 Ansible
2020-06-27 16:02:57 946
原创 Hive修改分区表的分区列类型
alter table <表名> partition column (<分区列1> <新类型>);alter table <表名> partition column (<分区列2> <新类型>);如果有多个分区列的类型需要修改,则需要一个一个修改,不能一起修改...
2020-05-20 10:07:10 4381
原创 CDH集成Kafka时配置的版本问题
CDH集成Kafka时配置的版本问题问题原因解决方法问题当提交使用了Kafka的Spark应用到CDH集群时,抛出异常如下2020-01-27 11:33:48,289 ERROR [TestApp] - java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/u...
2020-01-29 23:52:30 1697 2
原创 解决提交SparkStreaming应用读取启用了Kerberos的Kafka中数据的问题
集群版本:CDH: 5.14.2Kafka:1.0.1-kafka-3.1.1Spark:2.3.0遇到的问题 1:SparkStreaming读取Kafka数据时抛出jaas.conf文件不存在的错误jaas.conf文件的内容KafkaClient { com.sun.security.auth.module.Krb5LoginModule required debug=...
2019-11-08 10:29:07 2704 6
原创 Spark UI的Executors页面中有Executor显示Dead
问题:提交一个Spark Job,在Spark UI中,显示部分Executor为Dead状态,而Dead的Executor的Failed Tasks为0查找问题原因:查看Dead Executor的stderr日志在Executor Shutdown前,只有一个ErrorERROR executor.CoarseGrainedExecutorBackend: RECEIVED S...
2019-09-17 16:32:12 4129 2
原创 Spark RDD缓存操作的小坑
今天发现了RDD缓存时的一个小坑,百度没有多少关于这个坑的介绍,也许是太简单了。不过我还是写下来,免得自己以后再被陷进去。在Spark-shell中运行这样的代码val rdd=sc.textFile("/zhangyan/result20190822.txt").map(x=>{(x.substring(0,25), x)}).cacherdd.take(20)然后,删除...
2019-09-11 17:35:45 722 1
原创 Flume1.7及以上版本的Kafka Sink batchsize(flumeBatchSize) 配置问题
Flume1.6的Kafka Sink参数中的batchSize属性在Flume1.7以后,变成了flumeBatchSize(应该是为了区分Kafka Producer的batch.size参数)。在flume-ng-1.6.0-cdh5.14.4中Kafka Sink也使用 flumeBatchSize 参数。flumeBatchSize的作用How many messages to p...
2019-03-28 18:49:22 6539
原创 利用Spark2.2.0源码编译生成适合于CDH5.14.4的Spark包
1. 不使用预编译版本安装包的原因:因为开源版本的组件如Hadoop、HBase、flume等等配合使用时可能会有jar包的冲突,所以下载相应的CDH版本进行安装。因为Spark的预编译版本如 spark-2.2.0-bin-hadoop2.6.tgz spark-2.2.0-bin-hadoop2.7.tgz,可能存在小版本的兼容问题。所以下载Spark2.2的源码,然后进行编译安装。2....
2019-03-14 10:37:55 540
原创 Oozie启动作业遇到的坑
基于Kerberos权限认证对利用Oozie启动作业环境Oozie启动作业的命令(启动的是Oozie的官方examples)运行oozie命令,运行 examples中的job查看oozie web UI要改变运行Job的User环境CDH-5.14.2Oozie启动作业的命令(启动的是Oozie的官方examples)在系统中找到 oozie-examples.tar.gz,加压缩后出现...
2019-02-28 16:19:45 2331
转载 2--MySQL安装
#安装配置mysqlyum install mysql-serverservice mysqld startnetstat -nplt | grep 3306#开机启动chkconfig mysqld onchkconfig --list mysqld#创建用户CREATE USER 'hadoop'@'%' IDENTIFIED BY 'hadoop'; CREATE ...
2018-08-22 09:48:35 116
转载 Hbase列族数量限制思考
Hbase列族数量限制思考文章出处 https://my.oschina.net/nk2011/blog/796715Hbase官方文档中写明,目前列族数量最优不超过3个。先看Hbase的存储结构 每个 RegionServer 包含多个 Region,每个 Region 包含多个Store,每个 Store 包含一个 MemStore 和多个 StoreFile。在 Hbase...
2018-07-12 09:33:03 4102
转载 1--zookeeper安装
1. 解压2. 配置data、log、out路径和server3. 创建目录4. 复制zookeeper到其他节点5. 配置环境变量6. 逐个启动验证
2018-07-11 13:14:38 160
转载 6--安装Hbase 1.2.4
1. 解压tar -xf Downloads/hbase-1.2.4-bin.tar.gz -C ~/2. hbase-env.shexport JAVA_HOME=/usr/java/jdk1.8/export HBASE_MANAGES_ZK=false # Tell HBase whether it should manage it's own instance o
2018-07-11 11:37:54 321
原创 线性可分支持向量机最大间隔唯一性证明
线性可分支持向量机最大间隔唯一性证明《统计学习方法》定理7.1中 唯一性的证明:假设问题(7.13)~(7.14)存在两个最优解(w∗1,b∗1w1∗,b1∗w^*_1, b^*_1)和(w∗2,b∗2w2∗,b2∗w^*_2, b^*_2),则 w∗1和w∗2w1∗和w2∗w^*_1和w^*_2的长度相同,即 ||w∗1||=||w∗2||=c||w1∗||=||w2∗||=c||w^*...
2018-04-20 17:27:36 1566 2
转载 《机器学习》周志华——勘误表
原贴地址是: http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/MLbook2016.htm对数学公式的Latex代码进行转换(第一版第25次印刷, 2018年3月): p.39, 最后一行:”[−∞,[−∞,[-\infty,” –> “(−∞,(−∞,(-\infty,”,”,∞],∞], \infty]” –...
2018-03-26 14:57:23 1743 3
原创 8--安装kafka_2.10-0.10.2.0集群(三个节点)
1. tar –zxvf kafka_2.10-0.10.0.1.tgz2. 配置(config/server.properties)1) master 节点上broker.id=0zookeeper.connect=master:2181listeners=PLAINTEXT://master:9092advertised.listeners=PLAINTEXT:
2017-08-12 01:17:01 933 1
原创 3--安装Hadoop 2.7.3
1. 解压tar -xf hadoop-2.7.3.tar.gz 2.创建目录3. 修改配置文件的JAVA_HOME4. 配置core-site.xml5. 配置hdfs-site.xml6. 编辑mapred-site.xml7. 编辑yarn-site.xml8. 编辑slaves9. 复制到其他节点10.配置各节点环境变量11.集群启动1)
2017-08-09 14:25:08 687
转载 Spark累加器
Accumulator(累加器, 计数器)类似于MapReduce中的counter, 将数据从一个节点发送到其他各个节点上去;通常用于监控, 调试, 记录符合某类特征的数据数目等累加器在Driver端被读取,使用的是 Accumulator.value累加器在Executor端被读取,使用的是 Accumulator.localValue,获取的是Executor本地的值。Exe...
2017-04-10 11:07:53 2886 4
转载 Spark常用函数之Action操作
1.reduce(func):通过函数func先聚集各分区的数据集,再聚集分区之间的数据,func接收两个参数,返回一个新值,新值再做为参数继续传递给函数func,直到最后一个元素 2.collect():以数据的形式返回数据集中的所有元素给Driver程序,为防止Driver程序内存溢出,一般要控制返回的数据集大小 3.count():返回数据集元素个数
2017-04-09 19:01:06 605 1
转载 Spark常用函数之键值RDD转换
原文地址:http://www.cnblogs.com/MOBIN/p/5384543.html1.mapValus(fun):对[K,V]型数据中的V值map操作(例1):对每个的的年龄加212345678910obj
2017-04-09 18:57:43 552
转载 Spark常用函数之RDD基本转换
原文地址:http://www.cnblogs.com/MOBIN/p/5373256.html0. filterRDD1经过filter过滤,转换成RDD2,但RDD2和RDD1的分区数是一样的,只不过RDD2的有些分区没有数据filter只会影响分区内数据的变化,不会影响分区数的变化基础转换操作: 1.map(func):数据集中
2017-04-09 18:46:40 458
转载 Spark算子:统计RDD分区中的元素及数量
原文地址:http://www.cnblogs.com/seaspring/articles/5641895.html//创建一个RDD,默认分区15个,因为我的spark-shell指定了一共使用15个CPU资源//–total-executor-cores 15scala> var rdd1 = sc.makeRDD(1 to 50)rdd1: org.ap
2017-04-08 19:24:02 3156
转载 Spark程序设计—创建初始RDD
有几种创建初始 RDD 的方式:1. 通过Scala 集合创建 RDD使用SparkContext的parallelize方法,为Scala集合的数据指定分片数,存储到内存中。例如:sc.parallelize(List(1,2,3), 2);//对List(1, 2, 3)进行并行化, 并行度为2(把scala的Seq序列,分为2片)2. 通过读取本地文件或HDFS
2017-04-08 18:41:23 448
转载 转:Spark的运行架构分析(二)之运行模式详解
原文链接:http://blog.csdn.net/gamer_gyt/article/details/51833681在上一篇博客 spark的运行架构分析(一)中我们有谈到Spark的运行模式是多种多样的,那么在这篇博客中我们来具体谈谈Spark的运行模式一:Spark On Local 此种模式下,我们只需要在安装Spark时不进行Hadoop和Yarn的环境配置
2017-04-06 08:20:35 458
转载 转:Spark的运行架构分析(一)之架构概述
原文链接:http://m.blog.csdn.net/article/details?id=518227651:Spark的运行模式2:Spark中的一些名词解释3:Spark的运行基本流程4:RDD的运行基本流程一:Spark的运行模式 Spark的运行模式多种多样,灵活多变,部署在单机上时,既可以用本地模式运行,也可以
2017-04-06 08:19:06 515
原创 运行Spark程序
spark-submit --master local --class demo.SparkPi SparkDemo/target/SparkDemo-1.0-SNAPSHOT.jar基本运行方式 spark-submit --master local/yarn-client/yarn-cluster 类名 jar包路径
2017-04-05 11:09:39 411
原创 Maven使用
1. 在Maven pom.xml中加入 有各自的sdk和编译器,所以需要专门的maven插件来处理scala的编译 --> org.scala-tools maven-scala-plugin 2.15.2
2017-04-05 10:54:07 668
原创 Yarn运行Mapreduce程序的工作原理
第 1 步:Client执行main()函数中run job(),开启作业 通过submit或者waitForCompletion提交作业,waitForCompletion()方法通过每秒循环轮转作业进度,如果发现与上次报告有改变,则将进度报告发送到控制台。其实waitForComplection()方法中还是调用submit()方法。第 2 步:client向RM发送作业请求同时RM将作业id
2017-04-04 19:31:23 2443
原创 201611月课程day14的Spark问题
输入目录大小为1GB, spark为何产生了8个或100个任务? Spark程序的Reduce task为何是200个, 如何减小? Spark如何访问hbase?Spark cache如何使用?
2017-04-04 18:14:13 244
转载 Spark RDD的缓存 rdd.cache() 和 rdd.persist()
RDD的缓存级别顺便看一下RDD都有哪些缓存级别,查看 StorageLevel 类的源码:object StorageLevel { val NONE = new StorageLevel(false, false, false, false) val DISK_ONLY = new StorageLevel(true, false, false, false) val DISK_ON
2017-04-04 01:16:02 13138
原创 HDFS读写文件的过程
HDFS写入流程 1、 使用HDFSᨀ供的客户端Client, 向远程的Namenode发起RPC请求 2、 Namenode会检查要创建的文件是否已经存在, 创建者是否有权限进行操作, 成功则会为文件创建一个记录, 否则会让客户端抛出异常; 3、 当客户端开始写入文件的时候, 客户端会将文件切分成多个packets, 并在内部以数据队列“data queue( 数据队列) ”的形式管理这些p
2017-04-03 14:34:14 8015
转载 转--Storm的ack机制
原文可参见:http://www.tuicool.com/articles/jeqYryJhttp://blog.csdn.net/endlu/article/details/52151967一、Storm消息可靠性Tuple树在Storm的一个Topology中,Spout通过 SpoutOutputCollector 的emit()方法发射一个t
2017-02-13 15:04:07 367
原创 如何本地调试Storm topology
1. 在Main程序中,要使用 LocalCluster提交topologyLocalCluster cluster = new LocalCluster();cluster.submitTopology("word-count", conf, builder.createTopology());Thread.sleep(10000);cluster.shutdown
2017-02-09 16:16:16 3394
转载 8--安装storm 0.9.6
1. 解压: tar -xf Downloads/apache-storm-0.9.6.tar.gz -C ./2. 创建 data 路径cd apache-storm-0.9.6/mkdir data3. 配置环境变量vim ~/.bash_profileexport STORM_HOME=/home/zkpk/storm-0.9.7exp
2017-02-08 10:33:32 582
原创 For循环
1. 枚举集合类for(file for(i for(i scala> for( i ) println(i+":"+j) //嵌套枚举1:11:22:12:23:13:2for{ i j } println(i+":"+j)2. 过滤for(file println(file)for(file
2017-01-21 13:54:12 225
原创 Map的使用
Map和Set一样采用了类继承机制提供可变的和不可变的两种版本的Map。同样可以使用Array、List、Set同样的工厂方法构造和初始化scala> var m2=Map[Int,String]()m2: scala.collection.immutable.Map[Int,String] = Map()scala> m2+=(10->"Ten") #10->"Ten"相当于1
2017-01-20 10:59:33 197
原创 Set的使用
对于Set,Scala有可变和不可变两种类型,不过并非对于各种Set各提供可变与不可变两种类型,而是通过类继承的差别把可变性差异蕴含其中。例如,示例:1. 不可变Setscala> var s1=Set("1","2")s1: scala.collection.immutable.Set[String] = Set(1, 2) #调用Set伴生对象的apply工厂方法
2017-01-20 10:40:00 235
深入理解Redis 中文版(带完整标签的高清版)
2018-10-15
Apache Kafka实战 高清PDF(带完整的目录标签)
2018-10-10
HBase应用架构(带完整书签清晰版)
2018-09-28
Spark内核设计的艺术架构设计与实现(带完整标签)
2018-09-26
利用Python进行数据分析 标签重置版
2018-03-28
Servlets和JSP核心技术 卷2(英文版) 第二部分
2009-07-16
Servlets和JSP核心技术 卷2(英文版) 第一部分
2009-07-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人