ptupitsyn commented on code in PR #3908:
URL: https://github.com/apache/ignite-3/pull/3908#discussion_r1639337516
##########
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.
Review Comment:
I don't think we should start the node as part of `create` call, the API
becomes confusing.
--
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]