第9章 大数据 企业级Hive调优

上篇:第8章 压缩和存储


1、Hive优化–Fetch抓取

Fetch抓取是指,Hive中对某些情况的查询可以不必使用MapReduce计算。例如:SELECT * FROM employees;在这种情况下,Hive可以简单地读取employee对应的存储目录下的文件,然后输出查询结果到控制台。

在hive-default.xml.template文件中hive.fetch.task.conversion默认是more,老版本hive默认是minimal,该属性修改为more以后,在全局查找、字段查找、limit查找等都不走mapreduce


进入 /usr/local/hadoop/module/hive-1.2.1/conf配置文件,编辑hive-default.xml.template 文件

[root@hadoop101 datas]# cd /usr/local/hadoop/module/hive-1.2.1/conf
[root@hadoop101 conf]# vim hive-default.xml.template 

找到这个配置参数文件:

  <property>
    <name>hive.fetch.task.conversion</name>
    <value>more</value>
    <description>
      Expects one of [none, minimal, more].
      Some select queries can be converted to single FETCH task minimizing latency.
      Currently the query should be single sourced not having any subquery and should not have
      any aggregations or distincts (which incurs RS), lateral views and joins.
      0. none : disable hive.fetch.task.conversion
      1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only
      2. more    : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns)
    </description>
  </property>

可以用来优化设置它们的运行设置

例如:
正常查询一个数据表是这样的:

0: jdbc:hive2://localhost:10000> select * from dept;
+--------------+-------------+-----------+--+
| dept.deptno  | dept.dname  | dept.loc  |
+--------------+-------------+-----------+--+
| 10           | ACCOUNTING  | 1700      |
| 20           | RESEARCH    | 1800      |
| 30           | SALES       | 1900      |
| 40           | OPERATIONS  | 1700      |
+--------------+-------------+-----------+--+
4 rows selected (2.322 seconds)
0: jdbc:hive2://localhost:10000> 

我们先查看以下属性默认参数,执行命令如下:
在这里插入图片描述

0: jdbc:hive2://localhost:10000> set hive.fetch.task.conversion;
+----------------------------------+--+
|               set                |
+----------------------------------+--+
| hive.fetch.task.conversion=more  |
+----------------------------------+--+
1 row selected (0.083 seconds)
0: jdbc:hive2://localhost:10000> 

由此可得知, 默认值是:hive.fetch.task.conversion=more

当我们在查询数据表的时候需要提交任务加载,只需要把more设置成none即可,执行命令如下:

0: jdbc:hive2://localhost:10000> set hive.fetch.task.conversion=none;
No rows affected (0.012 seconds)
0: jdbc:hive2://localhost:10000> set hive.fetch.task.conversion;
+----------------------------------+--+
|               set                |
+----------------------------------+--+
| hive.fetch.task.conversion=none  |
+----------------------------------+--+
1 row selected (0.037 seconds)

再次查询这张数据表,就会发现会加载任务的,如下:

0: jdbc:hive2://localhost:10000> select * from dept;
INFO  : Number of reduce tasks is set to 0 since there's no reduce operator
INFO  : number of splits:1
INFO  : Submitting tokens for job: job_1578407785293_0012
INFO  : The url to track the job: http://hadoop101:8088/proxy/application_1578407785293_0012/
INFO  : Starting Job = job_1578407785293_0012, Tracking URL = http://hadoop101:8088/proxy/application_1578407785293_0012/
INFO  : Kill Command = /usr/local/hadoop/module/hadoop-2.7.2/bin/hadoop job  -kill job_1578407785293_0012
INFO  : Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
INFO  : 2020-01-07 19:43:04,035 Stage-1 map = 0%,  reduce = 0%
INFO  : 2020-01-07 19:43:18,416 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 1.71 sec
INFO  : MapReduce Total cumulative CPU time: 1 seconds 710 msec
INFO  : Ended Job = job_1578407785293_0012
+--------------+-------------+-----------+--+
| dept.deptno  | dept.dname  | dept.loc  |
+--------------+-------------+-----------+--+
| 10           | ACCOUNTING  | 1700      |
| 20           | RESEARCH    | 1800      |
| 30           | SALES       | 1900      |
| 40           | OPERATIONS  | 1700      |
+--------------+-------------+-----------+--+
4 rows selected (39.614 seconds)
0: jdbc:hive2://localhost:10000> 

注意:当设置为none,所有的查询语句都需要加载任务,在调优的角度是不建议的推荐使用more


2、Hive优化-- 本地模式

大多数的Hadoop Job是需要Hadoop提供的完整的可扩展性来处理大数据集的。不过,有时Hive的输入数据量是非常小的。在这种情况下,为查询触发执行任务消耗的时间可能会比实际job的执行时间要多的多。对于大多数这种情况,Hive可以通过本地模式在单台机器上处理所有的任务。对于小数据集,执行时间可以明显被缩短
用户可以通过设置hive.exec.mode.local.auto的值为true,来让Hive在适当的时候自动启动这个优化。

2.1 查看本地模式默认属性:

0: jdbc:hive2://localhost:10000> set hive.exec.mode.local.auto;
+----------------------------------+--+
|               set                |
+----------------------------------+--+
| hive.exec.mode.local.auto=false  |
+----------------------------------+--+
1 row selected (0.01 seconds)
0: jdbc:hive2://localhost:10000> 

默认属性为false,则需要开启本地模式,只需要把false改为true即可,执行命令如下:

0: jdbc:hive2://localhost:10000> set hive.exec.mode.local.auto=true;
No rows affected (0.009 seconds)

查询一张数据表log_text的数量

0: jdbc:hive2://localhost:10000> select count(*)from log_text;

INFO  : Number of reduce tasks determined at compile time: 1
INFO  : In order to change the average load for a reducer (in bytes):
INFO  :   set hive.exec.reducers.bytes.per.reducer=<number>
INFO  : In order to limit the maximum number of reducers:
INFO  :   set hive.exec.reducers.max=<number>
INFO  : In order to set a constant number of reducers:
INFO  :   set mapreduce.job.reduces=<number>
INFO  : number of splits:1
INFO  : Submitting tokens for job: job_local930619788_0001
INFO  : The url to track the job: http://localhost:8080/
INFO  : Job running in-process (local Hadoop)
INFO  : 2020-01-07 19:54:57,828 Stage-1 map = 0%,  reduce = 0%
INFO  : 2020-01-07 19:55:00,968 Stage-1 map = 100%,  reduce = 100%
INFO  : Ended Job = job_local930619788_0001
+---------+--+
|   _c0   |
+---------+--+
| 100000  |
+---------+--+
1 row selected (6.179 seconds)
0: jdbc:hive2://localhost:10000> 

由此可见,开启本地模式可以提高查询效率


3、Hive优化-- 小表Join 大表

将key相对分散,并且数据量小的表放在join的左边,这样可以有效减少内存溢出错误发生的几率;再进一步,可以使用map join让小的维度表(1000条以下的记录条数)先进内存。在map端完成reduce。
实际测试发现:新版的hive已经对小表JOIN大表和大表JOIN小表进行了优化。小表放在左边和右边已经没有明显区别。

准备数据:
10万条小表数据(id为9万+随机数字)— smalltable
100万条大表数据(id除以10取整)----bigtable

把上面的两个文件数据导入到 /usr/local/hadoop/module/datas文件目录下:
在这里插入图片描述
当这两张表的数据上传后,我们需要做的以下操作:

(1)创建表

创建大表的SQL语句

0: jdbc:hive2://localhost:10000> create table bigtable(id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string) row format delimited fields terminated by '\t';
No rows affected (0.527 seconds)
0: jdbc:hive2://localhost:10000> 

创建小表SQL语句

0: jdbc:hive2://localhost:10000> create table smalltable(id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string) row format delimited fields terminated by '\t';
No rows affected (0.251 seconds)
0: jdbc:hive2://localhost:10000> 

创建join后表的SQL语句

0: jdbc:hive2://localhost:10000> create table jointable(id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string) row format delimited fields terminated by '\t';
No rows affected (0.157 seconds)
0: jdbc:hive2://localhost:10000> 

(2)分别向大表和小表中导入数据

导入大表数据:

0: jdbc:hive2://localhost:10000> load data local inpath '/usr/local/hadoop/module/datas/bigtable'
0: jdbc:hive2://localhost:10000> into table bigtable;
INFO  : Loading data to table default.bigtable from file:/usr/local/hadoop/module/datas/bigtable
INFO  : Table default.bigtable stats: [numFiles=1, totalSize=129157332]
No rows affected (3.26 seconds)
0: jdbc:hive2://localhost:10000> 

导入小表:

0: jdbc:hive2://localhost:10000> load data local inpath '/usr/local/hadoop/module/datas/smalltable'
0: jdbc:hive2://localhost:10000> into table smalltable;

INFO  : Loading data to table default.smalltable from file:/usr/local/hadoop/module/datas/smalltable
INFO  : Table default.smalltable stats: [numFiles=1, totalSize=13015084]
No rows affected (1.33 seconds)
0: jdbc:hive2://localhost:10000> 

(3)mapjoin功能(默认是打开的)

0: jdbc:hive2://localhost:10000> set hive.auto.convert.join;

+------------------------------+--+
|             set              |
+------------------------------+--+
| hive.auto.convert.join=true  |
+------------------------------+--+
1 row selected (0.011 seconds)
0: jdbc:hive2://localhost:10000> 

(4)执行小表JOIN大表语句

0: jdbc:hive2://localhost:10000> insert overwrite table jointable
0: jdbc:hive2://localhost:10000> select b.id, b.time, b.uid, b.keyword, b.url_rank, b.click_num, b.click_url
0: jdbc:hive2://localhost:10000> from smalltable s
0: jdbc:hive2://localhost:10000> left join bigtable  b
0: jdbc:hive2://localhost:10000> on b.id = s.id;


No rows affected (125.061 seconds)

mapjoin功能开启下,执行小表JOIN大表语句的。
接下来,我们需要把mapjoin功能关闭(true改成false)

0: jdbc:hive2://localhost:10000> set hive.auto.convert.join=false;
No rows affected (0.009 seconds)
0: jdbc:hive2://localhost:10000> 

再次执行小表JOIN大表语句:

0: jdbc:hive2://localhost:10000> insert overwrite table jointable
0: jdbc:hive2://localhost:10000> select b.id, b.time, b.uid, b.keyword, b.url_rank, b.click_num, b.click_url
0: jdbc:hive2://localhost:10000> from smalltable s
0: jdbc:hive2://localhost:10000> left join bigtable  b
0: jdbc:hive2://localhost:10000> on b.id = s.id;


No rows affected (79.544 seconds)

(5)执行小表JOIN大表语句

0: jdbc:hive2://localhost:10000> insert overwrite table jointable
0: jdbc:hive2://localhost:10000> select b.id, b.time, b.uid, b.keyword, b.url_rank, b.click_num, b.click_url
0: jdbc:hive2://localhost:10000> from bigtable  b
0: jdbc:hive2://localhost:10000> left join smalltable  s
0: jdbc:hive2://localhost:10000> on s.id = b.id;


No rows affected (93.101 seconds)
0: jdbc:hive2://localhost:10000> 


4、Hive优化 — 空key处理

大表Join大表

4.1 空KEY过滤
有时join超时是因为某些key对应的数据太多,而相同key对应的数据都会发送到相同的reducer上,从而导致内存不够。此时我们应该仔细分析这些异常的key,很多情况下,这些key对应的数据是异常数据,我们需要在SQL语句中进行过滤。例如key对应的字段为空。

准备数据:

含有null的id数据100万条---- nullid

nullid文件上传到/usr/local/hadoop/module/datas文件目录下:
在这里插入图片描述

案例实操,操作如下:

(1)创建原始数据表、空id表、合并后数据表

创建原始表

0: jdbc:hive2://localhost:10000> create table ori(id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string) row format delimited fields terminated by '\t';

No rows affected (0.413 seconds)
0: jdbc:hive2://localhost:10000> 

创建空id表

0: jdbc:hive2://localhost:10000> create table nullidtable(id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string) row format delimited fields terminated by '\t';

No rows affected (0.219 seconds)
0: jdbc:hive2://localhost:10000> 

创建join后表的语句

create table jointable(
id bigint, time bigint, uid string, keyword string, url_rank int, click_num int, click_url string
) 
row format delimited fields terminated by '\t';

若join后表的语句创建过的,就不需要再创建

(3)加载空id数据到对应表中

空id表

0: jdbc:hive2://localhost:10000> load data local inpath '/usr/local/hadoop/module/datas/nullid'
0: jdbc:hive2://localhost:10000> into table nullidtable;

(4)测试不过滤空id(加载时间)

0: jdbc:hive2://localhost:10000> insert overwrite table jointable 
0: jdbc:hive2://localhost:10000> select n.* from nullidtable n left join bigtable o on n.id = o.id;

No rows affected (86.205 seconds)
0: jdbc:hive2://localhost:10000> 

(5)测试过滤空id (加载时间)

0: jdbc:hive2://localhost:10000> insert overwrite table jointable 
0: jdbc:hive2://localhost:10000> select n.* from (select * from nullidtable where id is not null ) n  left join bigtable o on n.id = o.id;

No rows affected (85.453 seconds)
0: jdbc:hive2://localhost:10000> 

4.2 空key转换
有时虽然某个key为空对应的数据很多,但是相应的数据不是异常数据,必须要包含在join的结果中,此时我们可以表a中key为空的字段赋一个随机的值,使得数据随机均匀地分不到不同的reducer上。

案例实操:

不随机分布空null值:
(1)设置5个reduce个数,默认是-1

0: jdbc:hive2://localhost:10000> set mapreduce.job.reduces ;
+---------------------------+--+
|            set            |
+---------------------------+--+
| mapreduce.job.reduces=-1  |
+---------------------------+--+
1 row selected (0.119 seconds)
0: jdbc:hive2://localhost:10000> set mapreduce.job.reduces=5 ;
No rows affected (0.015 seconds)

(2)JOIN两张表

0: jdbc:hive2://localhost:10000> insert overwrite table jointable
0: jdbc:hive2://localhost:10000> select n.* from nullidtable n left join bigtable b on n.id = b.id;

可以看出来,消除了数据倾斜,负载均衡reducer的资源消耗
在这里插入图片描述


5、Hive优化— MapJoin

如果不指定MapJoin或者不符合MapJoin的条件,那么Hive解析器会将Join操作转换成Common Join,即:在Reduce阶段完成join。容易发生数据倾斜。可以用MapJoin把小表全部加载到内存在map端进行join,避免reducer处理。

5.1 开启MapJoin参数设置

(1)设置自动选择Mapjoin(默认为true)

0: jdbc:hive2://localhost:10000> set hive.auto.convert.join;
+------------------------------+--+
|             set              |
+------------------------------+--+
| hive.auto.convert.join=true  |
+------------------------------+--+
1 row selected (0.517 seconds)
0: jdbc:hive2://localhost:10000> 

(2)大表小表的阈值设置(默认25M一下认为是小表):

0: jdbc:hive2://localhost:10000> set hive.mapjoin.smalltable.filesize;
+--------------------------------------------+--+
|                    set                     |
+--------------------------------------------+--+
| hive.mapjoin.smalltable.filesize=25000000  |
+--------------------------------------------+--+
1 row selected (0.019 seconds)

5.2 MapJoin工作机制

在这里插入图片描述

5.3 案例实操:

(1)开启Mapjoin功能(默认为true)

set hive.auto.convert.join = true;

(2)执行小表JOIN大表语句

hive (default)> insert overwrite table jointable
              > select b.id, b.time, b.uid, b.keyword, b.url_rank, b.click_num, b.click_url
              > from smalltable s
              > join bigtable  b
              > on s.id = b.id;


OK
b.id	b.time	b.uid	b.keyword	b.url_rank	b.click_num	b.click_url
Time taken: 61.917 seconds
hive (default)> 

(3)执行大表JOIN小表语句

hive (default)> insert overwrite table jointable
              > select b.id, b.time, b.uid, b.keyword, b.url_rank, b.click_num, b.click_url
              > from bigtable  b
              > join smalltable  s
              > on s.id = b.id;

OK
b.id	b.time	b.uid	b.keyword	b.url_rank	b.click_num	b.click_url
Time taken: 50.628 seconds
hive (default)> 


6、Hive优化 — GroupBy

默认情况下,Map阶段同一Key数据分发给一个reduce,当一个key数据过大时就倾斜了。

并不是所有的聚合操作都需要在Reduce端完成,很多聚合操作都可以先在Map端进行部分聚合,最后在Reduce端得出最终结果。

6.1 开启Map端聚合参数设置

(1)是否在Map端进行聚合,默认为True

0: jdbc:hive2://localhost:10000> set hive.map.aggr ;
+---------------------+--+
|         set         |
+---------------------+--+
| hive.map.aggr=true  |
+---------------------+--+
1 row selected (0.083 seconds)
0: jdbc:hive2://localhost:10000> 

(2)在Map端进行聚合操作的条目数目(默认:10000)

0: jdbc:hive2://localhost:10000> set hive.groupby.mapaggr.checkinterval;
+--------------------------------------------+--+
|                    set                     |
+--------------------------------------------+--+
| hive.groupby.mapaggr.checkinterval=100000  |
+--------------------------------------------+--+
1 row selected (0.019 seconds)

(3)有数据倾斜的时候进行负载均衡(默认是false)

0: jdbc:hive2://localhost:10000> set hive.groupby.skewindata;
+--------------------------------+--+
|              set               |
+--------------------------------+--+
| hive.groupby.skewindata=false  |
+--------------------------------+--+
1 row selected (0.021 seconds)

若需要的话,可以把false改成true

0: jdbc:hive2://localhost:10000> set hive.groupby.skewindata = true;

No rows affected (0.022 seconds)
0: jdbc:hive2://localhost:10000> 

当选项设定为 true,生成的查询计划会有两个MR Job。第一个MR Job中,Map的输出结果会随机分布到Reduce中,每个Reduce做部分聚合操作,并输出结果,这样处理的结果是相同的Group By Key有可能被分发到不同的Reduce中,从而达到负载均衡的目的;第二个MR Job再根据预处理的数据结果按照Group By Key分布到Reduce中(这个过程可以保证相同的Group By Key被分布到同一个Reduce中),最后完成最终的聚合操作。


7、Hive优化 —Count(Distinct) 去重统计

数据量小的时候无所谓,数据量大的情况下,由于COUNT DISTINCT操作需要用一个Reduce Task来完成,这一个Reduce需要处理的数据量太大,就会导致整个Job很难完成,一般COUNT DISTINCT使用先GROUP BY再COUNT的方式替换:

7.1 案例实操

(1)创建一张大表

hive (default)> create table bigtable(id bigint, time bigint, uid string, keyword
string, url_rank int, click_num int, click_url string) row format delimited
fields terminated by '\t';

(2)加载数据

hive (default)> load data local inpath '/opt/module/datas/bigtable' into table
 bigtable;

(3)设置5个reduce个数(默认个数是-1)

0: jdbc:hive2://localhost:10000> set mapreduce.job.reduces = 5;
No rows affected (0.03 seconds)

(4)执行去重id查询

0: jdbc:hive2://localhost:10000> select count(distinct id) from bigtable;

........................................
+--------+--+
|   c0   |
+--------+--+
| 99947  |
+--------+--+
1 row selected (160.41 seconds)

(5) 采用GROUP by去重id

0: jdbc:hive2://localhost:10000> select count(id) from (select id from bigtable group by id) a;

.....................

虽然会多用一个Job来完成,但在数据量大的情况下,这个绝对是值得的

笛卡尔积

尽量避免笛卡尔积,join的时候不加on条件,或者无效的on条件,Hive只能使用1个reducer来完成笛卡尔积。


8、Hive优化 —行列过滤

列处理:在SELECT中,只拿需要的列,如果有,尽量使用分区过滤,少用SELECT *。

行处理:在分区剪裁中,当使用外关联时,如果将副表的过滤条件写在Where后面,那么就会先全表关联,之后再过滤,比如:

8.1 案例实操:

(1)测试先关联两张表,再用where条件过滤(先执行,再过滤)

0: jdbc:hive2://localhost:10000> select s.id from bigtable b 
0: jdbc:hive2://localhost:10000> join smalltable s on s.id = b.id
0: jdbc:hive2://localhost:10000> where s.id <= 10;


.........
+-------+--+
| s.id  |
+-------+--+
+-------+--+
No rows selected (46.887 seconds)

(2) 通过子查询后,再关联表(先过滤,再执行)

0: jdbc:hive2://localhost:10000> select b.id from bigtable b
0: jdbc:hive2://localhost:10000> join (select id from smalltable where id <= 10 ) o on b.id = o.id;
........
+-------+--+
| b.id  |
+-------+--+
+-------+--+
No rows selected (41.461 seconds)


9、Hive调优 – 动态分区调整

关系型数据库中,对分区表Insert数据时候,数据库自动会根据分区字段的值,将数据插入到相应的分区中,Hive中也提供了类似的机制,即动态分区(Dynamic Partition),只不过,使用Hive的动态分区,需要进行相应的配置。

9.1 开启动态分区参数设置

(1)开启动态分区功能(默认true,开启)

0: jdbc:hive2://localhost:10000> set hive.exec.dynamic.partition;
+-----------------------------------+--+
|                set                |
+-----------------------------------+--+
| hive.exec.dynamic.partition=true  |
+-----------------------------------+--+
1 row selected (0.04 seconds)

(2)设置为非严格模式(动态分区的模式,默认strict,表示必须指定至少一个分区为静态分区,nonstrict模式表示允许所有的分区字段都可以使用动态分区。)

0: jdbc:hive2://localhost:10000> set hive.exec.dynamic.partition.mode;
+------------------------------------------+--+
|                   set                    |
+------------------------------------------+--+
| hive.exec.dynamic.partition.mode=strict  |
+------------------------------------------+--+
1 row selected (0.008 seconds)

此模式:表示必须指定至少一个分区为静态分区(默认模式:动态分区的模式)

nonstrict模式

0: jdbc:hive2://localhost:10000> set hive.exec.dynamic.partition.mode=nonstrict;

No rows affected (0.015 seconds)
0: jdbc:hive2://localhost:10000> 

(3)在所有执行MR的节点上,最大一共可以创建多少个动态分区(默认:1000)。

0: jdbc:hive2://localhost:10000> set hive.exec.max.dynamic.partitions;
+----------------------------------------+--+
|                  set                   |
+----------------------------------------+--+
| hive.exec.max.dynamic.partitions=1000  |
+----------------------------------------+--+
1 row selected (0.019 seconds)

(4)在每个执行MR的节点上,最大可以创建多少个动态分区。该参数需要根据实际的数据来设定。比如:源数据中包含了一年的数据,即day字段有365个值,那么该参数就需要设置成大于365,如果使用默认值100,则会报错。

0: jdbc:hive2://localhost:10000> set hive.exec.max.dynamic.partitions.pernode;
+-----------------------------------------------+--+
|                      set                      |
+-----------------------------------------------+--+
| hive.exec.max.dynamic.partitions.pernode=100  |
+-----------------------------------------------+--+
1 row selected (0.009 seconds)

(5)整个MR Job中,最大可以创建多少个HDFS文件(默认值:10000)。

0: jdbc:hive2://localhost:10000> set hive.exec.max.created.files;
+-------------------------------------+--+
|                 set                 |
+-------------------------------------+--+
| hive.exec.max.created.files=100000  |
+-------------------------------------+--+
1 row selected (0.028 seconds)

(6)当有空分区生成时,是否抛出异常。一般不需要设置。

0: jdbc:hive2://localhost:10000> set hive.error.on.empty.partition;
+--------------------------------------+--+
|                 set                  |
+--------------------------------------+--+
| hive.error.on.empty.partition=false  |
+--------------------------------------+--+
1 row selected (0.007 seconds)

默认值本身为false,所以不需要更改参数

9.2 案例实操

需求:将ori中的数据按照时间(如:20111230000008),插入到目标表ori_partitioned_target的相应分区中。

9.2.1、分区表

操作步骤:

(1)创建分区表:

0: jdbc:hive2://localhost:10000> create table ori_partitioned(id bigint, time bigint, uid string, keyword string,
0: jdbc:hive2://localhost:10000>  url_rank int, click_num int, click_url string) 
0: jdbc:hive2://localhost:10000> partitioned by (p_time bigint) 
0: jdbc:hive2://localhost:10000> row format delimited fields terminated by '\t';
No rows affected (0.97 seconds)

(2)加载数据到分区表中

hive (default)> load data local inpath '/usr/local/hadoop/module/datas/smalltable'
              > into table  ori_partitioned
              >  partition(p_time='20111230000010');

Loading data to table default.ori_partitioned partition (p_time=20111230000010)
Partition default.ori_partitioned{p_time=20111230000010} stats: [numFiles=1, numRows=0, totalSize=13015084, rawDataSize=0]
OK
Time taken: 5.02 seconds


hive (default)> load data local inpath '/usr/local/hadoop/module/datas/smalltable'
              > into table  ori_partitioned
              > partition(p_time='20111230000011');
              
Loading data to table default.ori_partitioned partition (p_time=20111230000011)
Partition default.ori_partitioned{p_time=20111230000011} stats: [numFiles=1, numRows=0, totalSize=13015084, rawDataSize=0]
OK
Time taken: 1.712 seconds

在HDFS文件系统查看:分区表,如图所示:
在这里插入图片描述
接下来,说一下目标表

9.2.2、 目标表

(1)创建目标分区表

hive (default)> create table ori_partitioned_target(id bigint, time bigint, uid string,
              >  keyword string, url_rank int, click_num int, click_url string) PARTITIONED BY (p_time STRING) row format delimited fields terminated by '\t';
              
OK
Time taken: 0.629 seconds

(2)设置动态分区

set hive.exec.dynamic.partition = true;
set hive.exec.dynamic.partition.mode = nonstrict;
set hive.exec.max.dynamic.partitions = 1000;
set hive.exec.max.dynamic.partitions.pernode = 100;
set hive.exec.max.created.files = 100000;
set hive.error.on.empty.partition = false;

hive (default)> insert overwrite table ori_partitioned_target partition (p_time) 
select id, time, uid, keyword, url_rank, click_num, click_url, p_time from ori_partitioned;


...................................
OK
id	time	uid	keyword	url_rank	click_num	click_url	p_time
Time taken: 48.403 seconds

若:数据集数据量过大,可以考虑分区、分桶表


10、Hive优化 - - - 数据倾斜

10.1 合理设置Map数

1)通常情况下,作业会通过input的目录产生一个或者多个map任务。
主要的决定因素有:input的文件总个数,input的文件大小,集群设置的文件块大小。

2)是不是map数越多越好?
答案是否定的。如果一个任务有很多小文件(远远小于块大小128m),则每个小文件也会被当做一个块,用一个map任务来完成,而一个map任务启动和初始化的时间远远大于逻辑处理的时间,就会造成很大的资源浪费。而且,同时可执行的map数是受限的。

3)是不是保证每个map处理接近128m的文件块,就高枕无忧了?
答案也是不一定。比如有一个127m的文件,正常会用一个map去完成,但这个文件只有一个或者两个小字段,却有几千万的记录,如果map处理的逻辑比较复杂,用一个map任务去做,肯定也比较耗时。
针对上面的问题2和3,我们需要采取两种方式来解决:即减少map数和增加map数;

10.2 小文件进行合并

在map执行前合并小文件,减少map数:CombineHiveInputFormat具有对小文件进行合并的功能(系统默认的格式)。HiveInputFormat没有对小文件合并功能。

0: jdbc:hive2://localhost:10000> set hive.input.format;
+------------------------------------------------------------------------+--+
|                                  set                                   |
+------------------------------------------------------------------------+--+
| hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat  |
+------------------------------------------------------------------------+--+
1 row selected (0.472 seconds)
0: jdbc:hive2://localhost:10000> 

(2)设置最大切片值为100个字节(默认值:256000000 )

0: jdbc:hive2://localhost:10000> set mapreduce.input.fileinputformat.split.maxsize;
+----------------------------------------------------------+--+
|                           set                            |
+----------------------------------------------------------+--+
| mapreduce.input.fileinputformat.split.maxsize=256000000  |
+----------------------------------------------------------+--+
1 row selected (0.025 seconds)


0: jdbc:hive2://localhost:10000> select count(*) from emp;
+------+--+
| _c0  |
+------+--+
| 14   |
+------+--+
1 row selected (44.846 seconds)

10.3 合理设置Reduce数
10.3.1 调整reduce个数方法一

(1)每个Reduce处理的数据量默认是256MB

0: jdbc:hive2://localhost:10000> set hive.exec.reducers.bytes.per.reducer;
+-------------------------------------------------+--+
|                       set                       |
+-------------------------------------------------+--+
| hive.exec.reducers.bytes.per.reducer=256000000  |
+-------------------------------------------------+--+
1 row selected (0.099 seconds)

(2)每个任务最大的reduce数,默认为1009

0: jdbc:hive2://localhost:10000> set hive.exec.reducers.max;
+------------------------------+--+
|             set              |
+------------------------------+--+
| hive.exec.reducers.max=1009  |
+------------------------------+--+
1 row selected (0.007 seconds)

(3)计算reducer数的公式

N=min(参数2,总输入数据量/参数1)
10.3.2 调整reduce个数方法二

在hadoop的mapred-default.xml文件中修改
设置每个job的Reduce个数

0: jdbc:hive2://localhost:10000> set set mapreduce.job.reduces;
+-----------------------------------------+--+
|                   set                   |
+-----------------------------------------+--+
| set mapreduce.job.reduces is undefined  |
+-----------------------------------------+--+
1 row selected (0.01 seconds)

0: jdbc:hive2://localhost:10000> set mapreduce.job.reduces = 15;
No rows affected (0.015 seconds)

10.3.3 reduce个数并不是越多越好

1)过多的启动和初始化reduce也会消耗时间和资源;
2)另外,有多少个reduce,就会有多少个输出文件,如果生成了很多个小文件,那么如果这些小文件作为下一个任务的输入,则也会出现小文件过多的问题;
在设置reduce个数的时候也需要考虑这两个原则:处理大数据量利用合适的reduce数;使单个reduce任务处理数据量大小要合适


11、Hive优化 — 并行执行

Hive会将一个查询转化成一个或者多个阶段。这样的阶段可以是MapReduce阶段、抽样阶段、合并阶段、limit阶段。或者Hive执行过程中可能需要的其他阶段。默认情况下,Hive一次只会执行一个阶段。不过,某个特定的job可能包含众多的阶段,而这些阶段可能并非完全互相依赖的,也就是说有些阶段是可以并行执行的,这样可能使得整个job的执行时间缩短。不过,如果有更多的阶段可以并行执行,那么job可能就越快完成。

通过设置参数hive.exec.parallel值为true,就可以开启并发执行。不过,在共享集群中,需要注意下,如果job中并行阶段增多,那么集群利用率就会增加。

set hive.exec.parallel=true;              //打开任务并行执行,默认为false,打开为true
set hive.exec.parallel.thread.number=16;  //同一个sql允许最大并行度,默认为8。

如下:

0: jdbc:hive2://localhost:10000> set hive.exec.parallel;
+---------------------------+--+
|            set            |
+---------------------------+--+
| hive.exec.parallel=false  |
+---------------------------+--+
1 row selected (0.014 seconds)

0: jdbc:hive2://localhost:10000> set hive.exec.parallel.thread.number;
+-------------------------------------+--+
|                 set                 |
+-------------------------------------+--+
| hive.exec.parallel.thread.number=8  |
+-------------------------------------+--+
1 row selected (0.016 seconds)


12、Hive优化- - - 严格模式

Hive提供了一个严格模式,可以防止用户执行那些可能意想不到的不好的影响的查询。
通过设置属性hive.mapred.mode值为默认是非严格模式nonstrict 。开启严格模式需要修改hive.mapred.mode值为strict,开启严格模式可以禁止3种类型的查询。

进入该目录下查看相应的配置文件:

[root@hadoop101 bin]# cd /usr/local/hadoop/module/hive-1.2.1/conf/
[root@hadoop101 conf]# vim hive-default.xml.template 

vim 打开配置文件,执行 : set nu 命令即会添加行号

: set nu

找到1052行

1051   <property>
1052     <name>hive.mapred.mode</name>
1053     <value>nonstrict</value>
1054     <description>
1055       The mode in which the Hive operations are being performed.
1056       In strict mode, some risky queries are not allowed to run. They include:
1057         Cartesian Product.
1058         No partition being picked up for a query.
1059         Comparing bigints and strings.
1060         Comparing bigints and doubles.
1061         Orderby without limit.
1062     </description>
1063   </property>

(1)对于分区表,除非where语句中含有分区字段过滤条件来限制范围,否则不允许执行。换句话说,就是用户不允许扫描所有分区。进行这个限制的原因是,通常分区表都拥有非常大的数据集,而且数据增加迅速。没有进行分区限制的查询可能会消耗令人不可接受的巨大资源来处理这个表。

(2)对于使用了order by语句的查询,要求必须使用limit语句。因为order by为了执行排序过程会将所有的结果数据分发到同一个Reducer中进行处理,强制要求用户增加这个LIMIT语句可以防止Reducer额外执行很长一段时间。

(3)限制笛卡尔积的查询。对关系型数据库非常了解的用户可能期望在执行JOIN查询的时候不使用ON语句而是使用where语句,这样关系数据库的执行优化器就可以高效地将WHERE语句转化成那个ON语句。不幸的是,Hive并不会执行这种优化,因此,如果表足够大,那么这个查询就会出现不可控的情况。


13、Hive优化 — JVM重用

JVM重用是Hadoop调优参数的内容,其对Hive的性能具有非常大的影响,特别是对于很难避免小文件的场景或task特别多的场景,这类场景大多数执行时间都很短

Hadoop的默认配置通常是使用派生JVM来执行map和Reduce任务的。这时JVM的启动过程可能会造成相当大的开销,尤其是执行的job包含有成百上千task任务的情况。JVM重用可以使得JVM实例在同一个job中重新使用N次。N的值可以在Hadoop的mapred-site.xml文件中进行配置。通常在10-20之间,具体多少需要根据具体业务场景测试得出。

<property>
  <name>mapreduce.job.jvm.numtasks</name>
  <value>10</value>
  <description>How many tasks to run per jvm. If set to -1, there is
  no limit. 
  </description>
</property>
0: jdbc:hive2://localhost:10000> set mapreduce.job.jvm.numtasks;
+-------------------------------+--+
|              set              |
+-------------------------------+--+
| mapreduce.job.jvm.numtasks=1  |
+-------------------------------+--+
1 row selected (0.11 seconds)

默认值是:1

这个功能的缺点是,开启JVM重用将一直占用使用到的task插槽,以便进行重用,直到任务完成后才能释放。如果某个“不平衡的”job中有某几个reduce task执行的时间要比其他Reduce task消耗的时间多的多的话,那么保留的插槽就会一直空闲着却无法被其他的job使用,直到所有的task都结束了才会释放。


14、Hive优化 — 推测执行

在分布式集群环境下,因为程序Bug(包括Hadoop本身的bug),负载不均衡或者资源分布不均等原因,会造成同一个作业的多个任务之间运行速度不一致,有些任务的运行速度可能明显慢于其他任务(比如一个作业的某个任务进度只有50%,而其他所有任务已经运行完毕),则这些任务会拖慢作业的整体执行进度。为了避免这种情况发生,Hadoop采用了推测执行(Speculative Execution)机制,它根据一定的法则推测出“拖后腿”的任务,并为这样的任务启动一个备份任务,让该任务与原始任务同时处理同一份数据,并最终选用最先成功运行完成任务的计算结果作为最终结果。

设置开启推测执行参数:Hadoop的mapred-site.xml文件中进行配置

<property>
  <name>mapreduce.map.speculative</name>
  <value>true</value>
  <description>If true, then multiple instances of some map tasks 
               may be executed in parallel.</description>
</property>

<property>
  <name>mapreduce.reduce.speculative</name>
  <value>true</value>
  <description>If true, then multiple instances of some reduce tasks 
               may be executed in parallel.</description>
</property>

不过hive本身也提供了配置项来控制reduce-side的推测执行:

<property>
    <name>hive.mapred.reduce.tasks.speculative.execution</name>
    <value>true</value>
    <description>Whether speculative execution for reducers should be turned on. </description>
  </property>

关于调优这些推测执行变量,还很难给一个具体的建议。如果用户对于运行时的偏差非常敏感的话,那么可以将这些功能关闭掉。如果用户因为输入数据量很大而需要执行长时间的map或者Reduce task的话,那么启动推测执行造成的浪费是非常巨大大。


15、Hive优化 — 执行计划(Explain)

15.1 基本语法
EXPLAIN [EXTENDED | DEPENDENCY | AUTHORIZATION] query
15.2 案例实操

(1)查看下面这条语句的执行计划

0: jdbc:hive2://localhost:10000> explain select * from emp;

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+
|                                                                                           Explain                                                                                            |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+
| STAGE DEPENDENCIES:                                                                                                                                                                          |
|   Stage-0 is a root stage                                                                                                                                                                    |
|                                                                                                                                                                                              |
| STAGE PLANS:                                                                                                                                                                                 |
|   Stage: Stage-0                                                                                                                                                                             |
|     Fetch Operator                                                                                                                                                                           |
|       limit: -1                                                                                                                                                                              |
|       Processor Tree:                                                                                                                                                                        |
|         TableScan                                                                                                                                                                            |
|           alias: emp                                                                                                                                                                         |
|           Statistics: Num rows: 2 Data size: 657 Basic stats: COMPLETE Column stats: NONE                                                                                                    |
|           Select Operator                                                                                                                                                                    |
|             expressions: empno (type: int), ename (type: string), job (type: string), mgr (type: int), hiredate (type: string), sal (type: double), comm (type: double), deptno (type: int)  |
|             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7                                                                                                        |
|             Statistics: Num rows: 2 Data size: 657 Basic stats: COMPLETE Column stats: NONE                                                                                                  |
|             ListSink                                                                                                                                                                         |
|                                                                                                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+
17 rows selected (1.697 seconds)

0: jdbc:hive2://localhost:10000> explain select deptno, avg(sal) avg_sal from emp group by deptno;

+-----------------------------------------------------------------------------------------------------+--+
|                                               Explain                                               |
+-----------------------------------------------------------------------------------------------------+--+
| STAGE DEPENDENCIES:                                                                                 |
|   Stage-1 is a root stage                                                                           |
|   Stage-0 depends on stages: Stage-1                                                                |
|                                                                                                     |
| STAGE PLANS:                                                                                        |
|   Stage: Stage-1                                                                                    |
|     Map Reduce                                                                                      |
|       Map Operator Tree:                                                                            |
|           TableScan                                                                                 |
|             alias: emp                                                                              |
|             Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE        |
|             Select Operator                                                                         |
|               expressions: deptno (type: int), sal (type: double)                                   |
|               outputColumnNames: deptno, sal                                                        |
|               Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE      |
|               Group By Operator                                                                     |
|                 aggregations: avg(sal)                                                              |
|                 keys: deptno (type: int)                                                            |
|                 mode: hash                                                                          |
|                 outputColumnNames: _col0, _col1                                                     |
|                 Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE    |
|                 Reduce Output Operator                                                              |
|                   key expressions: _col0 (type: int)                                                |
|                   sort order: +                                                                     |
|                   Map-reduce partition columns: _col0 (type: int)                                   |
|                   Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE  |
|                   value expressions: _col1 (type: struct<count:bigint,sum:double,input:double>)     |
|       Reduce Operator Tree:                                                                         |
|         Group By Operator                                                                           |
|           aggregations: avg(VALUE._col0)                                                            |
|           keys: KEY._col0 (type: int)                                                               |
|           mode: mergepartial                                                                        |
|           outputColumnNames: _col0, _col1                                                           |
|           Statistics: Num rows: 27 Data size: 328 Basic stats: COMPLETE Column stats: NONE          |
|           File Output Operator                                                                      |
|             compressed: false                                                                       |
|             Statistics: Num rows: 27 Data size: 328 Basic stats: COMPLETE Column stats: NONE        |
|             table:                                                                                  |
|                 input format: org.apache.hadoop.mapred.TextInputFormat                              |
|                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat           |
|                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe                           |
|                                                                                                     |
|   Stage: Stage-0                                                                                    |
|     Fetch Operator                                                                                  |
|       limit: -1                                                                                     |
|       Processor Tree:                                                                               |
|         ListSink                                                                                    |
|                                                                                                     |
+-----------------------------------------------------------------------------------------------------+--+
48 rows selected (0.852 seconds)

(2)查看详细执行计划

hive (default)> explain extended select * from emp;

OK
Explain
ABSTRACT SYNTAX TREE:
  
TOK_QUERY
   TOK_FROM
      TOK_TABREF
         TOK_TABNAME
            emp
   TOK_INSERT
      TOK_DESTINATION
         TOK_DIR
            TOK_TMP_FILE
      TOK_SELECT
         TOK_SELEXPR
            TOK_ALLCOLREF


STAGE DEPENDENCIES:
  Stage-0 is a root stage

STAGE PLANS:
  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        TableScan
          alias: emp
          Statistics: Num rows: 2 Data size: 657 Basic stats: COMPLETE Column stats: NONE
          GatherStats: false
          Select Operator
            expressions: empno (type: int), ename (type: string), job (type: string), mgr (type: int), hiredate (type: string), sal (type: double), comm (type: double), deptno (type: int)
            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
            Statistics: Num rows: 2 Data size: 657 Basic stats: COMPLETE Column stats: NONE
            ListSink

Time taken: 4.028 seconds, Fetched: 34 row(s)

hive (default)>  explain extended select deptno, avg(sal) avg_sal from emp group by deptno;


OK
Explain
ABSTRACT SYNTAX TREE:
  
TOK_QUERY
   TOK_FROM
      TOK_TABREF
         TOK_TABNAME
            emp
   TOK_INSERT
      TOK_DESTINATION
         TOK_DIR
            TOK_TMP_FILE
      TOK_SELECT
         TOK_SELEXPR
            TOK_TABLE_OR_COL
               deptno
         TOK_SELEXPR
            TOK_FUNCTION
               avg
               TOK_TABLE_OR_COL
                  sal
            avg_sal
      TOK_GROUPBY
         TOK_TABLE_OR_COL
            deptno


STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
          TableScan
            alias: emp
            Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE
            GatherStats: false
            Select Operator
              expressions: deptno (type: int), sal (type: double)
              outputColumnNames: deptno, sal
              Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE
              Group By Operator
                aggregations: avg(sal)
                keys: deptno (type: int)
                mode: hash
                outputColumnNames: _col0, _col1
                Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE
                Reduce Output Operator
                  key expressions: _col0 (type: int)
                  sort order: +
                  Map-reduce partition columns: _col0 (type: int)
                  Statistics: Num rows: 54 Data size: 657 Basic stats: COMPLETE Column stats: NONE
                  tag: -1
                  value expressions: _col1 (type: struct<count:bigint,sum:double,input:double>)
                  auto parallelism: false
      Path -> Alias:
        hdfs://hadoop101:9000/user/hive/warehouse/emp [emp]
      Path -> Partition:
        hdfs://hadoop101:9000/user/hive/warehouse/emp 
          Partition
            base file name: emp
            input format: org.apache.hadoop.mapred.TextInputFormat
            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
            properties:
              COLUMN_STATS_ACCURATE false
              EXTERNAL TRUE
              bucket_count -1
              columns empno,ename,job,mgr,hiredate,sal,comm,deptno
              columns.comments 
              columns.types int:string:string:int:string:double:double:int
              field.delim 	
              file.inputformat org.apache.hadoop.mapred.TextInputFormat
              file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
              location hdfs://hadoop101:9000/user/hive/warehouse/emp
              name default.emp
              numFiles 1
              numRows -1
              rawDataSize -1
              serialization.ddl struct emp { i32 empno, string ename, string job, i32 mgr, string hiredate, double sal, double comm, i32 deptno}
              serialization.format 	
              serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
              totalSize 657
              transient_lastDdlTime 1577761722
            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
          
              input format: org.apache.hadoop.mapred.TextInputFormat
              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
              properties:
                COLUMN_STATS_ACCURATE false
                EXTERNAL TRUE
                bucket_count -1
                columns empno,ename,job,mgr,hiredate,sal,comm,deptno
                columns.comments 
                columns.types int:string:string:int:string:double:double:int
                field.delim 	
                file.inputformat org.apache.hadoop.mapred.TextInputFormat
                file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                location hdfs://hadoop101:9000/user/hive/warehouse/emp
                name default.emp
                numFiles 1
                numRows -1
                rawDataSize -1
                serialization.ddl struct emp { i32 empno, string ename, string job, i32 mgr, string hiredate, double sal, double comm, i32 deptno}
                serialization.format 	
                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                totalSize 657
                transient_lastDdlTime 1577761722
              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
              name: default.emp
            name: default.emp
      Truncated Path -> Alias:
        /emp [emp]
      Needs Tagging: false
      Reduce Operator Tree:
        Group By Operator
          aggregations: avg(VALUE._col0)
          keys: KEY._col0 (type: int)
          mode: mergepartial
          outputColumnNames: _col0, _col1
          Statistics: Num rows: 27 Data size: 328 Basic stats: COMPLETE Column stats: NONE
          File Output Operator
            compressed: false
            GlobalTableId: 0
            directory: hdfs://hadoop101:9000/tmp/hive/root/adc83a33-142e-4edf-b7f9-9de8268609f5/hive_2020-01-09_14-35-23_541_6044338013261074363-1/-mr-10000/.hive-staging_hive_2020-01-09_14-35-23_541_6044338013261074363-1/-ext-10001
            NumFilesPerFileSink: 1
            Statistics: Num rows: 27 Data size: 328 Basic stats: COMPLETE Column stats: NONE
            Stats Publishing Key Prefix: hdfs://hadoop101:9000/tmp/hive/root/adc83a33-142e-4edf-b7f9-9de8268609f5/hive_2020-01-09_14-35-23_541_6044338013261074363-1/-mr-10000/.hive-staging_hive_2020-01-09_14-35-23_541_6044338013261074363-1/-ext-10001/
            table:
                input format: org.apache.hadoop.mapred.TextInputFormat
                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                properties:
                  columns _col0,_col1
                  columns.types int:double
                  escape.delim \
                  hive.serialization.extend.additional.nesting.levels true
                  serialization.format 1
                  serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
            TotalFiles: 1
            GatherStats: false
            MultiFileSpray: false

  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        ListSink

Time taken: 0.365 seconds, Fetched: 149 row(s)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值