hive 細節

  • 如果reduce個數過少(配置文件設置,而非自動生成),可能會出現錯誤:013-01-16 18:04:49,311 FATAL org.apache.hadoop.mapred.Child: Error running child : java.lang.OutOfMemoryError: allocLargeObjectOrArray

  • hive能自動識別join是否可以轉化位mapjion。如果非要手工指定的話,可能會出現錯誤:
    2013-01-16 03:38:48     Starting to launch local task to process map join;      maximum memory = 1048576000
    2013-01-16 03:38:51     Processing rows:        200000  Hashtable size: 199999  Memory usage:   90039472        rate:   0.086
    ...............................
    2013-01-16 03:39:07     Processing rows:        2300000 Hashtable size: 2299999 Memory usage:   961646184       rate:   0.917
      

  • 如果設置hive空值默認爲'-1',那麼在select one 時選出的會將'-1'顯示爲null。select * 會顯示‘-1’



  • 空值顯示爲NULL,而非'NULL'

    CASE sms_send_count WHEN NULL THEN -1 ELSE 0  END,CASE sms_bill_count WHEN NULL THEN -1 ELSE 0  END,CASE sms_people_count WHEN NULL THEN -1 ELSE 0  END,

    FAILED: Error in semantic analysis: Line 4:25 Argument type mismatch ''NULL'': The expressions after WHEN should have the same type with that after CASE: "bigint" is expected but "string" is found

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章