cdmikechen opened a new issue #757: spark-hoodie-bundle using hive-serde to 
sync hive table(Hive2.3.5)
URL: https://github.com/apache/incubator-hudi/issues/757
 
 
   When setting `hoodie.datasource.hive_sync.enable` to true, I found we need 
to set `hive.metastore.filter.hook` from 
`org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl` to 
`com.uber.hoodie.org.apache.hadoop_hive.metastore.DefaultMetaStoreFilterHookImpl`
 in hive-site.xml or hive config (hive 2.3.5 and spark 2.3.3). Otherwise maybe 
hoodie report error like 
https://github.com/apache/incubator-hudi/issues/533#issue-391028284
   ```xml
   <property>
       <name>hive.metastore.filter.hook</name>
      <!-- 
<value>org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl</value>
      -->
      
<value>com.uber.hoodie.org.apache.hadoop_hive.metastore.DefaultMetaStoreFilterHookImpl</value>
       <description>Metastore hook class for filtering the metadata read 
results. If hive.security.authorization.manageris set to instance of 
HiveAuthorizerFactory, then this value is ignored.</description>
     </property>
   ```
   
   
   Another thing, we maybe need to add `hive-serde`. There is a 
`serde2.thrift.Type` class in `hive-serde` needed when hoodie is connecting 
hive to create or replace hive table.
   ```xml
   <relocation>
       <pattern>org.apache.hadoop.hive.serde2.</pattern>
        
<shadedPattern>com.uber.hoodie.org.apache.hadoop_hive.serde2.</shadedPattern>
   </relocation>
   ```
   ```xml
   <dependency>
         <groupId>${hive.groupid}</groupId>
         <artifactId>hive-serde</artifactId>
         <version>${hive.version}</version>
         <scope>compile</scope>
   </dependency>
   ```
   
   If complete two things, spark can sync hoodie table to hive successfully. 
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to