i have add udf in hive. query trying :
create function strip1 'com.hadoopbook.hive.strip' using jar '/home/hduser/hadoop-tutorial/hadoop-book-master/ch17-hive/src/main/java/com/hadoopbook/hive/strip.jar' but getting exception :
failed: execution error, return code 1 org.apache.hadoop.hive.ql.exec.functiontask. hive warehouse non-local, /home/hduser/hadoop-tutorial/hadoop-book-master/ch17-hive/src/main/java/com/hadoopbook/hive/strip.jar specifies file on local filesystem. resources on non-local warehouse should specify non-local scheme/path
can tell how solve ?
three options:
- copy jar on hdfs , use path.
or
as error telling you: in
$hive_home/confdirectory therehive-default.xmland/orhive-site.xmlhashive.metastore.warehouse.dirproperty. addhdfs:/path, , restart/re-run hive shell/script:<property> <name>hive.metastore.warehouse.dir</name> <value>hdfs://usr/hive/warehouse </value> <description>location of warehouse directory</description> </property>
or
if running hive queries hive shell then:
hive> set hive.metastore.warehouse.dir; hive.metastore.warehouse.dir=/user/hive/warehouseabove command prints path, prefix
hdfs:/below , re-run hive command(s) :hive> set hive.metastore.warehouse.dir="hdfs://user/hive/warehouse";
Comments
Post a Comment