Member since
07-05-2016
11
Posts
2
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2192 | 08-09-2016 06:39 PM |
08-09-2016
06:39 PM
Fixed the issue by using sed instead: fread("hadoop fs -text /path/to/the/file.csv |sed -n '1p;/2MS-US/p'", fill=TRUE) The 1p part prints the first line, which are the headers, so this way I was able to keep the headers as well as the rows that match the string.
... View more
08-09-2016
03:40 PM
I've been trying to read large csv files from HDFS into R using the data.table package since it's a lot faster than the rhdfs package in my experience. I have been successful with reading entire files with the following commands: data <- fread("/usr/bin/hadoop fs -text /path/to/the/file.csv"), fill=TRUE
Then, I would like to only read in rows that contain the value "2MS-US". I tried to do it with grep : data <- fread("/usr/bin/hadoop fs -text /path/to/the/file.csv | grep '2MS-US'"), fill=TRUE)
This returns the correct number of rows, but it removes all the headers. They now become "V1", "V2", etc. According to this thread, the issue with losing column names when using grep has been resolved in data.package 1.9.6, but I am still experiencing it even though I am using 1.9.7. Any thoughts on this? Thanks!
... View more
Labels:
- Labels:
-
Apache Hadoop
07-18-2016
05:39 PM
It worked! Even though did not resolve my problem, but I was able to restart Hive. Thank you for the help!
... View more
07-18-2016
04:52 PM
I wasn't able to log in as admin with the same username and password that I used to log into sandbox as root...
... View more
07-18-2016
04:37 PM
While I was having issue setting up the RHive package in HDP 2.4, I was advised to restart hive-server2 after I made some changes in the hive-site.xml file. According to the hortonworks doc, I can do that on the Ambari UI with the "Service Actions" dropdown menu, but I could not find it anywhere on the UI. I've attached a screenshot of my Ambari page as well as a screenshot from the doc. Any idea what's going on here? Or ways to restart hive-server2 with command line? Thanks in advance!
... View more
Labels: