Skip to content
Permalink
Browse files
AMBARI-23649. Upgrade Solr version from 7.2.1 to 7.3.0
  • Loading branch information
oleewere committed Apr 21, 2018
1 parent ac751f0 commit 4b387e496457b00df9ec390af33bd7cc9b34cdfc
Showing 6 changed files with 9 additions and 9 deletions.
@@ -27,7 +27,7 @@ services:
ZOO_SERVERS: server.1=zookeeper:2888:3888
solr:
# TODO: use infra-solr
image: solr:${SOLR_VERSION:-7.2.1}
image: solr:${SOLR_VERSION:-7.3.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.2.1
SOLR_VERSION=7.3.0
HADOOP_VERSION=3.0.0
EOF
@@ -222,7 +222,7 @@ def backup(options, accessor, parser):
parser.add_option("--backup-name", dest="backup_name", type="string", help="backup name of the index")
parser.add_option("--collection", dest="collection", type="string", help="solr collection")

parser.add_option("--version", dest="index_version", type="string", default="6.6.2", help="lucene index version for migration (6.6.2 or 7.2.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.3.0)")
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")
parser.add_option("--request-async", dest="async", action="store_true", default=False, help="skip BACKUP/RESTORE status api calls from the command")
@@ -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.2.1)
-v, --version Lucene version to upgrade (default: 6.6.2, available: 6.6.2, 7.3.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.2.1"}
local LUCENE_VERSION=${4:?"usage <lucene_index_version> e.g.: 7.3.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")
@@ -198,12 +198,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.2.1)"}
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.3.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.2.1)"}
: ${INDEX_VERSION:?"Please set the INDEX_VERSION variable! (6.6.2 or 7.3.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.2.1
SOLR_VERSION=7.3.0
EOF
}

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

<properties>
<jdk.version>1.8</jdk.version>
<solr.version>7.2.1</solr.version>
<solr.version>7.3.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 4b387e4

Please sign in to comment.