美文网首页
Hive 分区字段限制

Hive 分区字段限制

作者: phycsgy | 来源:发表于2018-03-30 09:51 被阅读0次

hivesql分区字段不可以有中文,否则会报错如下:

Failed with exception MetaException(message:javax.jdo.JDOException: Exception thrown when executing query : SELECT DISTINCT 'org.apache.hadoop.hive.metastore.model.MPartition' AS NUCLEUS_TYPE,A0.CREATE_TIME,A0.LAST_ACCESS_TIME,A0.PART_NAME,A0.PART_ID FROM PARTITIONS A0 LEFT OUTER JOIN TBLS B0 ON A0.TBL_ID = B0.TBL_ID LEFT OUTER JOIN DBS C0 ON B0.DB_ID = C0.DB_ID WHERE B0.TBL_NAME = ? AND C0.NAME = ? AND A0.PART_NAME = ?
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:677)
at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:388)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:252)
at org.apache.hadoop.hive.metastore.ObjectStore.getMPartition(ObjectStore.java:1607)
at org.apache.hadoop.hive.metastore.ObjectStore.getPartitionWithAuth(ObjectStore.java:1875)
at org.apache.hadoop.hive.metastore.ObjectStoreWithBIMapping.getPartitionWithAuth(ObjectStoreWithBIMapping.java:341)
at org.apache.sentry.binding.hive.v2.metastore.AuthorizingObjectStoreV2WithBIMapping.getPartitionWithAuth(AuthorizingObjectStoreV2WithBIMapping.java:218)
at org.apache.sentry.binding.hive.v2.metastore.MTAuthorizingObjectStoreV2WithBIMapping.getPartitionWithAuth(MTAuthorizingObjectStoreV2WithBIMapping.java:231)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:114)
at com.sun.proxy.$Proxy11.getPartitionWithAuth(Unknown Source)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_partition_with_auth(HiveMetaStore.java:3311)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
at com.sun.proxy.$Proxy13.get_partition_with_auth(Unknown Source)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.hive.metastore.HiveMetaStore$MetricHMSProxy.invoke(HiveMetaStore.java:6752)
at com.sun.proxy.$Proxy13.get_partition_with_auth(Unknown Source)
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_partition_with_auth.getResult(ThriftHiveMetastore.java:9950)
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_partition_with_auth.getResult(ThriftHiveMetastore.java:9934)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:747)
at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:742)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1690)
at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:742)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
NestedThrowablesStackTrace:
java.sql.SQLException: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)

相关文章

  • Hive 分区字段限制

    hivesql分区字段不可以有中文,否则会报错如下: Failed with exception MetaExce...

  • Spark SQL写入Hive,同分区overwrite,不同分

    摘要:Spark SQL,Hive 新建hive表 新建hive表,定义好字段类型和分区字段 Spark SQL调...

  • Hive 分区/分桶

    分区/桶 Hive 分区 Hive的分区方式:由于Hive实际上是数据文件在HDFS存在的目录区分分区字段是虚拟列...

  • 分区关联时间

    Hive分区表分区字段是日期是比较常见的情形,而在实际查询时,使用分区字段作为条件查询某分区,关联的字段可...

  • Hive表

    Hive分区 描述: Hive分区根据某字段的值分区1.可以多维度分区2.分区不会影响大范围查询的执行效率3.每个...

  • hive

    1.hive分区:分区是以字段的形式在表结构中存在,通过describe table命令可以查看到字段存在,但是该...

  • Hive(二) 分区表、桶

    分区表 Hive中没有复杂的分区类型(List,Range,Hash)、各种复合分区,分区列不是表中的实际字段而是...

  • HiveSQL分区-DML

    分区 创建分区表 以性别分区;分区字段不可与表列名重复! 载入分区表数据 介绍load-data:Hive-DML...

  • 坑合集

    Flume flume细节 Hive 数据倾斜Hive优化 Hive分区表新增字段为null的bug及解决方法 S...

  • 【转载】hive使用技巧

    自动化动态分配表分区及修改hive表字段名称 1、自动化动态分配表分区 set hive.exec.dynamic...

网友评论

      本文标题:Hive 分区字段限制

      本文链接:https://www.haomeiwen.com/subject/pbpbcftx.html