[ https://issues.apache.org/jira/browse/HIVE-18625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374518#comment-16374518 ]
Sahil Takiar commented on HIVE-18625: ------------------------------------- Thanks for reporting this [~kgyrtkirk]. [~asherman] * Looks like {{TestJdbcWithMiniHS2#testHttpHeaderSize}} failing to create a directory below: {code} /home/hiveptest/199.223.235.119-hiveptest-0/apache-github-source-source/itests/hive-unit/target/tmp/local_base/scratch/%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*/2c2264ff-6ff4-4820-9a6f-e81417fef83f {code} * My guess is that it fails due to how long the file name is, or because of all the weird characters? * This test was succeeding before, so is this check always necessary? * Not sure if {{TestJdbcWithMiniHS2#testConnectionSchemaAPIs}} is failing due to this patch too? > SessionState Not Checking For Directory Creation Result > ------------------------------------------------------- > > Key: HIVE-18625 > URL: https://issues.apache.org/jira/browse/HIVE-18625 > Project: Hive > Issue Type: Improvement > Components: HiveServer2 > Affects Versions: 3.0.0, 2.4.0, 2.3.2 > Reporter: BELUGA BEHR > Assignee: Andrew Sherman > Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-18625.1.patch, HIVE-18625.2.patch > > > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java#L773 > {code:java} > private static void createPath(HiveConf conf, Path path, String permission, > boolean isLocal, > boolean isCleanUp) throws IOException { > FsPermission fsPermission = new FsPermission(permission); > FileSystem fs; > if (isLocal) { > fs = FileSystem.getLocal(conf); > } else { > fs = path.getFileSystem(conf); > } > if (!fs.exists(path)) { > fs.mkdirs(path, fsPermission); > String dirType = isLocal ? "local" : "HDFS"; > LOG.info("Created " + dirType + " directory: " + path.toString()); > } > if (isCleanUp) { > fs.deleteOnExit(path); > } > } > {code} > The method {{fs.mkdirs(path, fsPermission)}} returns a boolean value > indicating if the directory creation was successful or not. Hive ignores > this return value and therefore could be acting on a directory that doesn't > exist. > Please capture the result, check it, and throw an Exception if it failed -- This message was sent by Atlassian JIRA (v7.6.3#76005)