ptupitsyn commented on code in PR #3908:
URL: https://github.com/apache/ignite-3/pull/3908#discussion_r1639336262
##########
modules/runner/src/main/java/org/apache/ignite/EmbeddedNode.java:
##########
@@ -52,40 +57,88 @@ public interface Ignition {
* @param workDir Work directory for the started node. Must not be {@code
null}.
* @param serviceLoaderClassLoader The class loader to be used to load
provider-configuration files and provider classes, or {@code
* null} if the system class loader (or, failing that, the bootstrap class
loader) is to be used
- * @return CompletableFuture that resolves to an Ignite node after all
components are started and the cluster initialization is
- * complete.
*/
- CompletableFuture<Ignite> start(
+ static EmbeddedNode create(
String nodeName,
Path configPath,
Path workDir,
@Nullable ClassLoader serviceLoaderClassLoader
- );
+ ) {
+ EmbeddedNode embeddedNode = new EmbeddedNodeImpl(nodeName, configPath,
workDir, serviceLoaderClassLoader);
+ embeddedNode.start(); // Ignite future is kept inside this instance
and will be returned from the igniteAsync.
+ return embeddedNode;
+ }
+
+ /**
+ * Returns the Ignite API. The API is available when the node has joined
an initialized cluster.
+ *
+ * @return Ignite API future.
+ */
+ CompletableFuture<Ignite> igniteAsync();
Review Comment:
This method returns a future that will never complete if I don't call
`initClusterAsync`, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]