常用命令
hadoop fs -ls /
hadoop fs -ls /user
hadoop fs -ls /kn1
hadoop fs -ls /user/lijicong/warehouse/kn1/kn1_tf_pictures_cut_title_dt
-- 查看数据库所在路径
describe database database_name;
--获取table的真实hdfs路径
desc formatted my_table;
--获取partition的真实hdfs路径
desc formatted my_table(pt='20140804');
Hive查看表所有分区
show partitions t_test_order;
hadoop查找文件
hadoop fs -lsr / | grep foods
hdfs dfs -put /home/lijicong/tmp/ods_traf_toutiao_search_20161018.txt /user/lijicong/warehouse/ods/ods_traf_toutiao_search/dt=20161018
hdfs dfs -put /home/lijicong/tmp/ods_traf_toutiao_search_20161018.txt /user/lijicong/warehouse/ods/ods_traf_toutiao_search/dt=20161018
hdfs dfs -put /home/lijicong/tmp/ods_traf_toutiao_search_20161018.txt /user/lijicong/warehouse/ods/ods_traf_toutiao_search/dt=20161018/001
alter table test.ods_traf_toutiao_search drop if exists partition (dt='20161018');
alter table test.ods_traf_toutiao_search add partition (dt='20161018') location '/ods/ods_traf_toutiao_search/dt=20161018';
...约 344 字大约 1 分钟
