Package org.apache.continuum.builder.distributed.executor

Examples of org.apache.continuum.builder.distributed.executor.DistributedBuildTaskQueueExecutor


        {
            String agentGroup = getBuildAgentGroup( task );

            Map<String, DistributedBuildTaskQueueExecutor> executors = buildManager.getTaskQueueExecutors();

            DistributedBuildTaskQueueExecutor executor =  filterExecutors( agentGroup, executors );
            if ( executor != null )
            {
                log.info( "delegating task to build agent task queue executor: " + executor.getBuildAgentUrl() );
                executor.getQueue().put( task );
            }
            else
            {
                // task is added to deferred-queue , which will then be added back to distributed-queue
                // so as not to choke-off the distributed-queue.              
View Full Code Here


        taskQueueExecutors.remove( buildAgentUrl );
    }

    public boolean isBuildAgentBusy( String buildAgentUrl )
    {
        DistributedBuildTaskQueueExecutor executor = taskQueueExecutors.get( buildAgentUrl );

        if ( executor != null && executor.getCurrentTask() != null )
        {
            log.info( "build agent '" + buildAgentUrl + "' is busy" );
            return true;
        }
View Full Code Here

    private void addTaskQueueExecutor( String url )
        throws ContinuumException
    {
        try
        {
            DistributedBuildTaskQueueExecutor taskQueueExecutor = (DistributedBuildTaskQueueExecutor) container.
                lookup( DistributedBuildTaskQueueExecutor.class, "distributed-build-project" );
            taskQueueExecutor.setBuildAgentUrl( url );
            taskQueueExecutors.put( url, taskQueueExecutor );
        }
        catch ( ComponentLookupException e )
        {
            throw new ContinuumException( "Unable to lookup TaskQueueExecutor for distributed-build-project", e );
View Full Code Here

    }

    public void cancelDistributedBuild( String buildAgentUrl, int projectGroupId, String scmRootAddress )
        throws ContinuumException
    {
        DistributedBuildTaskQueueExecutor taskQueueExecutor = taskQueueExecutors.get( buildAgentUrl );

        if ( taskQueueExecutor != null )
        {
            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                if ( taskQueueExecutor.getCurrentTask() instanceof PrepareBuildProjectsTask )
                {
                    PrepareBuildProjectsTask currentTask = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask()
                        ;

                    if ( currentTask.getProjectGroupId() == projectGroupId &&
                        currentTask.getScmRootAddress().equals( scmRootAddress ) )
                    {
                        log.info( "cancelling task for project group " + projectGroupId + " with scm root address " +
                            scmRootAddress );
                        taskQueueExecutor.cancelTask( currentTask );

                        try
                        {
                            SlaveBuildAgentTransportClient client =
                                new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
View Full Code Here

    {
        Map<String, PrepareBuildProjectsTask> map = new HashMap<String, PrepareBuildProjectsTask>();

        for ( String url : taskQueueExecutors.keySet() )
        {
            DistributedBuildTaskQueueExecutor taskQueueExecutor = taskQueueExecutors.get( url );

            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                PrepareBuildProjectsTask task = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask();

                map.put( url, task );
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.continuum.builder.distributed.executor.DistributedBuildTaskQueueExecutor

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.