gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nishadi Kirielle (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-512) Fail at the time of error logging if KeyClass in gora-hbase-mapping is not the same as the one in the data bean
Date Thu, 01 Jun 2017 18:17:05 GMT

    [ https://issues.apache.org/jira/browse/GORA-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033430#comment-16033430

Nishadi Kirielle commented on GORA-512:

Hi all,
The following fix is done to fail the execution if the gora-hbase-mapping file does not include
keyClass and name defined in the data bean. [1]
I tried to create a test case to capture the erroneous scenario. In order to test this scenario,
gora-hbase-mapping keyClass and name should be mismatched with the data bean. Currently TestHBaseStore's
data beans and gora-hbase-mapping files are matching as to run the existing test cases. As
we do not have the ability to load two separate gora-hbase-mapping files to support normal
test execution and erroneous test execution, will that be possible to add this test case to
the current existing test suite, TestHBaseStore ?

[1]. https://github.com/nishadi/gora/commit/45cca68b98fe8dc68d74d671e29341d469831f88 

> Fail at the time of error logging if KeyClass in gora-hbase-mapping is not the same as
the one in the data bean
> ---------------------------------------------------------------------------------------------------------------
>                 Key: GORA-512
>                 URL: https://issues.apache.org/jira/browse/GORA-512
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: gora-hbase
>            Reporter: Nishadi Kirielle
>            Priority: Minor
> In the current implementation, when reading the HBase mapping file, if the HBase mapping
file does not have a matching key class and name to the data bean, it only logs that information.[1]
It does not fail at the time of detecting it. It fails only at the time of building the mapper
[2] when it detects the table name is null. It will be better if it can fail at the time of
detecting that mapping file is missing the corresponding class. 
> [1]. https://github.com/apache/gora/blob/master/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java#L797
> [2]. https://github.com/apache/gora/blob/master/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java#L815

This message was sent by Atlassian JIRA

View raw message