Examples of exec()

Examples of org.apache.commons.exec.launcher.CommandLauncher.exec()

    CommandLauncher cl = CommandLauncherFactory.createVMLauncher();

    int exitValue = 0;

    try {
      Process p = cl.exec(cmdLine, null);
      new StreamLogger(
          String.format("%s (stdout)", stageGroup.getName()),
      new StreamLogger(
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.harness.Sed.exec()

        Sed hostSed = new Sed();
        InputStream sedIs = new ByteArrayInputStream(("substitute=localhost;" + hostName).getBytes("UTF-8"));
        hostSed.exec(tmpFile, orgFile, sedIs, false, false, false);   

  public static void main (String args[]) throws Exception
    if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9"))
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HBaseFsck.exec()

   * @throws Exception
  public static HBaseFsck doHFileQuarantine(Configuration conf, String table) throws Exception {
    String[] args = {"-sidelineCorruptHFiles", "-ignorePreCheckPermission", table};
    HBaseFsck hbck = new HBaseFsck(conf, exec);
    hbck.exec(exec, args);
    return hbck;

  public static void assertNoErrors(HBaseFsck fsck) throws Exception {
    List<ERROR_CODE> errs = fsck.getErrors().getErrorList();
View Full Code Here

Examples of org.apache.mahout.pig.encoders.EncodeVector.exec()

        t.set(0, 3.1);
        t.set(1, "foo bar");
        t.set(2, "");
        t.set(3, null);

        Vector v1 = PigVector.fromBytes(ev.exec(t));
        assertEquals(3.1, v1.get(10), 0);
        assertEquals(1.0, v1.get(39), 0);

        t.set(2, "fob");
View Full Code Here

Examples of org.apache.ode.bpel.engine.BpelDatabase.exec()

    private static <T> T dbexec(BpelDatabase.Callable<T> callable) throws ManagementException {
        try {
            BPELServerImpl bpelServer = (BPELServerImpl) BPELServiceComponent.getBPELServer();
            BpelDatabase bpelDb = bpelServer.getODEBPELServer().getBpelDb();
            return bpelDb.exec(callable);
        } catch (ManagementException me) {
            // Passthrough.
            throw me;
        } catch (Exception ex) {
            log.error("Exception during database operation", ex);
View Full Code Here

Examples of org.apache.pig.FilterFunc.exec()

        EvalFunc<DataAtom> count = new COUNT();
        FilterFunc isEmpty = new IsEmpty();
        assertTrue(output.numval() == 0);
        map.put("a", new DataAtom("a"));
View Full Code Here

Examples of org.apache.pig.builtin.ARITY.exec()

        // Test for ARITY function.
        // It is depricated but we still need to make sure it works
        ARITY arrity = new ARITY();
        expected = new Long(3);
        msg = "[Testing ARRITY on input type: Tuple]";
        assertTrue(msg, expected.equals(new Long(arrity.exec(t1))));

    /* End-to-end testing of the SIZE() builtin function for Tuple
View Full Code Here

Examples of org.apache.pig.builtin.AddDuration.exec()

        t2.set(1, "PT1M");
        Tuple t3 = TupleFactory.getInstance().newTuple(2);
        t3.set(0, new DateTime("2007-03-05T03:05:03.000Z"));
        t3.set(1, "P1D");
        assertEquals(func1.exec(t1), new DateTime("2009-01-07T01:07:02.000Z"));
        assertEquals(func1.exec(t2), new DateTime("2008-02-06T02:07:02.000Z"));
        assertEquals(func1.exec(t3), new DateTime("2007-03-06T03:05:03.000Z"));
        assertEquals(func2.exec(t1), new DateTime("2009-01-07T01:07:00.000Z"));
        assertEquals(func2.exec(t2), new DateTime("2008-02-06T02:05:02.000Z"));
        assertEquals(func2.exec(t3), new DateTime("2007-03-04T03:05:03.000Z"));
View Full Code Here

Examples of org.apache.pig.builtin.BagToString.exec()

  public void testNullInputBagToStringUDF() throws Exception {
    BagToString udf = new BagToString();
    Tuple udfInput = tf.newTuple(1);
    udfInput.set(0, null);
    String output = udf.exec(udfInput);

  public void testInvalidInputForBagToStringUDF() throws Exception {
View Full Code Here

Examples of org.apache.pig.builtin.BagToTuple.exec()

  public void testNullInputBagToTupleUDF() throws Exception {
    BagToTuple udf = new BagToTuple();
    Tuple udfInput = tf.newTuple(1);
    udfInput.set(0, null);
    Tuple output = udf.exec(udfInput);

  public void testBasicBagToTupleUDF() throws Exception {
View Full Code Here
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.