Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMBARI-23010. Make solrIndexHelper.sh script to be able to run index migration against a snapshot #381

Merged
merged 2 commits into from Feb 17, 2018

Conversation

oleewere
Copy link
Contributor

What changes were proposed in this pull request?

solr index helper should support to work on snapshots as well
also added debug options to make to log verbose if it required

How was this patch tested?

Manually, create ranger collection (replica) backup, run index migration on that, upgrade solr, then restore the collection

please review @zeroflag @adoroszlai @swagle @kasakrisz

if [[ "$BACKUP_ENABLED" == "true" ]]; then
for SNAPSHOT_DIR in $(find $INDEX_DIR -maxdepth 1 -mindepth 1); do
if $(test -d ${SNAPSHOT_DIR}); then
name=$(echo $SNAPSHOT_DIR | sed -e 's/.*\///g')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name seems to be unused

find $c/data -maxdepth 1 -type d -name 'index*' | while read indexDir; do
echo "--------------------------------"
echo "Checking core $name - $abspath"
upgrade_core "$indexDir" "$FORCE_UPDATE" "$SOLR_CORE_FILTERS" "$LUCENE_VERSION" "$BACKUP_ENABLED" "$DEBUG_ENABLED"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 lines need +1 level of indentation.

@asfgit
Copy link

asfgit commented Feb 17, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/653/
Test FAILed.
Test FAILured.

@oleewere oleewere merged commit 57aa207 into apache:trunk Feb 17, 2018
@oleewere oleewere deleted the AMBARI-23010-trunk branch February 17, 2018 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants