Kylin下构建Cube第一步出错:shell-init: error retrieving current directory
問(wèn)題背景:
生產(chǎn)環(huán)境部署的Kylin-2.1,官方發(fā)布的最新安裝包并不支持更改hbase存儲(chǔ)的namespace,修改源碼后重新打包部署過(guò)程中,build cube第一步出錯(cuò)
大概錯(cuò)誤信息是:
OS command error exit with 5 – hive -e "USE default; DROP TABLE IF EXISTS kylin_intermediate_kylin_sales_cube_desc_20120101000000_20160502000000; CREATE EXTERNAL TABLE IF NOT EXISTS kylin_intermediate_kylin_sales_cube_desc_20120101000000_20160502000000 ( DEFAULT_KYLIN_SALES_PART_DT date ,DEFAULT_KYLIN_SALES_LEAF_CATEG_ID bigint ,DEFAULT_KYLIN_SALES_LSTG_SITE_ID int ,DEFAULT_KYLIN_CATEGORY_GROUPINGS_META_CATEG_NAME string ,DEFAULT_KYLIN_CATEGORY_GROUPINGS_CATEG_LVL2_NAME string ,DEFAULT_KYLIN_CATEGORY_GROUPINGS_CATEG_LVL3_NAME string ,DEFAULT_KYLIN_SALES_LSTG_FORMAT_NAME string ,DEFAULT_KYLIN_SALES_PRICE decimal(19,4) ,DEFAULT_KYLIN_SALES_SELLER_ID bigint ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\177' STORED AS SEQUENCEFILE LOCATION '/kylin/kylin_metadata/kylin-5020d91f-3114-421b-929b-f733d438411a/kylin_intermediate_kylin_sales_cube_desc_20120101000000_20160502000000'; SET dfs.replication=2; SET dfs.block.size=33554432; SET hive.exec.compress.output=true; SET hive.auto.convert.join.noconditionaltask=true; SET hive.auto.convert.join.noconditionaltask.size=300000000; SET mapreduce.map.output.compress.codec=org.apache.hadoop.io.compress.SnappyCodec; SET mapreduce.output.fileoutputformat.compress.codec=org.apache.hadoop.io.compress.SnappyCodec; SET hive.merge.mapfiles=true; SET hive.merge.mapredfiles=true; SET mapred.output.compression.type=BLOCK; SET hive.merge.size.per.task=256000000; SET hive.support.concurrency=false; SET mapreduce.job.split.metainfo.maxsize=-1; INSERT OVERWRITE TABLE kylin_intermediate_kylin_sales_cube_desc_20120101000000_20160502000000 SELECT KYLIN_SALES.PART_DT ,KYLIN_SALES.LEAF_CATEG_ID ,KYLIN_SALES.LSTG_SITE_ID ,KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME ,KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME ,KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME ,KYLIN_SALES.LSTG_FORMAT_NAME ,KYLIN_SALES.PRICE ,KYLIN_SALES.SELLER_ID FROM DEFAULT.KYLIN_SALES as KYLIN_SALES INNER JOIN DEFAULT.KYLIN_CAL_DT as KYLIN_CAL_DT ON KYLIN_SALES.PART_DT = KYLIN_CAL_DT.CAL_DT INNER JOIN DEFAULT.KYLIN_CATEGORY_GROUPINGS as KYLIN_CATEGORY_GROUPINGS ON KYLIN_SALES.LEAF_CATEG_ID = KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID AND KYLIN_SALES.LSTG_SITE_ID = KYLIN_CATEGORY_GROUPINGS.SITE_ID WHERE (KYLIN_SALES.PART_DT >= '2012-01-01' AND KYLIN_SALES.PART_DT < '2016-05-02') ; " shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Unable to determine Hadoop version information. 'hadoop version' returned: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. at java.lang.System.initProperties(Native Method) at java.lang.System.initializeSystemClass(System.java:1119)Kylin之前是沒(méi)有問(wèn)題的,構(gòu)建了很多cube都沒(méi)有問(wèn)題,即便是出錯(cuò)按理講也不會(huì)出現(xiàn)在第一步,第一步的動(dòng)作是創(chuàng)建一個(gè)寬表,放到hive作為臨時(shí)表。
解決思路:
第一感覺(jué)是權(quán)限問(wèn)題,修改了sh腳本的執(zhí)行權(quán)限,修改了hdfs上 kylin 工作目錄的權(quán)限后,問(wèn)題仍然存在。
重新找原因,其中有報(bào)工作目錄的問(wèn)題,看上去是本地目錄并不是Hdfs上的目錄,這才想起可能是上次重新部署Kylin的時(shí)候把舊版本的直接刪除 ,但并沒(méi)有停掉進(jìn)程。
查看進(jìn)程查然有兩個(gè)Kylin進(jìn)程在跑,于是Kill掉舊的進(jìn)程
突然想起之前有人誤刪了kylin的文件夾,所以去查看了一下,果然某一臺(tái)機(jī)器下面存在兩個(gè)kylin進(jìn)程。kill 后重啟就好了。
猜測(cè)的原因是原進(jìn)程的安裝目錄已經(jīng)不存在了,并行著兩個(gè)Kylin
進(jìn)程產(chǎn)生沖突。
總結(jié)
以上是生活随笔為你收集整理的Kylin下构建Cube第一步出错:shell-init: error retrieving current directory的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 有用的 Google Analytics
- 下一篇: 编码是件有逻辑的事情