Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 4903cff

Browse files
authored
Merge pull request #104 from rish1397/srivasri-addingKNN-tar
Srivasri adding knn tar
2 parents 77ceb24 + 9e9e701 commit 4903cff

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

elasticsearch/linux_distributions/opendistro-tar-build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-$ES_
2323
tar -xzf elasticsearch-oss-$ES_VERSION-linux-x86_64.tar.gz
2424
rm -rf elasticsearch-oss-$ES_VERSION-linux-x86_64.tar.gz
2525
#Install Plugin
26-
for plugin_path in opendistro-sql/opendistro_sql-$OD_PLUGINVERSION.zip opendistro-alerting/opendistro_alerting-$OD_PLUGINVERSION.zip opendistro-job-scheduler/opendistro-job-scheduler-$OD_PLUGINVERSION.zip opendistro-security/opendistro_security-$OD_PLUGINVERSION.zip performance-analyzer/opendistro_performance_analyzer-$OD_PLUGINVERSION.zip opendistro-index-management/opendistro_index_management-$OD_PLUGINVERSION.zip;
26+
for plugin_path in opendistro-sql/opendistro_sql-$OD_PLUGINVERSION.zip opendistro-alerting/opendistro_alerting-$OD_PLUGINVERSION.zip opendistro-job-scheduler/opendistro-job-scheduler-$OD_PLUGINVERSION.zip opendistro-security/opendistro_security-$OD_PLUGINVERSION.zip performance-analyzer/opendistro_performance_analyzer-$OD_PLUGINVERSION.zip opendistro-index-management/opendistro_index_management-$OD_PLUGINVERSION.zip opendistro-knn/opendistro-knn-$OD_PLUGINVERSION.zip;
2727
do
2828
elasticsearch-$ES_VERSION/bin/elasticsearch-plugin install --batch "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/$plugin_path"; \
2929
done
@@ -33,7 +33,7 @@ mv elasticsearch-$ES_VERSION $PACKAGE-$OD_VERSION
3333

3434
echo "validating that plugins has been installed"
3535
basedir=$PWD/$PACKAGE-$OD_VERSION/plugins
36-
arr=("$basedir/opendistro-job-scheduler" "$basedir/opendistro_alerting" "$basedir/opendistro_performance_analyzer" "$basedir/opendistro_security" "$basedir/opendistro_sql" "$basedir/opendistro_index_management")
36+
arr=("$basedir/opendistro-job-scheduler" "$basedir/opendistro_alerting" "$basedir/opendistro_performance_analyzer" "$basedir/opendistro_security" "$basedir/opendistro_sql" "$basedir/opendistro_index_management" "$basedir/opendistro-knn")
3737
for d in "${arr[@]}"; do
3838
echo "$d"
3939
if [ -d "$d" ]; then

elasticsearch/linux_distributions/opendistro-tar-install.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$ES_HOME/plugins/opendistro_perfor
2727

2828
ES_MAIN_CLASS="com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerApp" \
2929
ES_ADDITIONAL_CLASSPATH_DIRECTORIES=plugins/opendistro_performance_analyzer \
30-
ES_JAVA_OPTS=$PA_AGENT_JAVA_OPTS
30+
ES_JAVA_OPTS=$PA_AGENT_JAVA_OPTS
3131

3232
if ! grep -q '## OpenDistro Performance Analyzer' $ES_HOME/config/jvm.options; then
3333
CLK_TCK=`/usr/bin/getconf CLK_TCK`
@@ -39,5 +39,17 @@ if ! grep -q '## OpenDistro Performance Analyzer' $ES_HOME/config/jvm.options; t
3939
fi
4040
echo "done plugins"
4141

42+
#Move k-NN library in the /usr/lib
43+
echo "Fetching kNN library"
44+
FILE=/usr/lib/libKNNIndexV1_7_3_6.so
45+
if sudo test -f "$FILE"; then
46+
echo "FILE EXISTS: removing $FILE"
47+
sudo rm $FILE
48+
fi
49+
wget https://d3g5vo6xdbdb9a.cloudfront.net/downloads/k-NN-lib/libKNNIndexV1_7_3_6.zip \
50+
&& unzip libKNNIndexV1_7_3_6.zip \
51+
&& sudo mv libKNNIndexV1_7_3_6.so /usr/lib \
52+
&& rm libKNNIndexV1_7_3_6.zip
53+
4254
##Start Elastic Search
4355
bash $ES_HOME/bin/elasticsearch "$@"

0 commit comments

Comments
 (0)