导出到hdfs:hive执行
INSERT OVERWRITE DIRECTORY '/test/hdfs_dir' ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS ORC SELECT * FROM hive_table;
HDFS导出到本地:shell执行
hdfs dfs -get /test/hdfs_dis/file_name /linux_dir/xxx
本地文件上传到HDFS:shell执行
hdfs dfs -put /linux_dir/xxx/file_name /hdfs/path
HDFS文件导入到Hive表:hive执行
LOAD DATA INPATH '/hdfs/path/file_name' INTO TABLE table_name;
设置分区最大数量:
SET hive.exec.max.dynamic.partitions.pernode=200;
SET hive.exec.max.dynamic.partitions = 200;