AnsweredAssumed Answered

How to print errors from Custom Script in hive to a separate file then the output file

Question asked by dhariaekta on Feb 23, 2016
Latest reply on May 15, 2016 by maprcommunity

I am trying to print errors ( i.e. if there is some fault in the data) from Perl scripts which I run inside hive. I want to print it in a separate file instead of output file.

 

This are my results:
[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 1a       NULL

 

2       b

 

[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 3c       NULL

 

4       d

 

[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 5e       NULL

 

6       f

 

I require results as
output file

 

2       b

 

4       d

 

6       f

 

log file

 

[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 1a       NULL

 

[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 3c       NULL

 

[2016/02/22 14:22:27] [INFO] [main:: /tmp/hadoop-mapr/nm-local-dir/usercache/mapr/appcache/application_1438029999622_6376/container_e03_1438029999622_6376_01_000002/./logtry.pl (18)] 5e       NULL

Outcomes