Examples of CommandExecutor


Examples of org.apache.hadoop.cli.util.CommandExecutor

  }

  @Override
  protected CommandExecutor.Result execute(CLICommand cmd) throws Exception {
    if (cmd.getType() instanceof CLICommandFS) {
      CommandExecutor cmdExecutor = new FSCmdExecutor(nn, new FsShell(conf));
      return cmdExecutor.executeCommand(cmd.getCmd());
    } else {
      throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType());
    }
  }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.api.command.CommandExecutor

            };
            commands.add(command);
        }

        // execute the commands
        final CommandExecutor commandExecutor = new CommandExecutorImpl();
        ExecutorService executorService = Executors.newFixedThreadPool(numOfConcurrentThreads);
        final List<String> revisionIds = new LinkedList<String>();
        for (int i = 0; i < numOfConcurrentThreads; ++i) {
            final CommitCommandMongo command = commands.get(i);
            Runnable runnable = new Runnable() {

                @Override
                public void run() {
                    try {
                        String revisionId = commandExecutor.execute(command);
                        revisionIds.add(revisionId);
                    } catch (Exception e) {
                        revisionIds.add(null);
                    }
                }
View Full Code Here

Examples of org.apache.maven.dotnet.compiler.CommandExecutor

    }

    public File compile()
        throws InvalidArtifactException
    {
        CommandExecutor commandExecutor = CommandExecutor.Factory.createDefaultCommmandExecutor();
        commandExecutor.setLogger( compilerContext.getPlexusLogger() );
        try
        {
            commandExecutor.executeCommand( getCompilerFileName(), getCommands(), failOnErrorOutput() );
        }
        catch ( CompilerException e )
        {
            throw new InvalidArtifactException( e );
        }
View Full Code Here

Examples of org.apache.maven.wagon.CommandExecutor

           
            wagon.putDirectory( inputDirectory, "." );
           
            if ( chmod && wagon instanceof CommandExecutor )
            {
                CommandExecutor exec = (CommandExecutor) wagon;
                exec.executeCommand( "chmod " + chmodOptions + " " + chmodMode + " " + repository.getBasedir() );
            }
        }
        catch ( ResourceDoesNotExistException e )
        {
            throw new MojoExecutionException( "Error uploading site", e );
View Full Code Here

Examples of org.apache.tomee.webapp.command.CommandExecutor

    }

    @Override
    protected void onTextData(Reader in) throws IOException {
        final String params = readParam(in);
        final CommandExecutor executor = new CommandExecutor();

        final Map<String, Object> result = executor.execute(params);
        getOutputObject().writeTextMessage(CharBuffer.wrap(gson.toJson(result)));
    }
View Full Code Here

Examples of org.broad.igv.batch.CommandExecutor

        tstSearchEGFR(tracks);
    }

    @Test
    public void testBatchCommand_Error() throws Exception{
        CommandExecutor cmdexec = new CommandExecutor();
        String cmd = "org.broad.igv.tools.motiffinder.MotifFinderPlugin blarg " + EGFR_begseq;
        String resp = cmdexec.execute(cmd);
        assertTrue("Expected ERROR, was " + resp, resp.contains("ERROR"));

        assertEquals(2, IGV.getInstance().getVisibleTrackCount());
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.interceptor.CommandExecutor

  @Deployment
  public void testParseDiagramInterchangeElements() {

    // Graphical information is not yet exposed publicly, so we need to do some plumbing
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
      public ProcessDefinitionEntity execute(CommandContext commandContext) {
        return Context
          .getProcessEngineConfiguration()
          .getDeploymentCache()
          .findDeployedLatestProcessDefinitionByKey("myProcess");
View Full Code Here

Examples of org.camunda.bpm.engine.impl.interceptor.CommandExecutor

    }
  }

  @Deployment
  public void testParseNamespaceInConditionExpressionType() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
      public ProcessDefinitionEntity execute(CommandContext commandContext) {
        return Context
          .getProcessEngineConfiguration()
          .getDeploymentCache()
          .findDeployedLatestProcessDefinitionByKey("resolvableNamespacesProcess");
View Full Code Here

Examples of org.camunda.bpm.engine.impl.interceptor.CommandExecutor

  public void testDiagramCreationDisabled() {
    repositoryService.createDeployment().addClasspathResource("org/camunda/bpm/engine/test/bpmn/parse/BpmnParseTest.testParseDiagramInterchangeElements.bpmn20.xml").deploy();

    // Graphical information is not yet exposed publicly, so we need to do some plumbing
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
      public ProcessDefinitionEntity execute(CommandContext commandContext) {
        return Context.getProcessEngineConfiguration()
                      .getDeploymentCache()
                      .findDeployedLatestProcessDefinitionByKey("myProcess");
      }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.interceptor.CommandExecutor

      assertTextPresent("The process definition version must be positive: processDefinitionVersion is not positive", ae.getMessage());
    }
  }

  public void testSetProcessDefinitionVersionNonExistingPI() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    try {
      commandExecutor.execute(new SetProcessDefinitionVersionCmd("42", 23));
      fail("ProcessEngineException expected");
    } catch (ProcessEngineException ae) {
      assertTextPresent("No process instance found for id = '42'.", ae.getMessage());
    }
  }
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.