1. 下载Hive http://mirror.bit.edu.cn/apache/hive/ 2. 解压配置 解压后进入conf目录 cp hive-default.xml.template hive-site.xml 编辑hive-site.xml,增加下面内容,mys...
Continue readinghdfs更改权限:sudo -u hdfs hadoop fs -chown carpo:hdfs /apps/carpo show databases; use tpcds_orc; show tables; drop table tpcds_orc; create ta...
Continue reading执行Hive语句的几种方式 第一种:进入hive命令行 直接执行语句 第二种:在命令行下执行文件中的Hive语句 source 文件路径 第三种:在Linux下hive -e "hive语句" 第四种:在Linux下hive -f 文件路径 将Hive的...
Continue reading问题 有一个SQL语句要在hive里执行但是hive不支持intersect,所以要使用其他方法代替 思路 intersect就是取交集,可以使用inner join进行连接然后取其中一列并去重 原SQL select s_store_name ,sum(s...
Continue readingHive的存储格式 textfile hive的默认存储格式 存储方式:行存储 磁盘开销大 数据解析开销大 压缩的text文件 hive无法进行合并和拆分 SequenceFile 二进制文件,以<key,value>的形式序列化到文件中 存储方式:行存...
Continue reading