epugh commented on code in PR #2381: URL: https://github.com/apache/solr/pull/2381#discussion_r1712672798
########## solr/core/src/java/org/apache/solr/cli/SnapshotPrepareExportTool.java: ########## @@ -0,0 +1,322 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cli; + +import java.io.IOException; +import java.io.PrintStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Option; +import org.apache.solr.client.solrj.SolrClient; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.impl.CloudSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.response.CollectionAdminResponse; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.params.CollectionAdminParams; +import org.apache.solr.common.util.NamedList; +import org.apache.solr.core.snapshots.CollectionSnapshotMetaData; +import org.apache.solr.core.snapshots.SolrSnapshotManager; + +/** + * Supports prepare-snapshot-export command in the bin/solr script. This command should only be used + * only if Solr is deployed with Hadoop and collection index files are stored on a shared + * file-system e.g. HDFS This class should probably be in the hdfs module. + */ +public class SnapshotPrepareExportTool extends ToolBase { + + public SnapshotPrepareExportTool() { + this(CLIO.getOutStream()); + } + + public SnapshotPrepareExportTool(PrintStream stdout) { + super(stdout); + } + + @Override + public String getName() { + return "snapshot-prepare-export"; + } + + @Override + public List<Option> getOptions() { Review Comment: Okay, in my most recent commits, I realized that I don't need this as a seperate class and I think I'm going to leave it in the `org.apache.solr.hdfs.snapshots.SolrSnapshotsTool` class so we don't add classes to core that depend on a module.. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org