Home Forums Hortonworks Sandbox How to run pig script through command line

Tagged: , , , ,

This topic contains 2 replies, has 3 voices, and was last updated by  Sasi Kumar 10 months, 2 weeks ago.

  • Creator
    Topic
  • #40401

    Cheng Chen
    Member

    I am trying to run the pig scripts in
    Hortonworks Sandbox 1.3, Red Hat (64) under VirtualBox 4.2.16
    that I installed on my Windows 7 (64) machine.
    I have finished the tutorials comes with the HDP.
    Now, I want to run scripts through command line (via putty). But I can not do so. I have the following questions.
    1. Where are the pig scripts saved on the guest machine.
    2. I created a pig script under “root/” . And I typed in “pig -x local wordcount.pig” in the command line (again, in putty). But the script does not run.

    Attached is the error message.

    2013-10-14 14:22:35,382 [main] INFO org.apache.pig.Main – Apache Pig version 0.11.1.1.3.0.0-107 (rexported) compiled May 20 2013, 18:14:30
    2013-10-14 14:22:35,384 [main] INFO org.apache.pig.Main – Logging error messages to: /root/pig-wordcount/pig_1381785755380.log
    2013-10-14 14:22:35,731 [main] INFO org.apache.pig.impl.util.Utils – Default bootup file /root/.pigbootup not found
    2013-10-14 14:22:35,837 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: file:///
    2013-10-14 14:22:36,422 [main] INFO org.apache.pig.tools.pigstats.ScriptState – Pig features used in the script: GROUP_BY
    2013-10-14 14:22:36,559 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler – File concatenation threshold: 100 optimistic? false
    2013-10-14 14:22:36,580 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.CombinerOptimizer – Choosing to move algebraic foreach to combiner
    2013-10-14 14:22:36,606 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer – MR plan size before optimization: 1
    2013-10-14 14:22:36,606 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer – MR plan size after optimization: 1
    2013-10-14 14:22:36,651 [main] INFO org.apache.pig.tools.pigstats.ScriptState – Pig script settings are added to the job
    2013-10-14 14:22:36,672 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler – mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
    2013-10-14 14:22:36,675 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler – Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
    2013-10-14 14:22:36,677 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator – BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=93
    2013-10-14 14:22:36,677 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler – Setting Parallelism to 1
    2013-10-14 14:22:36,709 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler – Setting up single store job
    2013-10-14 14:22:36,722 [main] INFO org.apache.pig.data.SchemaTupleFrontend – Key [pig.schematuple] is false, will not g

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #43365

    Sasi Kumar
    Participant

    hi
    i configuration hive centos 6.4

    how to find

    pig
    13/11/08 12:34:37 INFO pig.Main: Logging error messages to: /home/sasikumar/pig_1383894277625.log
    2013-11-08 12:34:37,806 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: file:///
    grunt>

    this error

    Collapse
    #40887

    Dave
    Moderator

    Hi,

    You can just run:

    pig /locationg/of/script/scriptname.pig

    Thanks

    Dave

    Collapse
Viewing 2 replies - 1 through 2 (of 2 total)