随笔分类 - 实战学习
摘要:hive库 yyyy-MM-dd HH:mm:ss 转换为 yyyyMM hive 2021-12-24 18:35:13 > 202112 select from_unixtime(unix_timestamp(ctime, 'yyyy-mm'), 'yyyymm') from table; 获取
阅读全文
摘要:10.24.8.5 # 切换用户 su - hive # 查看表文件 [hive@hadoop-0001 ~] hdfs dfs -
阅读全文
摘要:压缩格式的设置 set mapred.output.compression= |压缩格式|工具|算法|扩展名|是否支持分割|Hadoop编码/解码器| | | | | | | | |default||deflate|.deflate|No|org.apache.hadoop.io.compress.
阅读全文
摘要:1. 文件存储格式 TextFile SequeceFile RCFile ORCFile PARQuet 2. 说明 |格式|导入数据方式| |--|--| |textfile|将数据文件直接拷贝到hdfs上,不进行处理| |SequenceFile, RCFile, ORCFile, PARQu
阅读全文
摘要:sql语句 (SELECT * FROM t1 WHERE {subquery_where_condition}) a JOIN (SELECT * FROM t2 WHERE {subquery_where_condition}) b ON {on_condition} WHERE {where_
阅读全文
摘要:1. 什么是行式存储和列式存储? 2. 行式存储分析? 缺点: -- 行式在读取数据的时候,所查询的目标只涉及少数几项属性,但由于这些目标数据埋藏在各行数据单元中,而行单元又特别大,必须读取每一条完整的行记录,从而使得读取效率大大降低。 -- 可以加索引或给表分区进行优化。 优点: -- 1. 适合
阅读全文