You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by ea...@apache.org on 2020/11/24 21:19:25 UTC

[incubator-sdap-nexus] 01/01: Run pip install for deletebyquery.py in docker

This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch install-deletebyquery-in-image
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git

commit 9136e09cb7816dccf2a91131f22d6f9caedf8ee7
Author: Eamon Ford <ea...@gmail.com>
AuthorDate: Tue Nov 24 13:19:06 2020 -0800

    Run pip install for deletebyquery.py in docker
---
 docker/nexus-webapp/Dockerfile       |  5 ++++-
 tools/deletebyquery/deletebyquery.py | 10 +++++----
 tools/deletebyquery/requirements.txt | 42 ++++++++++++++++++------------------
 3 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/docker/nexus-webapp/Dockerfile b/docker/nexus-webapp/Dockerfile
index 92df8d4..ee9589d 100644
--- a/docker/nexus-webapp/Dockerfile
+++ b/docker/nexus-webapp/Dockerfile
@@ -82,6 +82,7 @@ RUN /tmp/install_nexusproto.sh $APACHE_NEXUSPROTO $APACHE_NEXUSPROTO_BRANCH
 
 COPY data-access /incubator-sdap-nexus/data-access
 COPY analysis /incubator-sdap-nexus/analysis
+COPY tools /incubator-sdap-nexus/tools
 
 WORKDIR /incubator-sdap-nexus/data-access
 RUN python setup.py install
@@ -89,7 +90,9 @@ RUN python setup.py install
 WORKDIR /incubator-sdap-nexus/analysis
 RUN python setup.py install
 
-COPY tools /incubator-sdap-nexus/tools
+WORKDIR /incubator-sdap-nexus/tools/deletebyquery
+RUN pip install -r requirements.txt
+RUN rm requirements.txt
 
 # Upgrade kubernetes client jar from the default version
 RUN rm /opt/spark/jars/kubernetes-client-4.1.2.jar
diff --git a/tools/deletebyquery/deletebyquery.py b/tools/deletebyquery/deletebyquery.py
index 6e24367..8ed70dd 100644
--- a/tools/deletebyquery/deletebyquery.py
+++ b/tools/deletebyquery/deletebyquery.py
@@ -201,14 +201,15 @@ def parse_args():
 
     parser.add_argument('--collection',
                         help='The name of the SOLR collection.',
-                        required=True,
+                        required=False,
+                        default='nexustiles',
                         metavar='nexustiles')
 
     parser.add_argument('--solrIdField',
                         help='The name of the unique ID field for this collection.',
                         required=False,
-                        default='solr_id_s',
-                        metavar='solr_id_s')
+                        default='id',
+                        metavar='id')
 
     parser.add_argument('--cassandra',
                         help='The hostname(s) or IP(s) of the Cassandra server(s).',
@@ -218,7 +219,8 @@ def parse_args():
 
     parser.add_argument('-k', '--cassandraKeyspace',
                         help='The Cassandra keyspace.',
-                        required=True,
+                        default='nexustiles',
+                        required=False,
                         metavar='nexustiles')
 
     group = parser.add_mutually_exclusive_group(required=True)
diff --git a/tools/deletebyquery/requirements.txt b/tools/deletebyquery/requirements.txt
index dc55df7..336c78e 100644
--- a/tools/deletebyquery/requirements.txt
+++ b/tools/deletebyquery/requirements.txt
@@ -1,22 +1,22 @@
-appnope==0.1.0
-backports.shutil-get-terminal-size==1.0.0
-cassandra-driver==3.9.0
-decorator==4.0.11
-enum34==1.1.6
-futures==3.1.1
-ipython==5.3.0
-ipython-genutils==0.2.0
-pathlib2==2.2.1
-pexpect==4.2.1
-pickleshare==0.7.4
-prompt-toolkit==1.0.14
-ptyprocess==0.5.1
-Pygments==2.2.0
-requests==2.13.0
-scandir==1.5
-semver==2.7.6
-simplegeneric==0.8.1
-six==1.10.0
+# appnope==0.1.0
+# backports.shutil-get-terminal-size==1.0.0
+# cassandra-driver==3.9.0
+# decorator==4.0.11
+# enum34==1.1.6
+# futures==3.1.1
+# ipython==5.3.0
+# ipython-genutils==0.2.0
+# pathlib2==2.2.1
+# pexpect==4.2.1
+# pickleshare==0.7.4
+# prompt-toolkit==1.0.14
+# ptyprocess==0.5.1
+# Pygments==2.2.0
+# requests==2.13.0
+# scandir==1.5
+# semver==2.7.6
+# simplegeneric==0.8.1
+# six==1.10.0
 solrcloudpy==2.4.1
-traitlets==4.3.2
-wcwidth==0.1.7
+# traitlets==4.3.2
+# wcwidth==0.1.7