Package org.apache.pig

Examples of org.apache.pig.PigServer.shutdown()


        pig.registerQuery("b = row_count_in_jar(a);");
        Iterator<Tuple> iter = pig.openIterator("b");

        assertTrue(((Long)iter.next().get(0))==5);

        pig.shutdown();
    }
}
View Full Code Here


        assertTrue("BytesWithoutPushdown was " + bytesWithoutPushdown +
                " and bytesWithPushdown was " + bytesWithPushdown,
                (bytesWithoutPushdown - bytesWithPushdown) > expectedBytesReadDiff);
        // Verify that results are same
        Util.checkQueryOutputs(pigServer_disabledRule.openIterator("C"), pigServer.openIterator("E"), expectedRows);
        pigServer_disabledRule.shutdown();

    }

    @Test
    public void testPredicatePushdownChar() throws Exception {
View Full Code Here

        LOG.info("Running pig script:\n" + query);
        pigServer.registerScript(new ByteArrayInputStream(query.getBytes()));

        pigServer.openIterator("a");
        pigServer.shutdown();
    }

    // See PIG-3039
    @Test
    public void testRegisterJarOverridePigJarPackages() throws IOException, ClassNotFoundException {
View Full Code Here

      Assert.assertEquals("Expected '1' rows; got '" + l.size() + "'", 1, l.size());
      int result = Integer.parseInt((String)l.get(0));
      Assert.assertEquals("Expected value '41'; got '" + result + "'", 41, result);
    }
    finally {
      server.shutdown();
    }
  }
  /**
   * Ensure Pig can read/write tinyint/smallint columns.
   */
 
View Full Code Here

                + "' using org.apache.pig.test.RegisteredJarVisibilityLoader();";
        LOG.info("Running pig script:\n" + query);
        pigServer.registerScript(new ByteArrayInputStream(query.getBytes()));

        pigServer.openIterator("a");
        pigServer.shutdown();
    }

    private static List<File> compile(File[] javaFiles) {
        LOG.info("Compiling: " + Arrays.asList(javaFiles));
View Full Code Here

        LOG.info("Running pig script:\n" + query);
        pigServer.registerScript(new ByteArrayInputStream(query.getBytes()));

        pigServer.openIterator("a");
        pigServer.shutdown();
    }

    // See PIG-3039
    @Test
    public void testRegisterJarOverridePigJarPackages() throws IOException, ClassNotFoundException {
View Full Code Here

      assertEquals(expected.size(), actual.size());
      for (Map.Entry<String, String> e : expected.entrySet()) {
        assertEquals(e.getValue(), actual.get(e.getKey()));
      }
    } finally {
      pig.shutdown();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.