pig script not working - cloudera-quickstart-vm-5.8.0-0-vmware.zip

17 views
Skip to first unread message

Paul Go

unread,
Sep 20, 2016, 9:19:32 PM9/20/16
to Hue-Users
Hi there.
I wanna use pig script and test. So I installed the cloudera-quickstart-vm-5.8.0-0-vmware.zip in window.
And use cloudera-express.

But simple pig script not working.
Its running log show heart beat over and over as below and not going process.
What should I do?

* log message
Heart beat
Heart beat
Heart beat
Heart beat
...


* pig script 
sightings = LOAD '/user/cloudera/infochimps-data-master/infochimps-data-master/geo/ufo_sightings/ufo_sightings.tsv'  AS (
    sighted_at: chararray,   reported_at: chararray,    location_str: chararray,
shape: chararray,        duration_str: chararray,   description: chararray,
lng: float,              lat: float,                city: chararray,
county: chararray,       state: chararray,          country: chararray );

-- Take the 6th and 7th character from the original string, as in '2010-06-25T05:00:00Z', take '06'
month_count = FOREACH sightings GENERATE SUBSTRING(sighted_at, 5, 7) AS month;

-- Group by year_month, and then count the size of the 'bag' this creates to get a total
ufos_by_month    = FOREACH (GROUP month_count BY month) GENERATE
  group AS month, COUNT_STAR(month_count) AS total;
STORE ufos_by_month INTO './ufos_by_month.out';



Reply all
Reply to author
Forward
0 new messages