Class Ignite2ClusterContainer

java.lang.Object
org.apache.ignite.migrationtools.tests.containers.Ignite2ClusterContainer
All Implemented Interfaces:
AutoCloseable, org.testcontainers.lifecycle.Startable

public class Ignite2ClusterContainer extends Object implements org.testcontainers.lifecycle.Startable
Container of an Ignite 2 cluster.
  • Field Details

    • network

      public final org.testcontainers.containers.Network network
  • Constructor Details

    • Ignite2ClusterContainer

      public Ignite2ClusterContainer(Path cfgFilePath, @Nullable @Nullable Path storagePathOnHost, List<String> nodeIds)
    • Ignite2ClusterContainer

      public Ignite2ClusterContainer(org.testcontainers.containers.Network network, Path cfgFilePath, @Nullable @Nullable Path storagePathOnHost, List<String> nodeIds)
      Constructor.
      Parameters:
      network - Network.
      cfgFilePath - Configuration Path.
      storagePathOnHost - Storage path mounted on the host.
      nodeIds - List of node consistent ids.
  • Method Details

    • getNetwork

      public org.testcontainers.containers.Network getNetwork()
    • start

      public void start()
      Specified by:
      start in interface org.testcontainers.lifecycle.Startable
    • stop

      public void stop()
      Specified by:
      stop in interface org.testcontainers.lifecycle.Startable
    • doStop

      public void doStop(boolean waitForCheckpoints)
      Stop the cluster.
      Parameters:
      waitForCheckpoints - Whether should wait for checkpoints to be finished or not.
    • waitForNextCheckpoint

      public void waitForNextCheckpoint() throws InterruptedException
      Waits for the next checkpoint to happen.

      TODO: https://issues.apache.org/jira/browse/IGNITE-26177

      Throws:
      InterruptedException - when the thread was interrupted while waiting.
    • thinClientMappedPort

      public int thinClientMappedPort()
      Returns host's port which can be used for thin client connection.
      Returns:
      Host's port for thin client connection.
    • dockerHost

      public String dockerHost()
      Returns docker host address.
      Returns:
      Docker host address.