hadoop, hive common commands
Hadoop common commands
hadoop fs -ls hdfs://路径
hadoop fs -rm -r -skipTrash hdfs://文件全路径
hive common commands
-------
hive 建表语句
-------
CREATE TABLE 表名(
字段名1 bigint,
字段名2 string,
...
字段名n bigint
) PARTITIONED by (分区字段名称 bigint) row format delimited fields terminated by '分隔符' stored as textfile;
ALTER TABLE 表名 drop PARTITION (分区字段=分区值)
alter table 表名 add partition (分区字段=分区值) location 'hdfs://?/分区字段=分区值';
show partitions 表名;
MSCK REPAIR TABLE 表名;
desc formatted 表名 partition(分区字段=分区值);