epugh commented on code in PR #5306:
URL: https://github.com/apache/solr/pull/5306#discussion_r4514520109


##########
solr/core/src/java/org/apache/solr/cli/RunExampleTool.java:
##########
@@ -588,20 +608,494 @@ void initDirs(
       String solrHomeProp = EnvUtils.getProperty("solr.home");
       if (solrHomeProp != null && !solrHomeProp.isEmpty()) {
         solrHomeDir = Path.of(solrHomeProp);
-      } else if ("cloud".equals(exampleType)) {
-        solrHomeDir = exampleDir.resolve("cloud");
+      } else if ("cloud".equals(exampleType) || "secure".equals(exampleType)) {
+        solrHomeDir = exampleDir.resolve(exampleType);
         if (!Files.isDirectory(solrHomeDir)) 
Files.createDirectory(solrHomeDir);
       } else {
         solrHomeDir = serverDir.resolve("solr");
       }
     }
+    if ("secure".equals(exampleType)) Files.createDirectories(solrHomeDir);
     if (!Files.isDirectory(solrHomeDir))
       throw new IllegalArgumentException(
           "Value of --solr-home option is invalid! "
               + solrHomeDir.toAbsolutePath()
               + " is not a directory!");
   }
 
+  /** Runs the manual security tutorial using the distribution's existing 
commands. */
+  void runSecureExample(CloudExampleParams params, boolean userManaged) throws 
Exception {
+    StartSolrParams start = params.start();
+    if (userManaged || params.zkHost() != null) {
+      throw new IllegalArgumentException(
+          "The secure example requires its own embedded ZooKeeper in SolrCloud 
mode.");
+    }
+    if (start.host() != null
+        || start.jvmOpts() != null

Review Comment:
   answered that only certain ones make sense.   I think there is a refactor of 
RunExampleTool in the future!



-- 
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]

Reply via email to