Member since
02-02-2016
583
Posts
518
Kudos Received
98
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3273 | 09-16-2016 11:56 AM | |
1375 | 09-13-2016 08:47 PM | |
5482 | 09-06-2016 11:00 AM | |
3181 | 08-05-2016 11:51 AM | |
5260 | 08-03-2016 02:58 PM |
06-11-2016
12:42 PM
Below is the example is used to access hdfs from SparkR. -bash-4.1$ hadoop fs -ls /user/hdfs/passwd
-rw-r--r-- 3 hdfs hdfs 2296 2016-06-09 16:29 /user/hdfs/passwd
-bash-4.1$
-bash-4.1$ SparkR
> sqlContext <- sparkRSQL.init(sc)
> people <- read.df(sqlContext,"/user/hdfs/passwd", "text")
> head(people)
If you created the hive table in non default location then kindly use below command to see the underlining hdfs location. hive> desc extended "tablename";
To access hive through SparkR. -bash-4.1$ SparkR > hiveContext <- sparkRHive.init(sc)
> sql(hiveContext, "CREATE TABLE IF NOT EXISTS src (key INT, value STRING)")
> sql(hiveContext, "LOAD DATA LOCAL INPATH 'examples/src/main/resources/kv1.txt' INTO TABLE src")
# Queries can be expressed in HiveQL.
> results <- sql(hiveContext, "FROM src SELECT key, value")
# results is now a DataFrame
>head(results)
... View more
06-09-2016
03:04 PM
2 Kudos
@Aidan Condron I believe the working directory will be local filesystem i.e under /usr. However the /user directory is hdfs location where it has each user home directory and spark will use it for staging area. You need to point the setwd() to some local path instead of hdfs path.
... View more
06-09-2016
10:32 AM
Hi @Smart Solutions Did you tried the suggested way?
... View more
06-09-2016
09:31 AM
2 Kudos
@Smart Solutions It kept it in memory therefore you have to restart the Spark history server after deleting it from /spark-history/ location.
... View more
06-08-2016
10:16 PM
Major things goes under /usr and confs to /etc and logs inside /var, /hadoop, In new releases we are also using /opt
... View more
06-08-2016
09:31 PM
So it seems that SAP JDBC error is gone but somehow sqoop is not resolving the double quotes. Will do search locally and get back to you.
... View more
06-08-2016
09:30 PM
yes, probably you can mount /usr on path where you want to use but it should be same name I believe.
... View more
06-08-2016
09:16 PM
Ok then we may need to remove the initial double quote. SCHEMA.\"/BI0/TCUSTOMER\"
... View more
06-08-2016
09:03 PM
Did you tried the last suggested syntax or are you able to resolve this issue?
... View more