Review Board 1.7.22


HIVE-5486 HiveServer2 should create base scratch directories at startup

Review Request #14523 - Created Oct. 8, 2013 and updated

Prasad Mujumdar
trunk
HIVE-5486
Reviewers
hive
hive-git
With impersonation enabled, the same base directory is used by all sessions/queries. For a new deployment, this directory gets created on first invocation by the user running that session. This would cause directory permission conflict for other users.
The patch is creating base scratch dirs at startup if it doesn't exist.
Added new test
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision fb3570b New Change
[20] 147 lines
[+20] [+] public class HiveConf extends Configuration {
148
    HiveConf.ConfVars.METASTOREWAREHOUSE,
148
    HiveConf.ConfVars.METASTOREWAREHOUSE,
149
    HiveConf.ConfVars.SCRATCHDIR
149
    HiveConf.ConfVars.SCRATCHDIR
150
  };
150
  };
151

    
   
151

   
152
  /**
152
  /**
153
   * The conf variables that depends on current user

   
154
   */

   
155
  public static final HiveConf.ConfVars[] userVars = {

   
156
    HiveConf.ConfVars.SCRATCHDIR,

   
157
    HiveConf.ConfVars.LOCALSCRATCHDIR,

   
158
    HiveConf.ConfVars.DOWNLOADED_RESOURCES_DIR,

   
159
    HiveConf.ConfVars.HIVEHISTORYFILELOC

   
160
  };

   
161

    
   

   
162
  /**

   
163
   * ConfVars.
153
   * ConfVars.
164
   *
154
   *
165
   * These are the default configuration properties for Hive. Each HiveConf
155
   * These are the default configuration properties for Hive. Each HiveConf
166
   * object is initialized as follows:
156
   * object is initialized as follows:
167
   *
157
   *
[+20] [20] 1125 lines
service/src/java/org/apache/hive/service/cli/CLIService.java
Revision 1a7f338 New Change
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
Revision ae7bb6b New Change
 
service/src/test/org/apache/hive/service/cli/TestEmbeddedThriftBinaryCLIService.java
Revision da325da New Change
 
service/src/test/org/apache/hive/service/cli/TestScratchDir.java
New File
 
  1. common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. service/src/java/org/apache/hive/service/cli/CLIService.java: Loading...
  3. service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java: Loading...
  4. service/src/test/org/apache/hive/service/cli/TestEmbeddedThriftBinaryCLIService.java: Loading...
  5. service/src/test/org/apache/hive/service/cli/TestScratchDir.java: Loading...