pauloricardomg commented on code in PR #277:
URL: https://github.com/apache/cassandra-sidecar/pull/277#discussion_r2677701368
##########
server/src/main/java/org/apache/cassandra/sidecar/lifecycle/ProcessLifecycleProvider.java:
##########
@@ -18,38 +18,354 @@
package org.apache.cassandra.sidecar.lifecycle;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.cassandra.sidecar.cluster.instance.InstanceMetadata;
+import org.apache.cassandra.sidecar.exceptions.ConfigurationException;
+import org.jetbrains.annotations.VisibleForTesting;
/**
- * A {@link LifecycleProvider} that manages Cassandra instances as OS
processes.
- * <p>
- * This implementation is a placeholder and is not yet implemented.
+ * Manage the lifecycle of Cassandra instances running on local processes
*/
public class ProcessLifecycleProvider implements LifecycleProvider
{
+ static final String OPT_CASSANDRA_HOME = "cassandra_home";
+ static final String OPT_CASSANDRA_CONF_DIR = "cassandra_conf_dir";
+ static final String OPT_CASSANDRA_LOG_DIR = "cassandra_log_dir";
+ static final String OPT_STATE_DIR = "state_dir";
+
+ protected static final Logger LOG =
LoggerFactory.getLogger(ProcessLifecycleProvider.class);
+ public static final long CASSANDRA_PROCESS_TIMEOUT_MS =
Long.getLong("cassandra.sidecar.lifecycle.process.timeout.ms", 120_000L);
Review Comment:
no reason, extracted to configuration on
60c6d47d15581d36ecb785865a0041aecc71ba47
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]