[
https://issues.apache.org/jira/browse/SOLR-17180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870033#comment-17870033
]
Christos Malliaridis commented on SOLR-17180:
---------------------------------------------
I've looked into the source code and found that
* there is an undocumented param ({{{}-s{}}})
* The logic is split into two files, some parts and argument validation logic
are in the shell script, and some in SolrSnapshotsTool.java (modules/hdfs)
* The script is using some hdfs commands for snapshot export preparation,
which is the only case where HDFS is explicitly required (arguments
--prepare-snapshot-export and --export)
We could probably abstract the HDFS logic so that snapshoting works without
HDFS (if that is a use case) and only use HDFS snapshoting if the HDFS module
is installed / configured. That way we can have a "bin/solr snapshot"
sub-command as Eric proposed. There is however a dependency to HDFS in the java
file related to "Path" as far as I saw that would require a workaround.
If the snapshoting should only work with HDFS we should at least move the
script from the server module to the HDFS module, since it is in that case
HDFS-specific.
Additionally, we should move any argument parsing logic to the java class, so
that the script is just an entry point and has no logic (if possible). Having
validation rules spread across multiple files is just error-prone.
> Figure out what snapshotscli.sh does and if we need it
> ------------------------------------------------------
>
> Key: SOLR-17180
> URL: https://issues.apache.org/jira/browse/SOLR-17180
> Project: Solr
> Issue Type: Sub-task
> Components: cli, hdfs
> Reporter: Eric Pugh
> Priority: Major
>
> There is a file in ./server/scripts/cloud-scripts/ called snapshotscli.sh.
> We have no documentation about it in the ref guide, and it appears to expose
> the class
> org.apache.solr.hdfs.snapshots.SolrSnapshotsTool.java
>
> Seems like this should be distributed as part of the hdfs Module, not buried
> way down deep inside of the core of Solr.
> Maybe it should be in ./modules/hdfs/bin directory? Or
> ./modules/hdfs/scripts directory in the Solr distribution?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]