ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower (JIRA)" <>
Subject [jira] [Created] (AMBARI-11788) Views : Data storage error when try to execute some query in hive view
Date Mon, 08 Jun 2015 14:12:00 GMT
Tom Beerbower created AMBARI-11788:

             Summary: Views : Data storage error when try to execute some query in hive view
                 Key: AMBARI-11788
             Project: Ambari
          Issue Type: Bug
            Reporter: Tom Beerbower
            Assignee: Tom Beerbower
             Fix For: 2.1.0

It looks like the main issue here is that both the SavedQuery and the JobImpl entities have
fields named "dataBase". The fields in the entities get mapped to columns when the tables
are created. In MySQL (and maybe other dbs) it looks like database is a reserved word and
can not be used for a column name.
We use eclipselink dynamic JPA to generate the tables. Unfortunately, that code tests for
a table's existence by issuing the create table statement and catching any Exception. If any
exception it thrown (including SQL syntax error) it assumes that the table exists and just
continues on without propagating any error.
The exception that we see is when we try to read from or store to the data store with one
of those entities. Since the table doesn't exist, the query fails.

A fix might be to munge the column names by adding a prefix in the datastore code. There would
potentially be a backwards compatability issue, so we would have to introduce a flag to leave
existing datastore tables alone.

This message was sent by Atlassian JIRA

View raw message