Examples of execute()


Examples of org.apache.hadoop.util.AsyncDiskService.execute()

    AsyncDiskService service = new AsyncDiskService(vols);
   
    int total = 100;
   
    for (int i = 0; i < total; i++) {
      service.execute(vols[i%2], new ExampleTask());
    }

    Exception e = null;
    try {
      service.execute("no_such_volume", new ExampleTask());
View Full Code Here

Examples of org.apache.hadoop.util.Shell.ShellCommandExecutor.execute()

     * @throws IOException
     */
    public void runScript(List<String> args, File dir) throws IOException {
      ShellCommandExecutor shexec =
              new ShellCommandExecutor(args.toArray(new String[0]), dir);
      shexec.execute();
      int exitCode = shexec.getExitCode();
      if (exitCode != 0) {
        throw new IOException("Task debug script exit with nonzero status of "
                              + exitCode + ".");
      }
View Full Code Here

Examples of org.apache.harmony.sql.internal.rowset.SyncResolverImpl.execute()

        } catch (UnsupportedOperationException e) {
            // expected
        }

        try {
            resolver.execute();
            fail("Should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
View Full Code Here

Examples of org.apache.hivemind.ant.ConstructRegistry.execute()

    {
        ConstructRegistry cr = create();

        try
        {
            cr.execute();
            unreachable();
        }
        catch (BuildException ex)
        {
            assertExceptionSubstring(ex, "You must specify an output file");
View Full Code Here

Examples of org.apache.hivemind.ant.ManifestClassPath.execute()

        pe = path.createPathElement();

        pe.setLocation(new File("src/java/org/apache/commons/hivemind/HiveMind.properties"));

        mcp.execute();

        assertEquals("hivemodule.xml HiveMind.properties", _project.getProperty("output"));
    }

    public void testDirectory() throws Exception
View Full Code Here

Examples of org.apache.http.benchmark.HttpBenchmark.execute()

            System.out.println("---------------------------------------------------------------");
            System.out.println(server.getName() + "; version: " + server.getVersion());
            System.out.println("---------------------------------------------------------------");
           
            HttpBenchmark ab = new HttpBenchmark(config);
            ab.execute();
            System.out.println("---------------------------------------------------------------");
        } finally {
            server.shutdown();           
        }
    }
View Full Code Here

Examples of org.apache.http.client.ClientRequestDirector.execute()

                    getRedirectHandler(),
                    getAuthenticationHandler(),
                    getParams());
        }

        HttpResponse  response = director.execute(roureq, context);
        // If the response depends on the connection, the director
        // will have set up an auto-release input stream.
        //@@@ or move that logic here into the client?

        //@@@ "finalize" response, to allow for buffering of entities?
View Full Code Here

Examples of org.apache.http.client.HttpClient.execute()

    HttpParams params = new BasicHttpParams();
    params.setParameter("http.default-headers", headers);

    HttpClient httpclient = new DefaultHttpClient(params);
    HttpGet httpget = new HttpGet("http://localhost:" + PORT + "/");
    HttpResponse response = httpclient.execute(httpget);
    List<String> expectedHeaders = Arrays.asList(new String[] {"Server", "Date", "Content-Length", "Etag", "Connection"});

    assertEquals(200, response.getStatusLine().getStatusCode());
    assertEquals(new ProtocolVersion("HTTP", 1, 1), response.getStatusLine().getProtocolVersion());
    assertEquals("OK", response.getStatusLine().getReasonPhrase());
View Full Code Here

Examples of org.apache.http.client.RequestDirector.execute()

                    getUserTokenHandler(),
                    determineParams(request));
        }

        try {
            return director.execute(target, request, execContext);
        } catch(HttpException httpException) {
            throw new ClientProtocolException(httpException);
        }
    } // execute
View Full Code Here

Examples of org.apache.http.client.fluent.Executor.execute()

            try {

                inputStream = replicationPackage.createInputStream();

                req = req.bodyStream(inputStream, ContentType.APPLICATION_OCTET_STREAM);
                response = executor.execute(req);
            } finally {
                IOUtils.closeQuietly(inputStream);
            }

            if (response != null) {
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.