Create root dir before logging config
@@ -72,12 +72,13 @@ public class QuestMetricsDb extends AbstractComponent implements MetricsDb {
if (dataDir.startsWith(Defaults.getDefaults().vespaHome())
&& ! new File(Defaults.getDefaults().vespaHome()).exists())
dataDir = "data"; // We're injected, but not on a node with Vespa installed
- this.dataDir = dataDir;
-
+ IOUtils.createDirectory(dataDir);
// silence Questdb's custom logging system
IOUtils.writeFile(new File(dataDir, "quest-log.conf"), new byte[0]);
System.setProperty("out", dataDir + "/quest-log.conf");
CairoConfiguration configuration = new DefaultCairoConfiguration(dataDir);
+
+ this.dataDir = dataDir;
engine = new CairoEngine(configuration);
sqlCompiler = ThreadLocal.withInitial(() -> new SqlCompiler(engine));
nodeTable = new Table(dataDir, "metrics", clock);
