Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.Resource


                    disk.setKind(((GccTemplate) stack.getTemplate()).getGccRawDiskType().getUrl(po.getProjectId(), gccTemplate.getGccZone()));
                    Compute.Disks.Insert insDisk = po.getCompute().disks().insert(po.getProjectId(), gccTemplate.getGccZone().getValue(), disk);
                    insDisk.execute();
                    GccDiskReadyPollerObject gccDiskReady = new GccDiskReadyPollerObject(po.getCompute(), stack, value);
                    gccDiskReadyPollerObjectPollingService.pollWithTimeout(gccDiskCheckerStatus, gccDiskReady, POLLING_INTERVAL, MAX_POLLING_ATTEMPTS);
                    return new Resource(resourceType(), value, stack);
                }
            });
            futures.add(submit);
        }
        for (Future<Resource> future : futures) {
View Full Code Here


        Compute.Disks.Insert insDisk = po.getCompute().disks().insert(po.getProjectId(), template.getGccZone().getValue(), disk);
        insDisk.setSourceImage(GccImageType.DEBIAN_HACK.getAmbariUbuntu(po.getProjectId()));
        insDisk.execute();
        GccDiskReadyPollerObject gccDiskReady = new GccDiskReadyPollerObject(po.getCompute(), stack, name);
        gccDiskReadyPollerObjectPollingService.pollWithTimeout(gccDiskCheckerStatus, gccDiskReady, POLLING_INTERVAL, MAX_POLLING_ATTEMPTS);
        return Arrays.asList(new Resource(resourceType(), name, stack));
    }
View Full Code Here

        instancesResult = ServiceTestUtils.createDescribeInstanceResult();
    }

    public Set<Resource> getDefaultResourceSet() {
        Set<Resource> resources = new HashSet<>();
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, ConnectorTestUtil.CF_STACK_NAME, stack));
        return resources;
    }
View Full Code Here

    @Ignore
    public void testGetYarnSiteConfigsShouldReturnDirectoriesProperlyWithTwoVolumes() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, String> result = underTest.getConfiguration(stack).get(HadoopConfigurationService.YARN_SITE);
        // THEN
        assertEquals("/mnt/fs1,/mnt/fs2", result.get(HadoopConfigurationService.YARN_NODEMANAGER_LOCAL_DIRS));
        assertEquals("/mnt/fs1,/mnt/fs2", result.get(HadoopConfigurationService.YARN_NODEMANAGER_LOG_DIRS));
View Full Code Here

    @Ignore
    public void testGetYarnSiteConfigsShouldReturnNotReturnYarnLocalDirsPropertyWhenThereAreNoVolumesAttached() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, Map<String, String>> configuration = underTest.getConfiguration(stack);
        // THEN
        assertEquals(0, configuration.size());
    }
View Full Code Here

    @Ignore
    public void testGetHdfsSiteConfigsShouldReturnDirectoriesProperlyWithTwoVolumes() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, String> result = underTest.getConfiguration(stack).get(HadoopConfigurationService.HDFS_SITE);
        // THEN
        assertEquals("/mnt/fs1,/mnt/fs2", result.get(HadoopConfigurationService.HDFS_DATANODE_DATA_DIRS));
    }
View Full Code Here

    @Ignore
    public void testGetHdfsSiteConfigsShouldNotReturnHdfsDatanodeDataDirsPropertyWhenThereAreNoVolumesAttached() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, Map<String, String>> configuration = underTest.getConfiguration(stack);
        // THEN
        assertEquals(0, configuration.size());
    }
View Full Code Here

    @Before
    public void setUp() {
        underTest = new MetadataSetupContext();
        MockitoAnnotations.initMocks(this);
        stack = new Stack();
        stack.getResources().add(new Resource(ResourceType.CLOUDFORMATION_STACK, "stack", stack));
    }
View Full Code Here

        stack = ServiceTestUtils.createStack(template, credential, getDefaultResourceSet());
    }

    public Set<Resource> getDefaultResourceSet() {
        Set<Resource> resources = new HashSet<>();
        resources.add(new Resource(ResourceType.AZURE_CLOUD_SERVICE, DUMMY_VM_NAME, stack));
        resources.add(new Resource(ResourceType.AZURE_VIRTUAL_MACHINE, DUMMY_VM_NAME, stack));
        return resources;
    }
View Full Code Here

    public void setUp() {
        underTest = new AwsConnector();
        MockitoAnnotations.initMocks(this);
        credential = ServiceTestUtils.createCredential(CloudPlatform.AWS);
        Set<Resource> resources = new HashSet<>();
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        stack = ServiceTestUtils.createStack(ServiceTestUtils.createTemplate(CloudPlatform.AWS), credential, resources);
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.domain.Resource

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.