hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pankit Thapar (JIRA)" <>
Subject [jira] [Created] (HIVE-7251) Fix StorageDescriptor usage in unit tests
Date Wed, 18 Jun 2014 17:46:26 GMT
Pankit Thapar created HIVE-7251:

             Summary: Fix StorageDescriptor usage in unit tests 
                 Key: HIVE-7251
             Project: Hive
          Issue Type: Bug
          Components: Tests
    Affects Versions: 0.13.1
            Reporter: Pankit Thapar
            Priority: Minor

Current Approach : 
StorageDescriptor class is used to describe parameters like InputFormat, Outputformat, SerDeInfo,
etc. for a hive table.
Some of the class variables like InputFormat, OutputFormat, SerDeInfo.serializationLib, etc.
are required fields when
creating a storage descriptor object.
For example : createTable command in the metaStoreClient creates the table with the default
values of such variables defined in HiveConf or hive-default.xml
But in unit tests, table is created in a slightly different way, that these values need to
be set explicitly.
Thus, when creating tables in tests, required fieldes of StorageDescriptor object need to
be set.

Issue with current approach :
>From some of  the current usages of this class in unit tests, I noticed that
when any one of the test cases tried to clean up the database and found a table created by
any of the previously executed test cases,
the clean up process tries to fetch the Table object and performs the sanity checks which
include checking for required fields like InputFormat, OutputFormat, SerDeInfo.serializationLib
of the table. The sanity checks fail which results in failure of the test case.

Fix :
In unit-tests, StorageDescriptor object should be created with the Fields that are sanity
checked when trying to fetch the table.

NOTE : This fix fixes 6 test cases in itests/hive-unit/

This message was sent by Atlassian JIRA

View raw message