Running Apache Pig tutorial problems

to create new topics or reply. | New User Registration


This topic contains 1 reply, has 2 voices, and was last updated by  Naresh K 9 months, 3 weeks ago.

  • Creator
  • #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.


Viewing 1 replies (of 1 total)

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

  • 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

Viewing 1 replies (of 1 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.