Skip to content
Permalink
Browse files
AMBARI-24480. Upgrade Infra Solr (from Solr 7.3.1 to Solr 7.4.0 (#2088)
  • Loading branch information
oleewere committed Aug 16, 2018
1 parent b4f8728 commit f9e22fb7649f0f73f63ba2097ac522d21eecd3cb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
@@ -27,7 +27,7 @@ services:
ZOO_SERVERS: server.1=zookeeper:2888:3888
solr:
# TODO: use infra-solr
image: solr:${SOLR_VERSION:-7.3.1}
image: solr:${SOLR_VERSION:-7.4.0}
restart: always
hostname: solr
ports:
@@ -72,7 +72,7 @@ AMBARI_LOCATION=$AMBARI_LOCATION
ZOOKEEPER_VERSION=3.4.10
ZOOKEEPER_CONNECTION_STRING=zookeeper:2181
SOLR_VERSION=7.3.1
SOLR_VERSION=7.4.0
HADOOP_VERSION=3.0.0
EOF
@@ -472,7 +472,7 @@ If the script finished successfully and everything looks green on Ambari UI as w
Migration for `ranger_audits` collection (cores):

```bash
# by default, you will mirate to Lucene 6.6.2, if you want to migrate again to Solr 7 (not requred), you can use --version 7.3.1 flag
# by default, you will mirate to Lucene 6.6.2, if you want to migrate again to Solr 7 (not requred), you can use --version 7.4.0 flag
/usr/lib/ambari-infra-solr-client/migrationHelper.py --ini-file $CONFIG_INI_LOCATION --action migrate -s RANGER
```

@@ -487,7 +487,7 @@ infra-lucene-index-tool upgrade-index -d /tmp/ranger-backup -f -b -g
# with 'infra-lucene-index-tool help' command you can checkout the command line options
```

By default, the tool will migrate from lucene version 5 to lucene version 6.6.2. (that's ok for Solr 7) If you want a lucene 7 index, you will need to re-run the migration tool command with `-v 7.3.1` option.
By default, the tool will migrate from lucene version 5 to lucene version 6.6.2. (that's ok for Solr 7) If you want a lucene 7 index, you will need to re-run the migration tool command with `-v 7.4.0` option.

#### <a id="v/2.-migrate-atlas-collections">VI/2. Migrate Atlas collections</a>

@@ -509,7 +509,7 @@ infra-lucene-index-tool upgrade-index -d /tmp/fulltext_index_backup -f -b -g
# with 'infra-lucene-index-tool help' command you can checkout the command line options
```

By default, the tool will migrate from lucene version 5 to lucene version 6.6.2. (that's ok for Solr 7) If you want a lucene 7 index, you will need to re-run the migration tool command with `-v 7.3.1` option.
By default, the tool will migrate from lucene version 5 to lucene version 6.6.2. (that's ok for Solr 7) If you want a lucene 7 index, you will need to re-run the migration tool command with `-v 7.4.0` option.

### <a id="vi.-restore-collections">VII. Restore Collections</a>

@@ -852,7 +852,7 @@ Options:
location of the index backups (for ranger). required
only if no backup path in the ini file
--version=INDEX_VERSION
lucene index version for migration (6.6.2 or 7.3.1)
lucene index version for migration (6.6.2 or 7.4.0)
--solr-async-request-tries=SOLR_ASYNC_REQUEST_TRIES
number of max tries for async Solr requests (e.g.:
delete operation)
@@ -1911,7 +1911,7 @@ def transfer_old_data(options, accessor, parser, config):
parser.add_option("--atlas-index-location", dest="atlas_index_location", type="string", help="location of the index backups (for atlas). required only if no backup path in the ini file")
parser.add_option("--ranger-index-location", dest="ranger_index_location", type="string", help="location of the index backups (for ranger). required only if no backup path in the ini file")

parser.add_option("--version", dest="index_version", type="string", default="6.6.2", help="lucene index version for migration (6.6.2 or 7.3.1)")
parser.add_option("--version", dest="index_version", type="string", default="6.6.2", help="lucene index version for migration (6.6.2 or 7.4.0)")
parser.add_option("--solr-async-request-tries", dest="solr_async_request_tries", type="int", default=400, help="number of max tries for async Solr requests (e.g.: delete operation)")
parser.add_option("--request-tries", dest="request_tries", type="int", help="number of tries for BACKUP/RESTORE status api calls in the request")
parser.add_option("--request-time-interval", dest="request_time_interval", type="int", help="time interval between BACKUP/RESTORE status api calls in the request")
@@ -43,15 +43,15 @@ function print_help() {
-b, --backup-enabled Use indexer tool with backup snapshots. (core filter won't be used)
-g, --debug Enable debug mode, IndexUpgrader output will be verbose.
-f, --force Force to start index upgrade, even is the version is at least 6.
-v, --version Lucene version to upgrade (default: 6.6.2, available: 6.6.2, 7.3.1)
-v, --version Lucene version to upgrade (default: 6.6.2, available: 6.6.2, 7.4.0)
EOF
}

function upgrade_core() {
local INDEX_DIR=${1:?"usage: <index_base_dir> e.g.: /opt/ambari_infra_solr/data"}
local FORCE_UPDATE=${2:?"usage <force_update_flag> e.g.: true"}
local SOLR_CORE_FILTERS=${3:?"usage: <comma separated core filters> e.g.: hadoop_logs,audit_logs,history"}
local LUCENE_VERSION=${4:?"usage <lucene_index_version> e.g.: 7.3.1"}
local LUCENE_VERSION=${4:?"usage <lucene_index_version> e.g.: 7.4.0"}
local BACKUP_MODE=${5:?"usage <backup_mode_enabled> e.g.: true"}
local DEBUG_MODE=${6:?"usage <debug_mode> e.g.: true"}
SOLR_CORE_FILTER_ARR=$(echo $SOLR_CORE_FILTERS | sed "s/,/ /g")
@@ -204,12 +204,12 @@ function upgrade_index() {

function upgrade_index_tool() {
# see: https://cwiki.apache.org/confluence/display/solr/IndexUpgrader+Tool
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.3.1)"}
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.4.0)"}
PATH=$JAVA_HOME/bin:$PATH $JVM -classpath "$DIR/migrate/lucene-core-$INDEX_VERSION.jar:$DIR/migrate/lucene-backward-codecs-$INDEX_VERSION.jar" org.apache.lucene.index.IndexUpgrader ${@}
}

function check_index_tool() {
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.3.1)"}
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.4.0)"}
PATH=$JAVA_HOME/bin:$PATH $JVM -classpath "$DIR/migrate/lucene-core-$INDEX_VERSION.jar:$DIR/migrate/lucene-backward-codecs-$INDEX_VERSION.jar" org.apache.lucene.index.CheckIndex ${@}
}

@@ -72,7 +72,7 @@ AMBARI_LOCATION=$AMBARI_LOCATION
ZOOKEEPER_VERSION=3.4.10
ZOOKEEPER_CONNECTION_STRING=zookeeper:2181
SOLR_VERSION=7.3.1
SOLR_VERSION=7.4.0
EOF
}

@@ -25,7 +25,7 @@

<properties>
<jdk.version>1.8</jdk.version>
<solr.version>7.3.1</solr.version>
<solr.version>7.4.0</solr.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<python.ver>python &gt;= 2.6</python.ver>
<deb.python.ver>python (&gt;= 2.6)</deb.python.ver>

0 comments on commit f9e22fb

Please sign in to comment.