ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatLoader

to create new topics or reply. | New User Registration

Tagged: ,

This topic contains 5 replies, has 5 voices, and was last updated by  Nadeem Gul 6 months, 3 weeks ago.

  • Creator
    Topic
  • #55458

    Mo Lin
    Participant

    Hi,

    When run below Pig command on HDP 2.1 for Windows, failed with ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatLoader. please advise what could be wrong.

    grunt> sample_01 = LOAD ‘hivesmoke’ using org.apache.hcatalog.pig.HCatLoader();

    Logfile shows below info:

    Caused by:
    <line 1, column 39> pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatLoader using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
    at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1299)
    at org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:1284)
    at org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:5162)
    at org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3519)
    at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1629)
    at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:1106)
    at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:564)
    at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:421)
    at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:188)
    … 10 more
    Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatLoader using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
    at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:653)
    at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1296)
    … 18 more

    thanks,
    nemo

Viewing 5 replies - 1 through 5 (of 5 total)

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

  • Author
    Replies
  • #65033

    Nadeem Gul
    Participant

    Not working for me
    [root@sandbox ~]# env
    HOSTNAME=sandbox.hortonworks.com
    TERM=xterm-256color
    SHELL=/bin/bash
    SSH_CLIENT=10.0.2.2 61524 22
    QTDIR=/usr/lib64/qt-3.3
    QTINC=/usr/lib64/qt-3.3/include
    SSH_TTY=/dev/pts/0
    USER=root
    LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44; …
    PATH=/usr/lib64/qt-3.3/bin:/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/hdp/current/falcon-client/bin:/usr/hdp/current/hadoop-mapreduce-historyserver/bin:/usr/hdp/current/oozie-client/bin:/usr/hdp/current/falcon-server/bin:/usr/hdp/current/hadoop-yarn-client/bin:/usr/hdp/current/oozie-server/bin:/usr/hdp/current/flume-client/bin:/usr/hdp/current/hadoop-yarn-nodemanager/bin:/usr/hdp/current/pig-client/bin:/usr/hdp/current/flume-server/bin:/usr/hdp/current/hadoop-yarn-resourcemanager/bin:/usr/hdp/current/slider-client/bin:/usr/hdp/current/hadoop-client/bin:/usr/hdp/current/hadoop-yarn-timelineserver/bin:/usr/hdp/current/sqoop-client/bin:/usr/hdp/current/hadoop-hdfs-client/bin:/usr/hdp/current/hbase-client/bin:/usr/hdp/current/sqoop-server/bin:/usr/hdp/current/hadoop-hdfs-datanode/bin:/usr/hdp/current/hbase-master/bin:/usr/hdp/current/storm-client/bin:/usr/hdp/current/hadoop-hdfs-journalnode/bin:/usr/hdp/current/hbase-regionserver/bin:/usr/hdp/current/storm-nimbus/bin:/usr/hdp/current/hadoop-hdfs-namenode/bin:/usr/hdp/current/hive-client/bin:/usr/hdp/current/storm-supervisor/bin:/usr/hdp/current/hadoop-hdfs-nfs3/bin:/usr/hdp/current/hive-metastore/bin:/usr/hdp/current/zookeeper-client/bin:/usr/hdp/current/hadoop-hdfs-portmap/bin:/usr/hdp/current/hive-server2/bin:/usr/hdp/current/zookeeper-server/bin:/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin:/usr/hdp/current/hive-webhcat/bin:/usr/hdp/current/hadoop-mapreduce-client/bin:/usr/hdp/current/knox-server/bin:/usr/hdp/current/hadoop-client/sbin:/usr/hdp/current/hadoop-hdfs-nfs3/sbin:/usr/hdp/current/hadoop-yarn-client/sbin:/usr/hdp/current/hadoop-hdfs-client/sbin:/usr/hdp/current/hadoop-hdfs-portmap/sbin:/usr/hdp/current/hadoop-yarn-nodemanager/sbin:/usr/hdp/current/hadoop-hdfs-datanode/sbin:/usr/hdp/current/hadoop-hdfs-secondarynamenode/sbin:/usr/hdp/current/hadoop-yarn-resourcemanager/sbin:/usr/hdp/current/hadoop-hdfs-journalnode/sbin:/usr/hdp/current/hadoop-mapreduce-client/sbin:/usr/hdp/current/hadoop-yarn-timelineserver/sbin:/usr/hdp/current/hadoop-hdfs-namenode/sbin:/usr/hdp/current/hadoop-mapreduce-historyserver/sbin:/usr/hdp/current/hive-webhcat/sbin:/root/bin
    PWD=/root
    JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
    QTLIB=/usr/lib64/qt-3.3/lib
    LESSOPEN=||/usr/bin/lesspipe.sh %s
    _=/bin/env
    OLDPWD=//usr/hdp/2.2.0.0-2041/hive-hcatalog

    Collapse
    #57750

    Wonoh Kim
    Participant

    OK. pig -useHCatalog works.
    Yet, I want it work automatically. Is there a way to put the option (-useHCatalog) in .pigbootup file?

    Collapse
    #56506

    Mohamed ElSheikh
    Participant

    I was facing the same exact problem, the only difference is that I am using the HDInsight emulator for windows.
    The problem was fixed when I copy the jar file name hcatalog*.jar to the path “C:\Hadoop\hcatalog-0.4.1\bin\share\hcatalog”
    It now works fine!

    Collapse
    #55497

    Mo Lin
    Participant

    yes, that’s the cause. thanks Jianyong!

    -Nemo

    Collapse
    #55480

    Jianyong Dai
    Participant

    Do you use “-useHCatalog” option when launching pig?

    Collapse
Viewing 5 replies - 1 through 5 (of 5 total)
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.