Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Pig queries are done through grunt (Pig shell) but they failed with Ambari (Pig View).

Hello,
When i run pig queries through Ambari Pig view i got failed status without any logs output.

Any idea to solve this issue ?

18 REPLIES 18

@raouia kabadou

Verify the logs under /var/log/ambari-server/pig-view and check if there are any errors reported.

@Sindhu

Thank you for your reply.

I've accessed to /var/log/ambari-server/pig-view/pig-view.log and i got log details mentioned in "log.png" and from Ambari interface i got failed status without any logs output.

Sometimes, i got logs output like shown in "logs output.png" for the same script executed with the same tags.
So, how can i fix this problem ?


logs-output.pngscreenshot.pnglog.png

Mentor

@Sindhu

Are you running the file locally or distributed. The error

/user/admin/jobs/test_script_xxxxxx stdout not found 

Show the file doesn't exist in hdfs ,cn you run the below

$hdfs dfs -ls /user/admin/jobs/

Revert

screenshot.png

@Geoffrey Shelton Okot
Hello, i'm running the file in distributed mode through Ambari and the the command $hdfs dfs -ls /user/admin/pig returns results shown in "screenshot.png".

Mentor

@raouia kabadou

You stopped one directory short 🙂

$hdfs dfs -ls /user/admin/pig/jobs/ and NOT $hdfs dfs -ls /user/admin/pig

Did you copy the files to hdfs before running your command?

@Geoffrey Shelton Okot

$hdfs dfs -ls /user/admin/pig/jobs returns results shown in "results.png".

Which files i need to copy to hdfs ?


results.png

Mentor

@raouia kabadou

What are the contest of the tes_script *

@Geoffrey Shelton Okot
a = LOAD 'drivers' USING org.apache.hive.hcatalog.pig.HCatLoader();
b = LOAD 'truck_events' USING org.apache.hive.hcatalog.pig.HCatLoader();
c = join b by driverid, a by driverid;
dump c;

Super Mentor

@raouia

Which version of Ambari Are you using?

There was a similar issue reported: https://issues.apache.org/jira/browse/AMBARI-18250

Which is addressed in Ambari 2.5.

@Jay SenSharma
I've already visited the link mentioned above but i didn't understand the solution they suggested.
Where should i put the lines below in order to disable caching?

App.ApplicationAdapter = DS.RESTAdapter.extend({
  init: function() {
    Ember.$.ajaxSetup({
      cache: false
    })
  },

Super Mentor

@raouia

You can try (it might work if your issue is exactly same as this) to edit the file "/var/lib/ambari-server/resources/views/work/PIG{1.0.0}/static/javascripts/app.js" to look some thing like following to see if it works.

window.App = require('app');

App.ApplicationAdapter = DS.RESTAdapter.extend({
  init: function() {
    Ember.$.ajaxSetup({
      cache: false
    })
  },
  namespace: App.getNamespaceUrl(),
  headers: {
   'X-Requested-By': 'ambari'
  }
});

.

@Jay SenSharma

I've accessed to the file /var/lib/ambari-server/resources/views/work/PIG{1.0.0}/static/javascripts/app.js and i found that cache is already set to false


file.png

Super Mentor

@raouia

Then your issue might be slightly different. Just to be double sure can you try running your browser in "Incognito" mode in Chrome (Or in private Mode if you are using Firefox) to see if it can help us in isolating the issue.

.

@Jay SenSharma

I have tried to run the script in private mode and the error still persists.
Thank you for your help.

Mentor

@raouia kabadou

Can you copy that script in the path earlier mentioned in hdfs and retry

@Geoffrey Shelton Okot

The script should not be in the path "/user/admin/pig/jobs". It should be in the directory "/user/admin/pig/scripts" and once i run it, a new job should be launched in the directory /user/admin/pig/jobs.

Mentor

@raouia kabadou

You right got mixed up ! did it work out?

@Geoffrey Shelton Okot

The error still persists, i didn't find a pertinent solution unfortunately.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.