i took example from cloudera website to write a custom SerDe for parsing a file
http://blog.cloudera.com/blog/2012/12/how-to-use-a-serde-in-apache-hive/
it seems a good example but when i create table with custom serde
ADD JAR <path-to-hive-serdes-jar>;
CREATE EXTERNAL TABLE tweets (
id BIGINT,
created_at STRING,
source STRING,
favorited BOOLEAN,
retweeted_status STRUCT<
text:STRING,
user:STRUCT<screen_name:STRING,name:STRING>,
retweet_count:INT>,
entities STRUCT<
urls:ARRAY<STRUCT<expanded_url:STRING>>,
user_mentions:ARRAY<STRUCT<screen_name:STRING,name:STRING>>,
hashtags:ARRAY<STRUCT<text:STRING>>>,
text STRING,
user STRUCT<
screen_name:STRING,
name:STRING,
friends_count:INT,
followers_count:INT,
statuses_count:INT,
verified:BOOLEAN,
utc_offset:INT,
time_zone:STRING>,
in_reply_to_screen_name STRING
)
PARTITIONED BY (datehour INT)
ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
LOCATION '/user/flume/tweets';
it executed perfectly fine but when i do
select * from tweets;
i am getting nothing so thats why i wanted to know if i can run hive in debug mode to see where it is getting failed
You better start hive shell by switching logger mode to DEBUG as follows, I hope you could find something useful from there.
hive --hiveconf hive.root.logger=DEBUG,console
Hive code can be debugged.This link may help you : https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With