List Of Errors
A : Exception in using UDF
Some time may you face below issue while using customizes UDF in hive
java.io.FileNotFoundException: File does not exist: hdfs:
A : Exception in using UDF
Some time may you face below issue while using customizes UDF in hive
java.io.FileNotFoundException: File does not exist: hdfs:
here is complete stack trace
java.io.FileNotFoundException: File does not exist: hdfs://localhost:54310/usr/local/hivetmp/amit.pathak/9381feb3-6c5f-469b-b6b1-9af55abbdabd/udf.jar
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1122)
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1114)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1114)
at org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.getFileStatus(ClientDistributedCacheManager.java:288)
If you want to view exact problem you can check this issueLink
This issue comes mainly when you use UDF in join or Create table tablename as function.
To fix above issue I have two ways.
1) - Use add file command instead of add jar (As using file it make sure your data exist in distributed cache )
Before Changes ::
add jar '/user/hive/udf.jar';
create temporary function convertToJulian as 'com.convertToJulian';
After Changes ::
add file '/user/hive/udf.jar';
create temporary function convertToJulian as 'com.convertToJulian';
2)- Have same file structure on local as well as on hadoop.
Like if you stored your UDF in below local file system
/user/hive/amit/udf.jar
So you also need to create same directory structure in hadoop filesystem and then put your udf jar in that directory.
C :
B :
- Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
Fix :
1)- execute command -> sudo nano hive-site.xml
2)- update below highlighted 3 property value with your created directory
<property>
<name>hive.exec.scratchdir</name>
<value>/usr/local/hive_data</value>
<description>HDFS root scratch dir for Hive jobs which gets created with write all (733) permission. For each connecting user, an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created,$
</property>
<property>
<name>hive.exec.local.scratchdir</name>
<value>/usr/local/hive_data</value>
<description>Local scratch space for Hive jobs</description>
</property>
<property>
<name>hive.downloaded.resources.dir</name>
<value>/usr/local/hive_data/${hive.session.id}_resources</value>
<description>Temporary local directory for added resources in the remote file system.</description>
</property>
C :
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected .
Fix :
a)- Open profile file(or any file where you stored path info of hive) -> sudo nano /etc/profile
b)- add line at bottom of file -> export HADOOP_USER_CLASSPATH_FIRST=true
c)- execute command -> source /etc/profile
d)- type hive and hit Enter.
Now it should working fine and you able to see hive pointer. like
hive>
No comments:
Post a Comment