大数据--hive分桶查询&&压缩方式 一、分桶及抽样查询1、分桶表创建---------------------------------------hive (db_test)> create table stu_buck(id int,name string) > clustered by(id) > into 4 buckets ...
大数据--hive文件存储格式 一、hive文件存储格式Hive支持的存储数的格式主要有:TEXTFILE、SEQUENCEFILE、ORC、PARQUET。上图左边为逻辑表,右边第一个为行式存储,第二个为列式存储。行存储的特点:查询满足条件的一整行数据的时候,列存储则需要去每个聚集的字段找到对应的每个列的值,行存储只需要找到其中一个值,其余的值都在相邻地方,所以此时行存储查询的速...
大数据--hiveDML命令操作 1、分区表管理1.1、创建分区表hive (db_test)> create table dept_partition(deptno int, dname string, loc string) > partitioned by(month string) > row format delimited fiel...
大数据--hive查询 一、全表查询和特定列查询1、全表查询:-------------------------------------------------------------------hive (db_test)> select * from dept;OKdept.deptno dept.dname dept.loc10 ACCOUNTING 170020 RESEARCH 18...
大数据--hiveDDL命令操作 1、在hive中显示当前数据库的名字和表头的信息,需要在$HIVE_HOME/conf目录下的hive-site.xml文件中添加如下内容:<property><name>hive.cli.print.header</name><value>true</value></property>&l...
大数据--mapreduce作业提交源码 MapReduce作业提交查看源码1、判断job的状态//将private Job.JobState state的值修改为DEFINE,然后执行submit()方法;public boolean waitForCompletion(boolean verbose) throws IOException, InterruptedException, ClassNotFoundE...