新建hadoop及hive账户

1.创建hadoop组的用户
useradd -d /home/chaobo -m chaobo -g hadoop
hadoop fs -mkdir /download/hadoop/tmp/hadoop/mapred/staging/chaobo
hadoop fs -chown -R chaobo:hadoop /download/hadoop/tmp/hadoop/mapred/staging/chaobo


hadoop fs -mkdir /tmp/hive-chaobo
hadoop fs -chown -R chaobo:hadoop /tmp/hive-chaobo
hadoop fs -mkdir /user/chaobo
hadoop fs -chown -R chaobo:hadoop /user/chaobo
mkdir /download/chaobo
chown chaobo:hadoop /download/chaobo
2.创建hive使用权限(hive权限控制参考网上贴文http://blog.csdn.net/dyllove98/article/details/9149091)
用chaobo用户新建hive库
create database gameCenter_zihui_db;
hadoop fs -chown zihui:hadoop /user/hive/warehouse/gamecenter_zihui_db.db

你可能感兴趣的:(hadoop)