Pig Forum

Sandbox 1.2: There is an error

  • #27505

    Hi All,

    I’m evaluating Hadoop technology and your sandbox. I’m new about Hadoop, so I’m studing and doing my homework with your tutorials.
    So, I’m here to ask you a little help for my pig’s problem.

    This script doesn’t work:
    a = load ‘nyse_stock’ using org.apache.hcatalog.pig.HCatLoader();
    b = filter a by stock_symbol == ‘ASP';
    c = group b all;
    d = foreach c generate AVG(b.stock_volume);
    dump d;

    Here the logs:

    2013-06-14 05:06:30,292 [main] INFO org.apache.pig.Main – Apache Pig version 0.10.1.21 (rexported) compiled Jan 10 2013, 04:00:42
    2013-06-14 05:06:30,293 [main] INFO org.apache.pig.Main – Logging error messages to: /home/sandbox/hue/pig_1371211590290.log
    2013-06-14 05:06:30,706 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: file:///
    2013-06-14 05:06:31,927 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:32,064 [main] INFO hive.metastore – Trying to connect to metastore with URI thrift://sandbox:9083
    2013-06-14 05:06:32,129 [main] INFO hive.metastore – Waiting 1 seconds before next connection attempt.
    2013-06-14 05:06:33,129 [main] INFO hive.metastore – Connected to metastore.
    2013-06-14 05:06:33,404 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:33,552 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:33,651 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:33,742 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:33,881 [main] WARN org.apache.hadoop.hive.conf.HiveConf – DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
    2013-06-14 05:06:33,943 [main] ERROR org.apache.pig.tools.grunt.Grunt – ERROR 1045:
    Could not infer the matching function for org.apache.pig.builtin.AVG as multiple or none of them fit. Please use an explicit cast.
    Details at logfile: /home/sandbox/hue/pig_1371211590290.log

    Can you help me?

    Regards.

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #27745
    tedr
    Moderator

    Hi Francesco,

    That script runs perfectly in my copy of Sandbox 1.2. The only bit I ran into when I copied and pasted it that the forum software inserted the magic single quote characters rather than just the single quote character.

    Thanks,
    Ted.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.