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


##########
solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java:
##########
@@ -75,36 +84,58 @@ public String getUsage() {
 
   @Override
   public void runImpl(CommandLine cli) throws Exception {
-    String zkHost = CLIUtils.getZkHost(cli);
-
     final String solrInstallDir = System.getProperty("solr.install.dir");
     Path solrInstallDirPath = Path.of(solrInstallDir);
 
     String confName = cli.getOptionValue(CONF_NAME_OPTION);
     String confDir = cli.getOptionValue(CONF_DIR_OPTION);
 
-    echoIfVerbose("\nConnecting to ZooKeeper at " + zkHost + " ...");
-    try (SolrZkClient zkClient = CLIUtils.getSolrZkClient(cli, zkHost)) {
-      final Path configsetsDirPath = 
CLIUtils.getConfigSetsDir(solrInstallDirPath);
-      Path confPath = ConfigSetService.getConfigsetPath(confDir, 
configsetsDirPath.toString());
+    final Path configsetsDirPath = 
CLIUtils.getConfigSetsDir(solrInstallDirPath);
+    Path confPath = ConfigSetService.getConfigsetPath(confDir, 
configsetsDirPath.toString());
+
+    echo("Uploading " + confPath.toAbsolutePath() + " for config " + confName 
+ " to Solr");
 
-      echo(
-          "Uploading "
-              + confPath.toAbsolutePath()
-              + " for config "
-              + confName
-              + " to ZooKeeper at "
-              + zkHost);
-      FileTypeMagicUtil.assertConfigSetFolderLegal(confPath);
-      ZkMaintenanceUtils.uploadToZK(
-          zkClient,
-          confPath,
-          ZkMaintenanceUtils.CONFIGS_ZKNODE + "/" + confName,
-          ZkMaintenanceUtils.UPLOAD_FILENAME_EXCLUDE_PATTERN);
+    FileTypeMagicUtil.assertConfigSetFolderLegal(confPath);
 
+    try (var solrClient = CLIUtils.getSolrClient(cli)) {
+      byte[] zipData = createZipData(confPath);
+      var request = new GenericV2SolrRequest(SolrRequest.METHOD.PUT, 
"/configsets/" + confName);

Review Comment:
   We have a SolrJ end point to use...   Need to dig into our annotations?



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