You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/08/05 13:40:04 UTC

[GitHub] [accumulo] milleruntime commented on a diff in pull request #2850: Make Mini call initialize code directly

milleruntime commented on code in PR #2850:
URL: https://github.com/apache/accumulo/pull/2850#discussion_r938826284


##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java:
##########
@@ -581,13 +581,16 @@ public synchronized void start() throws IOException, InterruptedException {
         }
 
         log.warn("Initializing ZooKeeper");
-        try (var vm = VolumeManagerImpl.get(siteConfig, config.getHadoopConfiguration())) {
+        var hadoopConfig = new Configuration(false);
+        File csFile = new File(config.getConfDir(), "core-site.xml");
+        hadoopConfig.addResource(csFile.toURI().toURL());
+
+        try (var vm = VolumeManagerImpl.get(siteConfig, hadoopConfig)) {
           log.info("Calling init with {}", args);
           Initialize init = new Initialize();
           Initialize.Opts opts = new Initialize.Opts();
           opts.parseArgs("accumulo init", args.toArray(new String[0]));
-          InitialConfiguration initConfig =
-              new InitialConfiguration(config.getHadoopConfiguration(), siteConfig);
+          InitialConfiguration initConfig = new InitialConfiguration(hadoopConfig, siteConfig);

Review Comment:
   I think I figured it out. The ones that override `configureMiniCluster()` will write out a core-site.xml. The other ones don't so I just need to check if the file exists.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org