You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Bing Li <sm...@gmail.com> on 2011/12/15 16:12:55 UTC

A bug or work as design ? - MetaStore, createDatabase()

Hi, Devs
When I ran Hive UT with the candidate build of Hive-0.8.0, I found that
TestEmbeddedHiveMetaStore and TestRemoteHiveMetaStore always FAILED with
ROOT account while PASS with NON-ROOT account.

I took a look at the source code of TestHiveMetaStore, and found that

      fs.mkdirs(
          new Path(HiveConf.getVar(hiveConf,
HiveConf.ConfVars.METASTOREWAREHOUSE) + "/test"),
          new FsPermission((short) 0));
....
 client.createDatabase(db);   // always create the db with ROOT


I tried the similar scenario in Linux OS, executed the following commands:
1. mkdir <user_home>/try
2. sudo chmod 000 <user_home>/try
3. mkdir <user_home>/try/again

If the user is root, directory <user_home>/try/again could be executed
successfully; if the user is a non-root account, it always reports
Permission Deny, even if "ls" command.

If it has the same rule in HDFS, there should be a limitation of HIVE UT,
is it?


Thanks,
- Bing