[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109512#comment-16109512 ] Hive QA commented on HIVE-16357: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12879795/HIVE-16357.04.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 8 failed/errored test(s), 11040 tests executed *Failed tests:* {noformat} TestPerfCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=236) org.apache.hadoop.hive.cli.TestBeeLineDriver.testCliDriver[create_merge_compressed] (batchId=241) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[partition_wise_fileformat5] (batchId=3) org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning] (batchId=168) org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3] (batchId=99) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=179) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema (batchId=179) org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=179) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/6215/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/6215/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-6215/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 8 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12879795 - PreCommit-HIVE-Build > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch, HIVE-16357.04.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedPro
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109104#comment-16109104 ] Sergio Peña commented on HIVE-16357: [~pvary] Why is the DbNotificationListener called when a table failed? I see this event is called inside the try block, and if a table fails and an exception is thrown, then this shouldn't be called, right? What am I missing? Btw, DbNotificationListener is a transactional listener, so it is only called inside the try block (no in the finally). See this line https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L1547 > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch, HIVE-16357.04.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(Hi
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109081#comment-16109081 ] Peter Vary commented on HIVE-16357: --- [~spena]: The original issue is the following with the original code: - When the table creation is failed - DBNotificationListener will be triggered with incomplete data - DBNotificationListener will throw a new exception which will mask the original from the user, making it harder to find the root problem The patch fixes it by adding the check inside the DBNotificationListener, thus avoiding throwing the second exception. Also the patch makes sure that if there is any further exceptions thrown by the DBNotificationListener, or any other Listener configured by the user, they are catched, logged and not propagated further. The rationale behind this solution is the following: - Listeners can be configured by the user, so they can have different usages. For example one listener might only collect failed table creation events. In this case the listeners should be notified on every event, and the listener should decide which event to handle, and which event to omit. - DBNotificationListener on the other hand is not interested in the failed events, so it should skip these events. - Also we thought, that listeners are configured by the users, so their code can be unstable, buggy. With this in mind, it would be good be sure that they do not affect each other. So if there is an error in one listener then the other listeners should still be notified. We might not be aware of every usage patterns of the Listeners, or might overcomplicate this Listener architecture. What do you think [~spena]? Is it worth to be prepared to these use-cases? Thanks, Peter > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch, HIVE-16357.04.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at >
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109056#comment-16109056 ] Sergio Peña commented on HIVE-16357: [~zsombor.klara] I don't understand why triggering events with failed operations cause this error. Seems the fix you did will not fix the original problem. This patch fixes an issue that shouldn't cause issues on HMS. Btw, for a future fix, I would think is better to check the status on the HiveMetaStore side itself and do not trigger the event instead of doing it on the DbNotificationListener. Even if this avoids triggering failed events, developers will still get confused about why notifyEvent() is called on the HiveMetaStore with failed transactions? > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch, HIVE-16357.04.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.ha
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16108643#comment-16108643 ] Peter Vary commented on HIVE-16357: --- Thanks for the patch [~zsombor.klara]! I like this solution. +1 pending tests. Peter > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch, HIVE-16357.04.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1482) > ... 20 more > Caused by: java.io.FileNotFoundException: File file:/.../0 does not exist > at > org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:429) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1515) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1555) > at > org.apache.hadoop.fs.C
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107188#comment-16107188 ] Hive QA commented on HIVE-16357: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12879600/HIVE-16357.03.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 11018 tests executed *Failed tests:* {noformat} TestPerfCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=235) org.apache.hadoop.hive.cli.TestBeeLineDriver.testCliDriver[materialized_view_create_rewrite] (batchId=240) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[orc_ppd_schema_evol_3a] (batchId=142) org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning] (batchId=168) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=179) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema (batchId=179) org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=179) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/6196/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/6196/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-6196/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 7 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12879600 - PreCommit-HIVE-Build > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch, > HIVE-16357.03.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16105539#comment-16105539 ] Sergio Peña commented on HIVE-16357: I'm not sure why either. I don't think we should trigger events with failed operations, but the code was already there. Perhaps we could fix this and trigger the events only when it succeeds ? > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1482) > ... 20 more > Caused by: java.io.FileNotFoundException: File file:/.../0 does not exist > at > org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:429) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1515) > at org.apache.hadoop.fs.FileSystem.lis
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16105523#comment-16105523 ] Sahil Takiar commented on HIVE-16357: - I think [~pvary] brings up a valid question. Why do we fire events even if the operation failed? [~spena] any ideas? It seems {{NotificationListener}} always checks the status of a given event before firing a notification for it. > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1482) > ... 20 more > Caused by: java.io.FileNotFoundException: File file:/.../0 does not exist > at > org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:429) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1515) >
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087560#comment-16087560 ] Hive QA commented on HIVE-16357: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12877298/HIVE-16357.02.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 10891 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[parquet_ppd_decimal] (batchId=9) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[llap_smb] (batchId=143) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=232) org.apache.hive.beeline.TestBeeLineWithArgs.testQueryProgressParallel (batchId=220) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=177) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema (batchId=177) org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=177) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/6036/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/6036/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-6036/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 7 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12877298 - PreCommit-HIVE-Build > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch, HIVE-16357.02.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInfo
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16082334#comment-16082334 ] Peter Vary commented on HIVE-16357: --- Hi [~zsombor.klara], Thanks for the patch! One nit: boolean successs - too much 's' :) 2 more interesting question: - Do we need to send out a notification about an unsuccessful event with empty list of tables? - The same change might be applied to the other events as well... [~zsombor.klara], [~mohitsabharwal]: What do you think? Thanks, Peter > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1482) > ... 20 more > Caused by: java.io.FileNotFoundException: File file:/.../0 does not exist > at > org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSyst
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050639#comment-16050639 ] Barna Zsombor Klara commented on HIVE-16357: Failing tests have been failing for 5-39 runs. > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File > file:/.../0 does not exist > at > org.apache.hive.hcatalog.listener.DbNotificationListener$FileIterator.(DbNotificationListener.java:203) > at > org.apache.hive.hcatalog.listener.DbNotificationListener.onCreateTable(DbNotificationListener.java:137) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1463) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1482) > ... 20 more > Caused by: java.io.FileNotFoundException: File file:/.../0 does not exist > at > org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:429) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1515) > at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1555) > at > org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:574) > at > org.apache.hado
[jira] [Commented] (HIVE-16357) Failed folder creation when creating a new table is reported incorrectly
[ https://issues.apache.org/jira/browse/HIVE-16357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050634#comment-16050634 ] Hive QA commented on HIVE-16357: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12873122/HIVE-16357.01.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 11 failed/errored test(s), 10831 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[orc_ppd_basic] (batchId=140) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query16] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query23] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query94] (batchId=232) org.apache.hadoop.hive.ql.parse.TestReplicationScenariosAcrossInstances.testBootstrapFunctionReplication (batchId=216) org.apache.hadoop.hive.ql.parse.TestReplicationScenariosAcrossInstances.testCreateFunctionIncrementalReplication (batchId=216) org.apache.hadoop.hive.ql.parse.TestReplicationScenariosAcrossInstances.testCreateFunctionWithFunctionBinaryJarsOnHDFS (batchId=216) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=177) org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema (batchId=177) org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=177) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5650/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5650/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5650/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 11 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12873122 - PreCommit-HIVE-Build > Failed folder creation when creating a new table is reported incorrectly > > > Key: HIVE-16357 > URL: https://issues.apache.org/jira/browse/HIVE-16357 > Project: Hive > Issue Type: Bug > Components: Metastore >Affects Versions: 2.3.0, 3.0.0 >Reporter: Barna Zsombor Klara >Assignee: Barna Zsombor Klara >Priority: Minor > Fix For: 3.0.0 > > Attachments: HIVE-16357.01.patch > > > If the directory for a Hive table could not be created, them the HMS will > throw a metaexception: > {code} > if (tblPath != null) { > if (!wh.isDir(tblPath)) { > if (!wh.mkdirs(tblPath, true)) { > throw new MetaException(tblPath > + " is not a directory or unable to create one"); > } > madeDir = true; > } > } > {code} > However in the finally block we always try to call the > DbNotificationListener, which in turn will also throw an exception because > the directory is missing, overwriting the initial exception with a > FileNotFoundException. > Actual stacktrace seen by the caller: > {code} > 2017-04-03T05:58:00,128 ERROR [pool-7-thread-2] metastore.RetryingHMSHandler: > MetaException(message:java.lang.RuntimeException: > java.io.FileNotFoundException: File file:/.../0 does not exist) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:6074) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1496) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) > at com.sun.proxy.$Proxy28.create_table_with_environment_context(Unknown > Source) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11125) > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_table_with_environment_context.getResult(ThriftHiveMetastore.java:11109) > at org.apache.t