Search in sources :

Example 66 with Container

use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Container in project pravega by pravega.

the class PravegaSegmentStoreService method createPravegaSegmentStoreApp.

private App createPravegaSegmentStoreApp() {
    App app = new App();
    app.setId(this.id);
    app.setCpus(cpu);
    app.setMem(mem);
    app.setInstances(instances);
    // set constraints
    app.setConstraints(setConstraint("hostname", "UNIQUE"));
    // docker container
    app.setContainer(new Container());
    app.getContainer().setType(CONTAINER_TYPE);
    app.getContainer().setDocker(new Docker());
    // set the image and network
    app.getContainer().getDocker().setImage(IMAGE_PATH + "/nautilus/pravega:" + PRAVEGA_VERSION);
    // set port
    app.setPortDefinitions(Arrays.asList(createPortDefinition(SEGMENTSTORE_PORT)));
    app.setRequirePorts(true);
    // healthchecks
    List<HealthCheck> healthCheckList = new ArrayList<HealthCheck>();
    healthCheckList.add(setHealthCheck(300, "TCP", false, 60, 20, 0, SEGMENTSTORE_PORT));
    app.setHealthChecks(healthCheckList);
    // set env
    String zk = zkUri.getHost() + ":" + ZKSERVICE_ZKPORT;
    // Environment variables to configure SS service.
    Map<String, Object> map = new HashMap<>();
    map.put("ZK_URL", zk);
    map.put("BK_ZK_URL", zk);
    map.put("CONTROLLER_URL", conUri.toString());
    getCustomEnvVars(map, SEGMENTSTORE_EXTRA_ENV);
    // Properties set to override defaults for system tests
    String hostSystemProperties = "-Xmx1024m" + buildSystemProperty("autoScale.muteInSeconds", "120") + buildSystemProperty("autoScale.cooldownInSeconds", "120") + buildSystemProperty("autoScale.cacheExpiryInSeconds", "120") + buildSystemProperty("autoScale.cacheCleanUpInSeconds", "120") + buildSystemProperty("log.level", "DEBUG") + buildSystemProperty("log.dir", "$MESOS_SANDBOX/pravegaLogs") + buildSystemProperty("curator-default-session-timeout", String.valueOf(30 * 1000)) + buildSystemProperty("hdfs.replaceDataNodesOnFailure", "false");
    map.put("PRAVEGA_SEGMENTSTORE_OPTS", hostSystemProperties);
    app.setEnv(map);
    app.setArgs(Arrays.asList("segmentstore"));
    return app;
}
Also used : App(mesosphere.marathon.client.model.v2.App) Container(mesosphere.marathon.client.model.v2.Container) Docker(mesosphere.marathon.client.model.v2.Docker) HashMap(java.util.HashMap) HealthCheck(mesosphere.marathon.client.model.v2.HealthCheck) ArrayList(java.util.ArrayList)

Example 67 with Container

use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Container in project platinum by hartwigmedical.

the class KubernetesEngineTest method setup.

@Before
public void setup() {
    final Projects projects = mock(Projects.class);
    processRunner = mock(ProcessRunner.class);
    final Container container = mock(Container.class);
    locations = mock(Locations.class);
    clusters = mock(Clusters.class);
    when(container.projects()).thenReturn(projects);
    when(projects.locations()).thenReturn(locations);
    when(locations.clusters()).thenReturn(clusters);
    when(processRunner.execute(anyList())).thenReturn(true);
    victim = new KubernetesEngine(container, processRunner, CONFIGURATION);
}
Also used : Container(com.google.api.services.container.v1beta1.Container) Locations(com.google.api.services.container.v1beta1.Container.Projects.Locations) Clusters(com.google.api.services.container.v1beta1.Container.Projects.Locations.Clusters) Projects(com.google.api.services.container.v1beta1.Container.Projects) Before(org.junit.Before)

Example 68 with Container

use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Container in project WildChests by BG-Software-LLC.

the class NMSInventory_v1_12_R1 method openPage.

@Override
public void openPage(Player player, com.bgsoftware.wildchests.objects.inventory.CraftWildInventory inventory) {
    EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    String title = inventory.getTitle();
    Container container = createContainer(entityPlayer.inventory, entityPlayer, inventory);
    container.windowId = entityPlayer.nextContainerCounter();
    TileEntityWildChest tileEntityWildChest = getTileEntity(inventory.getOwner());
    entityPlayer.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, tileEntityWildChest.getContainerName(), new ChatComponentText(title), inventory.getSize()));
    entityPlayer.activeContainer = container;
    entityPlayer.activeContainer.addSlotListener(entityPlayer);
}
Also used : Container(net.minecraft.server.v1_12_R1.Container) TileEntityContainer(com.bgsoftware.wildchests.objects.containers.TileEntityContainer) EntityPlayer(net.minecraft.server.v1_12_R1.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer) PacketPlayOutOpenWindow(net.minecraft.server.v1_12_R1.PacketPlayOutOpenWindow) ChatComponentText(net.minecraft.server.v1_12_R1.ChatComponentText)

Example 69 with Container

use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Container in project WildChests by BG-Software-LLC.

the class NMSInventory_v1_8_R3 method openPage.

@Override
public void openPage(Player player, com.bgsoftware.wildchests.objects.inventory.CraftWildInventory inventory) {
    EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    String title = inventory.getTitle();
    Container container = createContainer(entityPlayer.inventory, entityPlayer, inventory);
    container.windowId = entityPlayer.nextContainerCounter();
    TileEntityWildChest tileEntityWildChest = getTileEntity(inventory.getOwner());
    entityPlayer.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, tileEntityWildChest.getContainerName(), new ChatComponentText(title), inventory.getSize()));
    entityPlayer.activeContainer = container;
    entityPlayer.activeContainer.addSlotListener(entityPlayer);
}
Also used : TileEntityContainer(com.bgsoftware.wildchests.objects.containers.TileEntityContainer) Container(net.minecraft.server.v1_8_R3.Container) EntityPlayer(net.minecraft.server.v1_8_R3.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer) PacketPlayOutOpenWindow(net.minecraft.server.v1_8_R3.PacketPlayOutOpenWindow) ChatComponentText(net.minecraft.server.v1_8_R3.ChatComponentText)

Example 70 with Container

use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Container in project eclipselink by eclipse-ee4j.

the class ClassLevelTestCases method getControlObject.

@Override
public Object getControlObject() {
    Container container = new Container();
    container.setContainerProperty(Unmappable.getInstance("aaa"));
    return container;
}
Also used : Container(org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmladapter.unmappable.package1.Container)

Aggregations

ItemStack (org.bukkit.inventory.ItemStack)45 Container (net.minecraft.server.v1_12_R1.Container)9 Container (net.minecraft.server.v1_16_R3.Container)9 Container (org.flyte.api.v1.Container)9 FailedNbt (com.ruinscraft.panilla.api.exception.FailedNbt)8 INbtTagCompound (com.ruinscraft.panilla.api.nbt.INbtTagCompound)8 Container (net.minecraft.server.v1_11_R1.Container)8 Container (net.minecraft.server.v1_14_R1.Container)8 Container (net.minecraft.server.v1_15_R1.Container)8 Container (net.minecraft.server.v1_16_R1.Container)8 Container (net.minecraft.server.v1_16_R2.Container)8 Container (net.minecraft.server.v1_8_R3.Container)8 Container (net.minecraft.server.v1_13_R1.Container)7 Container (net.minecraft.server.v1_13_R2.Container)6 Container (net.minecraft.server.v1_10_R1.Container)5 EntityPlayer (net.minecraft.server.v1_8_R3.EntityPlayer)5 SelfContainer (io.github.bananapuncher714.crafters.implementation.v1_11_R1.ContainerManager_v1_11_R1.SelfContainer)4 EntityPlayer (net.minecraft.server.v1_10_R1.EntityPlayer)4 EntityPlayer (net.minecraft.server.v1_11_R1.EntityPlayer)4 EntityPlayer (net.minecraft.server.v1_12_R1.EntityPlayer)4