The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Pig Forum

Running Apache Pig tutorial problems

  • #50777
    Jakub Stransky

    I am new to Apache Pig and have some experiences with Hadoop 2. I am having some difficulties with running “standard” pig tutorial – pig script1-hadoop.pig

    However because of cluster set up (users) – I had to modified an example a bit. Standard tutorial expects all files on / of HDFS. Which I cannot use in my case so I created /pig dir for that purpose

    drwxrwxrwx – hdfs hdfs 0 2014-03-31 11:15 /pig
    with the uploaded content

    -rw-r–r– 3 jakub hdfs 10408717 2014-03-31 10:41 /pig/excite.log.bz2
    I also modified the pig script script1-hadoop.pig as well to respect those changes as follows (mainly just for load and store commands):

    raw = LOAD ‘/pig/excite.log.bz2’ USING PigStorage(‘\t’) AS (user, time, query);

    STORE ordered_uniq_frequency INTO ‘/pig/script1-hadoop-results’ USING PigStorage();
    I am running pi script:

    [jakub@hadooptools pigtmp]$ pig script1-hadoop.pig
    but with no luck and getting error:

    2014-03-31 10:15:11,896 [main] ERROR – You don’t have permission to perform the operation. Error from the server: Permission denied: user=jakub, access=WRITE, inode=”/”:hdfs:hdfs:drwxr-xr-x
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkAncestorAccess(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInt(
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(
    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(
    at …
    I am not quite sure why PIG script is trying to write into / on HDFS. I know that PIG can store some immediate results on HDFS so I modified pig.temp.dir property (/etc/pig/conf/ and created location on HDFS /pig/tmp

    drwxrwxrwx – jakub hdfs 0 2014-03-31 11:15 /pig/tmp
    Anyone idea what might be wrong? Pig in local mode is ok.


  • Author
  • #61595
    Naresh K

    you are doing it in PIG HDFS mode…so the data will be taken from HDFS and the output will also Stored into HDFS. for that you need to have write permisions

The forum ‘Pig’ is closed to new topics and replies.

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.