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>…
Hive SQL解析过程 SQL->AST(Abstract Syntax Tree)->Task(MapRedTask,FetchTask)->QueryPlan(Task集合)->Job(Yarn) SQL解析会在两个地方进行: 一个是SQL执行前compile,具体在Driver.compile,为了创建QueryPlan: 一个是explain,具体在ExplainSemanticAnalyzer.analyzeInternal,为了创建ExplainTask: SQL执行…
hive 2.1 hive执行sql有两种方式: 执行hive命令,又细分为hive -e,hive -f,hive交互式: 执行beeline命令,beeline会连接远程thrift server: 下面分别看这些场景下sql是怎样被执行的: 1 hive命令 启动命令 启动hive客户端命令 $HIVE_HOME/bin/hive 等价于 $HIVE_HOME/bin/hive --service cli 会调用 $HIVE_HOME/bin/ext/cli.sh 实际启动类为:org.a…
hive 2.3.4 on spark 2.4.0 Hive on Spark provides Hive with the ability to utilize Apache Spark as its execution engine. set hive.execution.engine=spark; 1 version Hive on Spark is only tested with a specific version of Spark, so a given version of Hi…
hadoop部署参考:https://www.cnblogs.com/barneywill/p/10428098.html 1 拷贝到所有服务器上并解压 # ansible all-servers -m copy -a 'src=/src/path/to/apache-hive-2.3.4-bin.tar.gz dest=/dest/path/to/'# ansible all-servers -m shell -a 'tar xvf /dest/path/to/apache-hive-2.3.…
1 dbs +-------+-----------------------+----------------------------------------------+------------+------------+------------+| DB_ID | DESC | DB_LOCATION_URI | NAME | OWNER_NAME | OWNER_TYPE |+-------+-----------------------+-------------------------…
1 下载解压 https://spark.apache.org/downloads.html $ wget http://mirrors.shu.edu.cn/apache/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz $ tar xvf spark-2.4.0-bin-hadoop2.7.tgz$ cd spark-2.4.0-bin-hadoop2.7 2 配置环境变量SPARK_HOME $ export SPARK_HOME=/path/…
核心枚举 public enum ServerState { LOOKING, FOLLOWING, LEADING, OBSERVING; } zookeeper服务器状态:刚启动LOOKING,follower是FOLLOWING,leader是LEADING,observer是OBSERVING: public enum LearnerType { PARTICIPANT, OBSERVER; } 简单来说,zookeeper启动的核心类是QuorumPeerMain,启动之后会加载配置,…
大数据篇:Hive hive.apache.org Hive是什么? Hive是Facebook开源的用于解决海量结构化日志的数据统计,是基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张表,并且提供类SQL查询功能,本质是将HQL转化成MapReduce程序. 数据存储在HDFS,分析数据底层实现默认是MapReduce,执行程序运行在Yarn上. 如果没有Hive 想象一下数据统计的时候写大量的MapReduce程序,那会是多么痛苦.如果是写SQL就开心多了,尤其是离线数据…
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…