[ 
https://issues.apache.org/jira/browse/HIVE-2928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250981#comment-13250981
 ] 

Carl Steinbach commented on HIVE-2928:
--------------------------------------

We currently have JDO schema validation disabled by default since it affects 
performance. However, if modifying Hive's package.jdo to work with Oracle means 
that we're forfeiting this feature, I'd at least like to know that up front.

Also, there was an exchange a couple years ago on the hive-user list where John 
made an interesting suggestion:

http://mail-archives.apache.org/mod_mbox/hadoop-hive-user/201006.mbox/%3cbd1fe08f-5edf-4d90-a741-8b703cd06...@facebook.com%3E

bq. Another option is to precreate your schema in Oracle and then tell JDO not 
to try to create/update
it automatically.

Would you mind trying this out to see if it works? If it does then I think that 
might be the optimal solution for now.

                
> Support for Oracle-backed Hive-Metastore ("longvarchar" to "clob" in 
> package.jdo)
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-2928
>                 URL: https://issues.apache.org/jira/browse/HIVE-2928
>             Project: Hive
>          Issue Type: New Feature
>          Components: Metastore
>    Affects Versions: 0.9.0
>            Reporter: Mithun Radhakrishnan
>         Attachments: HIVE-2928.patch
>
>
> I'm trying to get the Hive-Metastore to work when backed by an Oracle 
> backend. There's a change to hive's package.jdo that I'd like advice/comments 
> on.
> One sticking point on working with Oracle has been the TBLS table (MTable) 
> and its 2 LONGVARCHAR properties (VIEW_ORIGINAL_TEXT and VIEW_EXPANDED_TEXT). 
> Oracle doesn't support more than one LONGVARCHAR property per table (for 
> reason of legacy), and prefers that one use CLOBs instead. If one switches to 
> CLOB properties, with no modification to hive's package.jdo, one sees the 
> following exception:
> <quote>
> Incompatible data type for column TBLS.VIEW_EXPANDED_TEXT : was CLOB
> (datastore), but type expected was LONGVARCHAR (metadata). Please check that
> the type in the datastore and the type specified in the MetaData are
> consistent.
> org.datanucleus.store.rdbms.exceptions.IncompatibleDataTypeException:
> Incompatible data type for column TBLS.VIEW_EXPANDED_TEXT : was CLOB
> (datastore), but type expected was LONGVARCHAR (metadata). Please check that
> the type in the datastore and the type specified in the MetaData are
> consistent.
>         at
> org.datanucleus.store.rdbms.table.ColumnImpl.validate(ColumnImpl.java:521)
>         at
> org.datanucleus.store.rdbms.table.TableImpl.validateColumns(TableImpl.java:2
> </quote>
> But if one rebuilds Hive with the package.jdo changed to use CLOBs instead of 
> LONGVARCHARs, things look promising:
> 1. The exception no longer occurs. Things seem to work with Oracle. (I've yet 
> to scale-test.)
> 2. These modified hive-libraries work as is with pre-existing mysql 
> metastores. Migrating data isn't a worry.
> 3. The unit-tests seem to run through. 
> Would there be opposition to changing the package.jdo's LONGVARCHAR 
> references to CLOB, if this works with mysql and with Oracle? 
> Mithun
> P.S. I also have a working hive-schema-0.9.0-oracle.sql script that I'm 
> testing, for the related issue of creating the required tables in Oracle.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to