hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-23946) Improve control flow and error handling in QTest dataset loading/unloading
Date Mon, 03 Aug 2020 15:54:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-23946?focusedWorklogId=465769&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-465769
]

ASF GitHub Bot logged work on HIVE-23946:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Aug/20 15:53
            Start Date: 03/Aug/20 15:53
    Worklog Time Spent: 10m 
      Work Description: zabetak commented on a change in pull request #1331:
URL: https://github.com/apache/hive/pull/1331#discussion_r464503259



##########
File path: itests/util/src/main/java/org/apache/hadoop/hive/ql/dataset/QTestDatasetHandler.java
##########
@@ -52,8 +51,8 @@
 
   private File datasetDir;
   private static Set<String> srcTables;
-  private static Set<String> missingTables = new HashSet<>();

Review comment:
       Indeed there is a check-then-act race condition here. I was hoping to fix this without
making `missingTables` and `tablesToUnload` static but looking at the code that I committed
it seems that I screwed up something while I was rebasing :D I will address this in the following
commits (hopefully :crossed_fingers: ). Thanks for catching this!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 465769)
    Time Spent: 40m  (was: 0.5h)

> Improve control flow and error handling in QTest dataset loading/unloading
> --------------------------------------------------------------------------
>
>                 Key: HIVE-23946
>                 URL: https://issues.apache.org/jira/browse/HIVE-23946
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This issue focuses mainly on the following methods:
> [QTestDatasetHandler#initDataset| https://github.com/apache/hive/blob/6fbd54c0af60276d49b237defb550938c9c32610/itests/util/src/main/java/org/apache/hadoop/hive/ql/dataset/QTestDatasetHandler.java#L76]
> [QTestDatasetHandler#unloadDataset|https://github.com/apache/hive/blob/6fbd54c0af60276d49b237defb550938c9c32610/itests/util/src/main/java/org/apache/hadoop/hive/ql/dataset/QTestDatasetHandler.java#L95]
> related to QTest dataset loading and unloading.
> The boolean return type in these methods is redundant since they either fail or return
true (they never return false).
> The methods should throw an Exception instead of an AssertionError to indicate failure.
This allows code higher up the stack to perform proper recovery and properly report the failure.
At the moment, if an AssertionError is raised from these methods dependent code (eg., [CoreCliDriver|https://github.com/apache/hive/blob/6fbd54c0af60276d49b237defb550938c9c32610/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CoreCliDriver.java#L188])
fails to notice that the query has failed. 
> In case of failure in loading/unloading the environment (instance and class variables)
is not properly cleaned leading to failures in all subsequent tests.



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

Mime
View raw message