[ 
https://issues.apache.org/jira/browse/HIVE-22649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996885#comment-16996885
 ] 

Denys Kuzmenko edited comment on HIVE-22649 at 12/15/19 10:31 PM:
------------------------------------------------------------------

[~jdere]: could this be caused by 
[HIVE-22599|https://issues.apache.org/jira/browse/HIVE-22599] ?

I made a quick fix for now, however we should try to find the actual root 
cause; Is it possible that some Query results cache test does this? 
{code}
  @BeforeClass
  public static void init(){
    // something changed scratch dir permissions, so test can't execute
    HiveConf hiveConf = new HiveConf();
    String scratchDir = hiveConf.get(HiveConf.ConfVars.SCRATCHDIR.varname);
    File file = new File(scratchDir);
    if (file.exists()) {
      file.setWritable(true, false);
    }
  }
{code}


was (Author: dkuzmenko):
[~jdere]: could this be caused by 
[HIVE-22599|https://issues.apache.org/jira/browse/HIVE-22599] ?

I made a quick fix for now, however we should try to find the actual root cause;
{code}
  @BeforeClass
  public static void init(){
    // something changed scratch dir permissions, so test can't execute
    HiveConf hiveConf = new HiveConf();
    String scratchDir = hiveConf.get(HiveConf.ConfVars.SCRATCHDIR.varname);
    File file = new File(scratchDir);
    if (file.exists()) {
      file.setWritable(true, false);
    }
  }
{code}

> Fix TestHiveCli: scratchdir should be writable
> ----------------------------------------------
>
>                 Key: HIVE-22649
>                 URL: https://issues.apache.org/jira/browse/HIVE-22649
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Denys Kuzmenko
>            Assignee: Denys Kuzmenko
>            Priority: Major
>         Attachments: HIVE-22649.1.patch
>
>
> Error applying authorization policy on hive configuration: The dir: /tmp/hive 
> on HDFS should be writable. Current permissions are: rwxr-xr-x
> SessionState.java
> {code}
>   private Path createRootHDFSDir(HiveConf conf) throws IOException {
>     Path rootHDFSDirPath = new Path(HiveConf.getVar(conf, 
> HiveConf.ConfVars.SCRATCHDIR));
>     *Utilities.ensurePathIsWritable(rootHDFSDirPath, conf);*
>     return rootHDFSDirPath;
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to