Member since
10-01-2015
3933
Posts
1150
Kudos Received
374
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3365 | 05-03-2017 05:13 PM | |
2796 | 05-02-2017 08:38 AM | |
3074 | 05-02-2017 08:13 AM | |
3004 | 04-10-2017 10:51 PM | |
1515 | 03-28-2017 02:27 AM |
12-30-2015
03:18 AM
2 Kudos
if the option to build the widget is not available, you can always file a jira @vishnu rao
... View more
12-30-2015
02:17 AM
4 Kudos
I’m going to show you a neat way to work with CSV files and Apache Hive. Usually, you’d have to do some preparatory work on CSV data before you can consume it with Hive but I’d like to show you a built-in SerDe (Serializer/Deseriazlier) for Hive that will make it a lot more convenient to work with CSV. This work was merged in Hive 0.14 and there’s no additional steps necessary to work with CSV from Hive. Suppose you have a CSV file with the following entries
id first_name last_name email gender ip_address
1 James Coleman jcoleman0@cam.ac.uk Male 136.90.241.52
2 Lillian Lawrence llawrence1@statcounter.com Female 101.177.15.130
3 Theresa Hall thall2@sohu.com Female 114.123.153.64
4 Samuel Tucker stucker3@sun.com Male 89.60.227.31
5 Emily Dixon edixon4@surveymonkey.com Female 119.92.21.19 to consume it from within Hive, you’ll need to upload it to hdfs hdfs dfs -put sample.csv /tmp/serdes/
now all it takes is to create a table schema on top of the file drop table if exists sample;
create external table sample(id int,first_name string,last_name string,email string,gender string,ip_address string)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
stored as textfile
location '/tmp/serdes/';
now you can query the table as is select * from sample limit 10;
but what if your CSV file was tab-delimited rather than comma? well the SerDe got you covered there too: drop table if exists sample;
create external table sample(id int,first_name string,last_name string,email string,gender string,ip_address string)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
with serdeproperties (
"separatorChar" = "\t"
)
stored as textfile
location '/tmp/serdes/';
notice the separatorChar argument, in all, the SerDe accepts two more arguments; custom escape characters and quote characters
Take a look at the wiki for more info https://cwiki.apache.org/confluence/display/Hive/CSV+Serde.
... View more
Labels:
12-30-2015
02:14 AM
thanks @azeltov and @Ali Bajwa the latest changes fixed the problem with this tutorial.
... View more
12-29-2015
04:21 PM
1 Kudo
try to replace your workflow with this and then plugin your values https://github.com/apache/oozie/blob/master/examples/src/main/apps/distcp/workflow.xml
... View more
12-29-2015
02:43 PM
you can also go to HBase UI and look at each regionserver individually. You don't need a graphical tool to identify hot-spotting.
... View more
12-29-2015
02:41 PM
try to clean your cache, "apt-get update"
... View more
12-29-2015
01:58 AM
@Jose Antonio Munoz there is no 2.3.0.0 in updates section, your url is wrong. The updates only contain 2.3.2.0 and 2.3.4.0. I don't see 2.3.0.0 published anymore, try using HDP/ubuntu14/2.x/updates/2.3.4.0 or 2.3.2.0. What HDP version are you on? Please post the repo url you're trying to use.
... View more
12-29-2015
01:53 AM
it's always better to open a new thread for a separate issue, you have a better chance of getting an answer than risk having your issues buried in old replies. As far as the issue you're having, have you tried restarting Ambari and running services checks recently? If so, run the API commands to get a list of components. Clean up any reference to NFS_GATEWAY and run service checks again. You have some issues you need to work through @Ali Gouta.
... View more
12-28-2015
02:20 AM
even though those classes have been moved into org.apache.hive it was still pointing to wrong package names in Ambari Pig View until 2.2. I'm not familiar with the practice exam environment, I know that current Sandbox has the same issue and I'm not competing for the best answer @rich.
... View more
12-27-2015
02:55 PM
@Suresh Bonam it was fixed in Ambari 2.2. When new Sandbox is released, it will reflect the fix in that version.
... View more