Giriş
Şu satırı dahil ederiz
import org.apache.ignite.kubernetes.configuration.KubernetesConnectionConfiguration;
constructor - KubernetesConnectionConfiguration Örnek
Şöyle yaparız
IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setClientMode(true); cfg.setShutdownPolicy(ShutdownPolicy.GRACEFUL); KubernetesConnectionConfiguration connectionConfiguration = new KubernetesConnectionConfiguration(); connectionConfiguration.setNamespace(System.getenv("NAMESPACE")); connectionConfiguration.setServiceName(System.getenv("SERVICE_NAME")); TcpDiscoveryKubernetesIpFinder ipFinder = new TcpDiscoveryKubernetesIpFinder( connectionConfiguration); cfg.setMetricsLogFrequency(0); cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(ipFinder)); ignite = Ignition.start(cfg);
Hiç yorum yok:
Yorum Gönder