You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/07/29 17:51:00 UTC

[jira] [Work logged] (HIVE-23946) Improve control flow and error handling in QTest dataset loading/unloading

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

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

                Author: ASF GitHub Bot
            Created on: 29/Jul/20 17:50
            Start Date: 29/Jul/20 17:50
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request #1331:
URL: https://github.com/apache/hive/pull/1331


   1. Remove redundant boolean return type from QTestDatasetHandler#initDataset and QTestDatasetHandler#unloadDataset (the method return true or fails).
   2. Replace AssertionError with RuntimeException to allow callers handle failures properly (AssertionErrors are not meant to be caught).
   3. Remove table to unload from src tables only after sucessfull unload (not before)
   4. Reset 'missingTables' and 'tableToUnload' variables in case of failure on loading/unloading dataset, otherwise all subsequent tests using the same dataset handler will fail.
   5. Turn 'missingTables' from class variable to instance variable; there is no reason to share this variable among instances; we need to have a way to know globally which tables are loaded but for this we have 'srcTables'.
   


----------------------------------------------------------------
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: 464217)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  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)