365
技術社區[雲棲]
MaxCompute常見錯誤匯總(更新ing)
從今天開始,小編會為大家陸續解讀MaxCompute常見問題,幫助大家快速上手MaxCompute,玩轉大數據計算平台,同時,也歡迎大家一起補充。
十大常見錯誤碼
No1.FAILED: ODPS-0130131
報錯信息:FAILED: ODPS-0130131:[1,15] Table not found - table test0517.dual cannot be resolved
用戶場景:用虛擬表計算,select sum(1+1) from dual
問題分析:表不存在,MaxCompute分布式係統不支持dual虛擬表。
解決方案:可以自建dual表。
No2.FAILED: ODPS-0130071
報錯信息:FAILED: ODPS-0130071:Semantic analysis exception - Cannot insert into target table because column
number/types are different : line 1:23 ''20170903'': Table insclause-0 has 6 columns, but query has 7 columns.
用戶場景:向新表導入數據,insert overwrite table demo_target_0722 PARTITION ( dt = '20170903' ) select a,b,c,d,e,f,g from demo_src_0722;
問題分析:向目標表插入數據時,源表和目標表的列數量或類型不匹配。
解決方案:檢查源表字段,增加相應字段,或者用create table demo_0722 as
報錯信息:FAILED: ODPS-0130071:Semantic analysis exception - Project: a not found.
用戶場景:創建表,create table if not exists a.sale_detail(
shop_name string,
customer_id string,
total_price double)
partitioned by (sale_date string,region string);
問題分析:Project不存在。
解決方案:輸入正確的Project名稱,可以使用大數據開發套件查看所有Project 名稱。
No3.FAILED: ODPS-0110061
錯誤信息:FAILED: ODPS-0110061: Failed to run ddltask - AlreadyExistsException(message:Partition already exists, existed values: ["2017-09-05"])
用戶場景:並發添加分區,ALTER TABLE demo.d1 ADD PARTITION (pt='2017-09-05')
問題分析:分區2017-09-05已存在,目前MaxCompute對操作的表沒有加鎖,這個錯誤是由Meta產生競爭導致,即向同一個分區同時多次操作讀寫操作容易產生此類錯誤。
解決方案:在MaxCompute還沒有鎖機製的情況下,先不要同時對一個表做操作。
錯誤信息:FAILED: ODPS-0110061: Failed to run ddltask - SimpleLock conflict failure, add partition is already on-going : demo.d1:pt=20170904
用戶場景:並發添加分區,alter table demo.d1 add if not exists partition (pt='20170904')
問題分析:分區20170904已存在,當用戶批量添加統一分區時,會出現此錯誤。MaxCompute僅會執行接收到的第一個添加分區命令,並忽略後續請求。
解決方案:取消批量重複任務執行。
No4.FAILED: ODPS-0010000
錯誤信息:ODPS-0010000:System internal error - fuxi job failed, caused by: WorkerRestart errCode:11,errMsg:WorkerCrashedWithCorefile
用戶場景:寫SQL。
問題分析:內部錯誤錯誤導致jvm coredump。
解決方案:通常由java udf的實現問題引起,如果排除udf問題,請提交運行日誌到工單提問。
錯誤信息:ODPS-0010000:System internal error - translate plan failed
問題分析:一般是在做plan時出錯了。
解決方案:請提交運行日誌到工單提問。
錯誤信息:ODPS-0010000:System internal error - fuxi JobMaster error
錯誤原因:
fuxi JobMaster error是job master重啟引起,可能是運行主機或者網絡超時響應的原因,也可能是語句中union all太多,job master內存超過閥值被kill掉了。
解決方案:
如果是語句中union all太多,則最好把查詢語句分成多個部分跑。
錯誤信息:ODPS-0010000:System internal error - codegen failed
問題分析:如果遇到 errors.NotImplemented: Function wsfunc has not been implemented yet
則:注冊函數的時候用的包路徑一定要是自己實現UDF類的完整包路徑。
如果遇到row_number() over(partition by seller_user_id order by seller_user_id,offer_id,recom_score desc)=1
則:where裏不能用window function
如果用戶用到了distribute by sort by,則distribute by sort by的列一定要在select裏,這個是已知的問題
distribute by 不要和join一起用,因為distribute by後,再join,distribute by是多餘的,因為join 還是會按join key reshuffle的
如果是使用到分詞函數的,應該是分詞自定義函數名錯誤,不能自定義分詞函數名,且分詞函數隻能由owner覆蓋。
錯誤信息:ODPS-0010000:System internal error - PANGU_FILE_NOT_FOUND The file does not exist When PanguOpen4Read pangu
問題分析:讀寫衝突,你在讀的時候有別人在寫,連續兩個任務在讀,第一個讀時,發現小作業太多主動開啟merge,第二個作業再讀時,就會報這個錯。
解決方案:請檢查衝突節點的依賴關係或者協調好讀寫關係,第二種情況隻需要重試即可。
錯誤信息:FAILED: ODPS-0010000:System internal error - Fail to close dispatch writer
問題分析:寫pangu文件最後會做句柄的close,此時,close會將緩存中的數據Flush到分布式磁盤。close失敗常見的問題就是quota不足,此時會報:Fail to close dispatch writer。
錯誤信息:FAILED: ODPS-0130151: Too many instance count(112), exceeds threshold limit 100.
解決方案:Fail to close dispatch writer報錯,首先需要排除quota問題,在quota足夠的情況下需要提供具體的Instance後台分析日誌,比如網絡超時也會導致close失敗。因為中間產出的數據也會占用Quota,所以申請quota時需要考慮中間產出的文件大小。
No5.FAILED: ODPS-0130151
錯誤信息:FAILED: ODPS-0130151: Too many instance count(112), exceeds threshold limit 100.
用戶場景:掃描十年數據,select * from demo.a where pt>2007 and pt<2017 。
問題分析:掃描過多分區被係統限製,比如默認split size為256M,係統限製100,就不能超過2.5g。
解決方案:不要掃描過多分區或調大split size。
錯誤信息:FAILED: ODPS-0130151:Illegal data type - partition column 'time' type 'datetime' is not allowed.
用戶場景:創建表,CREATE TABLE aa (type BIGINT COMMENT 'a') PARTITIONED BY (time DATETIME COMMENT 'b') LIFECYCLE 100000
問題分析:type,time 是係統預留字段。
解決方案:不要使用係統保留字段,改為s_type,s_time。參考:https://help.aliyun.com/document_detail/27872.html
No6.FAILED: ODPS-0140181
錯誤信息:FAILED: ODPS-0140181:Sql plan exception - sql cost error:ODPS-0130131:Table not found - line 1:26 'all_answer'
用戶場景:查詢表,SELECT risk,count(*) FROM all_answer GROUP BY risk。
問題分析:由於表不存在,導致的SQL作業無法生成執行計劃。
解決方案:確認Project下的表是否存在或在表的前麵加上Project名稱,如demo.all_answer。
No7.FAILED: ODPS-0000000
用戶場景:寫SQL的時候。
問題分析:係統級別錯誤。
解決方案:重新跑Job吧。
No8.FAILED: ODPS-0130161
錯誤信息:FAILED: ODPS-0130161:Parse exception - line 1:0 cannot recognize input near 'exit' '<EOF>' '<EOF>'
用戶場景:中斷執行,exit。
問題分析:語法解析出錯,EXIT是ORACLE的SQL命令,MaxCompute不支持。
解決方案:中斷操作可以kill 任務名。
No9.FAILED: ODPS-0130211
錯誤信息:FAILED: ODPS-0130211:Table or view already exists - t_mac_section_20170901
用戶場景:複製表,create table t_mac_section_20170901 like t_mac_section。
問題分析:表或視圖已存在。出現這種錯誤一般是由於重複創建同名表或者view,即執行Create Table/View語句時,要創建的Table/View已經存在。
解決方案:檢查表是否已存在,不要重複操作。
No10.FAILED: ODPS-1181151
錯誤信息:FAILED: ODPS-0121035:Illegal implicit type cast - in function EQUAL, input parameter '20170904' cannot be casted to datetime,
only yyyy-mm-dd hh:mi:ss format is supported
用戶場景:select * from dsp_crowd_hit_statement where statement_time ='20170904' limit 50
問題分析:型轉換錯誤。一般為不支持的隱式類型轉換錯誤。通常情況下是由於違背隱式類型轉換規則引起的。內建函數也有不同的隱式轉換規則。
解決方案:類型轉換https://help.aliyun.com/document_detail/57792.html
阿裏巴巴大數據-玩家社區 https://yq.aliyun.com/teams/6/
---阿裏大數據博文,問答,社群,實踐,有朋自遠方來,不亦說乎……
最後更新:2017-09-08 17:02:23