impala2.12 官方:http://impala.apache.org/ 一 简介 Apache Impala is the open source, native analytic database for Apache Hadoop. Impala is shipped by Cloudera, MapR, Oracle, and Amazon. impala是hadoop上的开源分析性数据库:C++和java语言开发: Do BI-style Queries on Hadoop Im…
本章内容我们学习一下 MapReduce 中的 Shuffle 过程,Shuffle 发生在 map 输出到 reduce 输入的过程,它的中文解释是 “洗牌”,顾名思义该过程涉及数据的重新分配,主要分为两部分:1. map 任务输出的数据分组.排序,写入本地磁盘 2. reduce 任务拉取排序.由于该过程涉及排序.磁盘IO.以及网络IO 等消耗资源和 CPU 比较大的操作,因此该过程向来是“兵家必争”之地,即大家会重点优化的一个地方,因此也是大数据面试中经常会被重点考察的地方.本文力求通俗.…
一 架构 Impala is a massively-parallel query execution engine, which runs on hundreds of machines in existing Hadoop clusters. It is decoupled from the underlying storage engine, unlike traditional relational database management systems where the query…
1)将coordinator和executor角色分离 By default, each host in the cluster that runs the impalad daemon can act as the coordinator for an Impala query, execute the fragments of the execution plan for the query, or both. During highly concurrent workloads for l…
核心枚举 public enum ServerState { LOOKING, FOLLOWING, LEADING, OBSERVING; } zookeeper服务器状态:刚启动LOOKING,follower是FOLLOWING,leader是LEADING,observer是OBSERVING: public enum LearnerType { PARTICIPANT, OBSERVER; } 简单来说,zookeeper启动的核心类是QuorumPeerMain,启动之后会加载配置,…
tpc 官方:http://www.tpc.org/ 一 简介 The TPC is a non-profit corporation founded to define transaction processing and database benchmarks and to disseminate objective, verifiable TPC performance data to the industry. TPC(The Transaction Processing Perform…
对文件进行词频统计,是一个大数据领域的hello word级别的应用,来看下实现有多简单: 1 Linux单机处理 egrep -o "\b[[:alpha:]]+\b" test_word.log|sort|uniq -c|sort -rn|head -10 2 Spark分布式处理(Scala) val sparkConf = new SparkConf() val sc = new SparkContext(sparkConf) sc.textFile("test_wo…
1 准备analyzer 内置analyzer 参考:https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html 中文分词 smartcn 参考:https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-smartcn.html ik $ bin/elasticsearch-plugin insta…
1 compress & mr hive默认的execution engine是mr hive> set hive.execution.engine;hive.execution.engine=mr 所以针对mr的优化就是hive的优化,比如压缩和临时目录 mapred-site.xml <property> <name>mapreduce.map.output.compress</name> <value>true</value>…
Index Settings 重要索引配置 Index level settings can be set per-index. Settings may be: 1 static 静态索引配置 They can only be set at index creation time or on a closed index. 只能在创建索引时设置或者在closed状态的索引上设置: index.number_of_shards The number of primary shards that…
大数据中的数据量非常巨大,达到了PB级别.而且这庞大的数据之中,不仅仅包括结构化数据(如数字.符号等数据),还包括非结构化数据(如文本.图像.声音.视频等数据).这使得大数据的存储,管理和处理很难利用传统的关系型数据库去完成.在大数据之中,有价值的信息往往深藏其中.这就需要对大数据的处理速度要非常快,才能短时间之内就能从大量的复杂数据之中获取到有价值的信息.在大数据的大量复杂的数据之中,通常不仅仅包含真实的数据,一些虚假的数据也混杂其中.这就需要在大数据的处理中将虚假的数据剔除,利用真实的数据来…
Spark相关知识点 1.Spark基础知识 1.Spark是什么? UCBerkeley AMPlab所开源的类HadoopMapReduce的通用的并行计算框架 dfsSpark基于mapreduce算法实现的分布式计算,拥有HadoopMapReduce所具有的优点:但不同于MapReduce的是Job中间输出和结果可以保存在内存中,从而不再需要读写HDFS,因此Spark能更好地适用于数据挖掘与机器学习等需要迭代的map reduce的算法. 2.Spark与Hadoop的对比(Spar…
handoop相关知识点 1.Hadoop是什么? Hadoop是一个由Apache基金会所开发的分布式系统基础架构.用户可以在不了解分布式底层细节的情况下,开发分布式程序.充分利用集群的威力进行高速运算和存储. Hadoop is a distributed computing platform written in Java. It incorporates features similar to those of the Google File System and of MapReduc…
一.什么是大数据 进入本世纪以来,尤其是2010年之后,随着互联网特别是移动互联网的发展,数据的增长呈爆炸趋势,已经很难估计全世界的电子设备中存储的数据到底有多少,描述数据系统的数据量的计量单位从MB(1MB大约等于一百万字节).GB(1024MB).TB(1024GB),一直向上攀升,目前,PB(等于1024TB)级的数据系统已经很常见,随着移动个人数据.社交网站.科学计算.证券交易.网站日志.传感器网络数据量的不断加大,国内拥有的总数据量早已超出 ZB(1ZB=1024EB,1EB=1024…
HDFS分布式文件系统 文件系统的基本概述 文件系统定义:文件系统是一种存储和组织计算机数据的方法,它使得对其访问和查找变得容易. 文件名:在文件系统中,文件名是用于定位存储位置. 元数据(Metadata):保存文件属性的数据,如文件名,文件长度,文件所属用户组,文件存储位置等. 数据块(Block):存储文件的最小单元.对存储介质划分了固定的区域,使用时按这些区域分配使用. HDFS的概述 HDFS(Hadoop Distributed File System)基于Google发布的GFS论…
什么是大数据?进入本世纪以来,尤其是2010年之后,随着互联网特别是移动互联网的发展,数据的增长呈爆炸趋势,已经很难估计全世界的电子设备中存储的数据到底有多少,描述数据系统的数据量的计量单位从MB(1MB大约等于一百万字节).GB(1024MB).TB(1024GB),一直向上攀升,目前,PB(等于1024TB)级的数据系统已经很常见,随着移动个人数据.社交网站.科学计算.证券交易.网站日志.传感器网络数据量的不断加大,国内拥有的总数据量早已超出 ZB(1ZB=1024EB,1EB=1024PB…
面试官:想了解大数据量的运维能力. 解答:索引数据的规划,应在前期做好规划,正所谓"设计先行,编码在后", 这样才能有效的避免突如其来的数据激增导致集群处理能力不足引发的线上客户 检索或者其他业务受到影响. 如何调优,正如问题 1 所说,这里细化一下: 3.1 动态索引层面 基于模板+时间+rollover api 滚动创建索引,举例:设计阶段定义:blog 索 引的模板格式为:blog_index_时间戳的形式,每天递增数据. 这样做的好处:不至于数据量激增导致单个索引数据量非常大,…
解答:索引数据的规划,应在前期做好规划,正所谓"设计先行,编码在后", 这样才能有效的避免突如其来的数据激增导致集群处理能力不足引发的线上客户 检索或者其他业务受到影响. 如何调优,正如问题 1 所说,这里细化一下: 3.1 动态索引层面 基于模板+时间+rollover api 滚动创建索引,举例:设计阶段定义:blog 索 引的模板格式为:blog_index_时间戳的形式,每天递增数据. 这样做的好处:不至于数据量激增导致单个索引数据量非常大,接近于上线 2 的 32 次幂-1,…
ambari2.7.3(hdp3.1) 安装 impala2.12(自动安装最新) ambari的hdp中原生不支持impala安装,下面介绍如何通过mpack方式使ambari支持impala安装: 一 安装Service 1 下载 # wget https://github.com/cas-bigdatalab/ambari-impala-service/raw/master/ambari-impala-mpack-2.6.0-0816.tar.gz 2 安装 # ambari-server…
1 测试集群 内存:256GCPU:32Core (Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz)Disk(系统盘):300GDisk(数据盘):1.5T*1 2 测试数据 tpcds parquet 10g tpcds orc 10g 3 测试对象 hive-2.3.4 [set mapreduce.map.memory.mb=4096; set mapreduce.map.java.opts=-Xmx3072m;][yarn 200g*3] hive-2…
1 hive # kadmin.local -q 'ktadd -k /tmp/hive3.keytab -norandkey hive/server03@TEST.COM'# kinit -kt /tmp/hive3.keytab hive/server03@TEST.COM# klist # beeline -u 'jdbc:hive2://192.168.0.3:10000/;principal=hive/server03@TEST.COM'# hive 注意这里的server03是指hi…
logstash高可用体现为不丢数据(前提为服务器短时间内不可用后可恢复比如重启服务器或重启进程),具体有两个方面: 进程重启(服务器重启) 事件消息处理失败 在logstash中对应的解决方案为: Persistent Queues Dead Letter Queues 默认都没有开启: 另外可以通过docker或marathon或systemd来实现进程的自动重启: As data flows through the event processing pipeline, Logstash m…
spark 2.1.1 spark初始化rdd的时候,需要读取文件,通常是hdfs文件,在读文件的时候可以指定最小partition数量,这里只是建议的数量,实际可能比这个要大(比如文件特别多或者特别大时),也可能比这个要小(比如文件只有一个而且很小时),如果没有指定最小partition数量,初始化完成的rdd默认有多少个partition是怎样决定的呢? 以SparkContext.textfile为例来看下代码: org.apache.spark.SparkContext /** * Re…
spark 2.1.1 spark中可以通过RDD.sortBy来对分布式数据进行排序,具体是如何实现的?来看代码: org.apache.spark.rdd.RDD /** * Return this RDD sorted by the given key function. */ def sortBy[K]( f: (T) => K, ascending: Boolean = true, numPartitions: Int = this.partitions.length) (implic…
Flink 1.7 官方:https://flink.apache.org/ 一 简介 Apache Flink is an open source platform for distributed stream and batch data processing. Flink’s core is a streaming dataflow engine that provides data distribution, communication, and fault tolerance for…
https://orc.apache.org Optimized Row Columnar (ORC) file 行列混合存储 层次结构: file -> stripes -> row groups(10000 rows) Background Back in January 2013, we created ORC files as part of the initiative to massively speed up Apache Hive and improve the storage…
Fortunately, Elasticsearch provides a very comprehensive and powerful REST API that you can use to interact with your cluster. Among the few things that can be done with the API are as follows: Check your cluster, node, and index health, status, and…
kudu 1.7 官方:https://kudu.apache.org/ 一 简介 kudu有很多概念,有分布式文件系统(HDFS),有一致性算法(Zookeeper),有Table(Hive Table),有Tablet(Hive Table Partition),有列式存储(Parquet),有顺序和随机读取(HBase),所以看起来kudu是一个轻量级的 HDFS + Zookeeper + Hive + Parquet + HBase,除此之外,kudu还有自己的特点,快速写入+读取,使…
当kudu有tserver下线或者迁移或者修改hostname之后,旧的tserver会一直以dead状态出现,并且tserver日志中会有大量的连接重试日志,一天的错误日志会有几个G, W0322 22:13:59.202749 16927 tablet_service.cc:290] Invalid argument: UpdateConsensus: Wrong destination UUID requested. Local UUID: e2f80a1fcf0c47f6b7f220a4…
应用一:kafka数据同步到kudu 1 准备kafka topic # bin/kafka-topics.sh --zookeeper $zk:2181/kafka -create --topic test_sync --partitions 2 --replication-factor 2 WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could coll…