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

liyang commented on KYLIN-1765:
-------------------------------

Thanks for providing the diagnosis log. The error occurs when building 
dictionary on HERMES_SITE_DIM.CID. Hive meta thinks the columns is *integer*, 
however I guess some values are too big and were read out as *long*, thus this 
exception.

Suggest check the column type of HERMES_SITE_DIM.CID in hive, and change to 
long if it's not. Then refresh the hive table in Kylin and build again.

{code}
2016-06-05 20:02:48,231 DEBUG [pool-6-thread-10] dict.DictionaryGenerator:105 : 
Building dictionary object 
{"uuid":"2e669a42-a514-4f83-b397-b422db5553ba","version":"1.5.2","input":{"path":"s3://hcombixe/data/HWW/HCOM_DM/HERMES_SITE_DIM","size":0,"last_modified_time":0},"cardinality":0,"last_modified":0,"source_table":"HCOM_DM.HERMES_SITE_DIM","source_column":"CID","source_column_index":0,"data_type":"integer","dictionary_class":null}
2016-06-05 20:02:48,969 ERROR [pool-6-thread-10] 
execution.AbstractExecutable:62 : error execute 
HadoopShellExecutable{id=06f7d600-22b9-4555-86a8-904ef681a2ed-02, name=Build 
Dimension Dictionary, state=RUNNING}
java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast 
to org.apache.hadoop.io.IntWritable
        at 
org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableIntObjectInspector.getPrimitiveJavaObject(WritableIntObjectInspector.java:46)
        at 
org.apache.hive.hcatalog.data.HCatRecordSerDe.serializePrimitiveField(HCatRecordSerDe.java:271)
        at 
org.apache.hive.hcatalog.data.HCatRecordSerDe.serializeField(HCatRecordSerDe.java:192)
        at 
org.apache.hive.hcatalog.data.LazyHCatRecord.get(LazyHCatRecord.java:53)
        at 
org.apache.hive.hcatalog.data.LazyHCatRecord.get(LazyHCatRecord.java:97)
        at 
org.apache.hive.hcatalog.mapreduce.HCatRecordReader.nextKeyValue(HCatRecordReader.java:204)
        at 
org.apache.hive.hcatalog.data.transfer.impl.HCatInputFormatReader$HCatRecordItr.hasNext(HCatInputFormatReader.java:107)
        at 
org.apache.kylin.source.hive.HiveTableReader.next(HiveTableReader.java:93)
{code}

> Build Dimension dictionary issue: java.lang.ClassCastException: 
> org.apache.hadoop.io.LongWritable cannot be cast to 
> org.apache.hadoop.io.IntWritable
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-1765
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1765
>             Project: Kylin
>          Issue Type: Bug
>          Components: Job Engine
>            Reporter: Oscar Mateos
>            Assignee: Dong Li
>         Attachments: job_2016_06_06_06_38_00.zip
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to