본문 바로가기
빅데이터/hive

[hive] java.net.URISyntaxException: Relative path in absolute URI: file:./tmp/yarn 오류 처리

by hs_seo 2017. 1. 17.

하이브 처리중 다음과 같은 오류가 발생하는 경우는 scratchdir 를 설정해 주면된다. 

아래의 오류는 getScratchDir() 메소드를 호출하다가 오류가 발생한것을 알 수 있다. 따라서 아래의 설정을 해주면 된다. 


<property>

<name>hive.exec.scratchdir</name>

<value>/tmp/hive</value>

</property>

<property>

<name>hive.exec.local.scratchdir</name>

<value>/tmp/hive</value>

</property>



위의 설정은 하이브 처리중 사용하는 플랜 파일이나, 임시 파일들을 저장하기 위하여 사용한다. 

<This directory is used by Hive to store the plans for different map/reduce stages for the query as well as to stored the intermediate outputs of these stages.>


2017-01-13 07:33:08,521 INFO [hive-job uber-SubtaskRunner] org.apache.hadoop.hive.ql.exec.SerializationUtilities: Serializing MapredWork using kryo

2017-01-13 07:33:08,527 INFO [hive-job uber-SubtaskRunner] org.apache.hadoop.hive.ql.exec.SerializationUtilities: Deserializing MapredWork using kryo

2017-01-13 07:33:08,551 ERROR [hive-job uber-SubtaskRunner] org.apache.hadoop.hive.ql.Driver: FAILED: IllegalArgumentException java.net.URISyntaxException: Relative path in absolute URI: file:./tmp/yarn/hive-job/hive_job-id-1

java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:./tmp/yarn/hive-job/hive_job-id-1

at org.apache.hadoop.fs.Path.initialize(Path.java:205)

at org.apache.hadoop.fs.Path.<init>(Path.java:196)

at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:279)

at org.apache.hadoop.hive.ql.Context.getLocalScratchDir(Context.java:314)

at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinTaskDispatcher.processCurrentTask(CommonJoinTaskDispatcher.java:538)

at org.apache.hadoop.hive.ql.optimizer.physical.AbstractJoinTaskDispatcher.dispatch(AbstractJoinTaskDispatcher.java:179)

at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.dispatch(TaskGraphWalker.java:111)

at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.walk(TaskGraphWalker.java:180)




반응형