Package org.apache.pig

Examples of org.apache.pig.PigServer$SortInfoSetter


          .setProperty("hadoop.log.dir", new Path(base).toString() + "./logs");
    }

    if (execType == ExecType.MAPREDUCE) {
      cluster = MiniCluster.buildCluster();
      pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
    } else {
      pigServer = new PigServer(ExecType.LOCAL);
    }

    Configuration conf = new Configuration();
    FileSystem fs = cluster.getFileSystem();
    Path pathWorking = fs.getWorkingDirectory();
View Full Code Here


              + workingDir);
      System.exit(0);
    }

    if (whichCluster.equalsIgnoreCase("realCluster")) {
      pigServer = new PigServer(ExecType.MAPREDUCE, ConfigurationUtil
          .toProperties(conf));
      pigServer.registerJar(zebraJar);

    }

    if (whichCluster.equalsIgnoreCase("miniCluster")) {
      if (execType == ExecType.MAPREDUCE) {
        cluster = MiniCluster.buildCluster();
        pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        fs = cluster.getFileSystem();

      } else {
        pigServer = new PigServer(ExecType.LOCAL);
      }
    }
  }
View Full Code Here

          .setProperty("hadoop.log.dir", new Path(base).toString() + "./logs");
    }

    if (execType == ExecType.MAPREDUCE) {
      cluster = MiniCluster.buildCluster();
      pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
    } else {
      pigServer = new PigServer(ExecType.LOCAL);
    }

    conf = new Configuration();
    FileSystem fs = cluster.getFileSystem();
    Path pathWorking = fs.getWorkingDirectory();
View Full Code Here

    static MiniCluster cluster = MiniCluster.buildCluster();

    private PigServer pig ;

    public TestMapReduce2() throws Throwable {
        pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()) ;
    }
View Full Code Here

        }
       
        dat.close();
   
        try {
            pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        }
        catch (ExecException e) {
            IOException ioe = new IOException("Failed to create Pig server");
            ioe.initCause(e);
            throw ioe;
View Full Code Here

    // 
    //}

    @Before
    public void setUp() throws Exception{
        pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());

        //createWordCountJar();
    }
View Full Code Here

   
    private PigServer pigServer;
    private static MiniCluster cluster = MiniCluster.buildCluster();
   
    public TestSkewedJoin() throws ExecException, IOException{
        pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        // pigServer = new PigServer(ExecType.LOCAL);
        pigServer.getPigContext().getProperties().setProperty("pig.skewedjoin.reduce.maxtuple", "5");    
        pigServer.getPigContext().getProperties().setProperty("pig.skewedjoin.reduce.memusage", "0.01");
    }
View Full Code Here

        Assert.assertEquals(true, TestHelper.compareBags(dbfrj, dbshj));
    }   
   
    @Test
    public void testSkewedJoinWithNoProperties() throws IOException{
        pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());

        pigServer.registerQuery("A = LOAD '" + INPUT_FILE1 + "' as (id, name, n);");
        pigServer.registerQuery("B = LOAD '" + INPUT_FILE2 + "' as (id, name);");
        try {
            DataBag dbfrj = BagFactory.getInstance().newDefaultBag();
View Full Code Here

   
    @Before
    @Override
    public void setUp() throws Exception{
        FileLocalizer.setR(new Random());
        pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
//        pigServer = new PigServer(ExecType.LOCAL);
    }
View Full Code Here

   
    @Before
    @Override
    protected void setUp() throws Exception {
        //pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pig = new PigServer("local");
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.PigServer$SortInfoSetter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.