Member since
07-28-2016
13
Posts
1
Kudos Received
0
Solutions
03-15-2017
09:16 AM
Hi, I am trying to execute a python file which is stored in hdfs using livy-server. However I am getting an error as Only local python files supported. Host: 10.140.178.24 Port:8999 hadoop fs -ls /hp
-rw-r--r-- 3 root hdfs 1613 2017-03-15 12:44 /hp/pi.py I executed the curl command with the above path for the python file curl -X POST --data '{"file": "/hp/pi.py"}' -H "Content-Type: application/json" 10.140.178.24:8999/batches
{"id":12,"state":"running","appId":null,"appInfo":{"driverLogUrl":null,"sparkUiUrl":null},"log":[]}
However when I look into the logs, i get only local python files are supported. curl 10.140.178.24:8999/batches/12/log | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2486 100 2486 0 0 258k 0 --:--:-- --:--:-- --:--:-- 269k
{
"from": 0,
"id": 13,
"log": [
"Error: Only local python files are supported: Parsed arguments:",
" master local",
" deployMode client",
" executorMemory null",
" executorCores null",
" totalExecutorCores null",
" propertiesFile /usr/hdp/current/spark-thriftserver/conf/spark-defaults.conf",
" driverMemory null",
" driverCores null",
" driverExtraClassPath null",
" driverExtraLibraryPath /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64",
" driverExtraJavaOptions null",
" supervise false",
" queue null",
" numExecutors null",
" files null",
" pyFiles null",
" archives null",
" mainClass null",
" primaryResource hdfs://slave0.acme.com:8020/home/ec2-user/livy/pi.py",
" name pi.py",
" childArgs []",
" jars null",
" packages null",
" packagesExclusions null",
" repositories null",
" verbose false",
"",
"Spark properties used, including those specified through",
" --conf and those from the properties file /usr/hdp/current/spark-thriftserver/conf/spark-defaults.conf:",
" spark.yarn.queue -> default",
" spark.history.kerberos.principal -> none",
" spark.executor.extraLibraryPath -> /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64",
" spark.yarn.max.executor.failures -> 3",
" spark.driver.extraLibraryPath -> /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64",
" spark.yarn.historyServer.address -> slave0.acme.com:18080",
" spark.eventLog.enabled -> true",
" spark.history.ui.port -> 18080",
" spark.history.provider -> org.apache.spark.deploy.history.FsHistoryProvider",
" spark.history.fs.logDirectory -> hdfs:///spark-history",
" spark.yarn.submit.file.replication -> 3",
" spark.yarn.scheduler.heartbeat.interval-ms -> 5000",
" spark.yarn.executor.memoryOverhead -> 384",
" spark.yarn.containerLauncherMaxThreads -> 25",
" spark.yarn.driver.memoryOverhead -> 384",
" spark.history.kerberos.keytab -> none",
" spark.eventLog.dir -> hdfs:///spark-history",
" spark.yarn.preserve.staging.files -> false",
" spark.master -> local",
"",
" .primaryResource",
"Run with --help for usage help or --verbose for debug output"
],
"total": 52
I am not sure why it is pointing to the local mode.I have read other posts and I have to set spark master as yarn-cluster but I am not sure where and how to set it. Kindly if someone can let me know how to resolve the above issue, it would be great. Any help would be appreciated
... View more
Labels:
- Labels:
-
Apache Spark
08-08-2016
09:38 AM
Hi, I tried out adding the jars that are present in hdfs using the hive view as follows add jar 'hdfs:///tmp/udfs/hive/esri-geometry-api.jar'; But I am getting this error Error while compiling statement: FAILED: ParseException line 4:0 cannot recognize input near 'add' 'jar' ''hdfs:///tmp/udfs/hive/esri-geometry-api.jar'' [ERROR_STATUS I also tried to add jar like add jar /tmp/udfs/hive/esri-geometry-api.jar; Still I get the same error. I am not able to add these spatial jars that i need . Can you help me out in that regard? the image below shows the jars in the path as shown.
... View more
07-28-2016
01:40 PM
i dont think i see where i can add or edit the property through ambari in advanced hive-site or custom hive-site
... View more
07-28-2016
01:23 PM
no luck. here is what is visible initially and i added the path below those lines. Restarted it, but still getting the same error Folder containing extra libraries required for hive compilation/execution can be controlled by:
if [ "${HIVE_AUX_JARS_PATH}" != "" ]; then
if [ -f "${HIVE_AUX_JARS_PATH}" ]; then
export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
fi
elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
fi
export METASTORE_PORT={{hive_metastore_port}} export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-server2/auxlib/esri-geometry-api.jar,/usr/hdp/current/hive-server2/auxlib/spatial-sdk-hadoop.jar. I am not sure whether I am making any mistake Should I try changing it in hive-site.xml or hive-env.sh through the terminal/shell, will it make any difference? I was referring to this blog http://chetnachaudhari.github.io/2016-02-16/how-to-add-auxiliary-jars-in-hive/
... View more
07-28-2016
01:05 PM
Did you mean hive-env template in advance hive-env?
... View more
07-28-2016
11:39 AM
hi Jitendra, Tried to do as you said when I tried to execute the query say select * from test.building i got the error Error while compiling statement: FAILED: RuntimeException java.lang.ClassNotFoundException: com.esri.json.hadoop.UnenclosedJsonInputFormat [ERROR_STATUS]
... View more
07-28-2016
10:59 AM
Hi jitendra, So i set this property on custom hive-server2 as hive.aux.jars.path and the path right?? and do i have to set 2 different properties for both the jars or use a ',' to seperate both the jars in a single property?
... View more
07-28-2016
10:12 AM
Hi, before posting this question, i did refer the above link, and so managed to add the jar files through the files view into /tmp/udf. But I dont want to create a temporary function, I just want to add the couple of jars because they are needed for any query to run because it is geospatial data. thanks
... View more
07-28-2016
10:04 AM
Hi, Thanks I tried to do so, still showing the same error..
... View more
07-28-2016
09:57 AM
1 Kudo
hello all I am very new to hadoop and I wanted to add a couple of jar files to be able to perform my queries I tried using add jars and the path of the jars like I do in the terminal but I get an error add jar
/tmp/udfs/esri-geometry-api.jar
/tmp/udfs/spatial-sdk-hadoop.jar; Error while compiling statement: FAILED: ParseException line 4:0 cannot recognize input near 'add' 'jar' '/' [ERROR_STATUS] since I am a newbie i dont exactly know how to add them since the path where the jars are located is right, and I am able to do that successfully on the terminal throught he back end. Kindly if someone could elaborately explain me how to add these jar files, i would be eternally grateful
... View more
Labels:
- Labels:
-
Apache Ambari
-
Apache Hadoop