You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by GitBox <gi...@apache.org> on 2020/07/30 07:28:47 UTC

[GitHub] [incubator-sdap-ingester] eamonford opened a new pull request #8: fix solr history manager

eamonford opened a new pull request #8:
URL: https://github.com/apache/incubator-sdap-ingester/pull/8


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-sdap-ingester] eamonford merged pull request #8: SDAP-270: Fix solr history manager incorrect URLs

Posted by GitBox <gi...@apache.org>.
eamonford merged pull request #8:
URL: https://github.com/apache/incubator-sdap-ingester/pull/8


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-sdap-ingester] eamonford commented on a change in pull request #8: SDAP-270: Fix solr history manager incorrect URLs

Posted by GitBox <gi...@apache.org>.
eamonford commented on a change in pull request #8:
URL: https://github.com/apache/incubator-sdap-ingester/pull/8#discussion_r464745892



##########
File path: collection_manager/collection_manager/services/history_manager/SolrIngestionHistory.py
##########
@@ -100,12 +99,11 @@ def _create_collection_if_needed(self):
                            'name': self._granule_collection_name,
                            'numShards': node_number
                            }
-                result = self._req_session.get('/'.join([self._solr_url.strip("/"), 'admin', 'collections']),
-                                               params=payload)
+                result = self._req_session.get(f"{self._solr_url.strip('/')}/solr/admin/collections", params=payload)
                 response = result.json()
                 logger.info(f"solr collection created {response}")
                 # Update schema
-                schema_url = '/'.join([self._solr_url.strip('/'), self._granule_collection_name, 'schema'])
+                schema_url = f"{self._solr_url.strip('/')}/{self._granule_collection_name}/schema"

Review comment:
       You're right, /solr did need to be added to this. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-sdap-ingester] tloubrieu-jpl commented on a change in pull request #8: SDAP-270: Fix solr history manager incorrect URLs

Posted by GitBox <gi...@apache.org>.
tloubrieu-jpl commented on a change in pull request #8:
URL: https://github.com/apache/incubator-sdap-ingester/pull/8#discussion_r464661619



##########
File path: collection_manager/collection_manager/services/history_manager/SolrIngestionHistory.py
##########
@@ -100,12 +99,11 @@ def _create_collection_if_needed(self):
                            'name': self._granule_collection_name,
                            'numShards': node_number
                            }
-                result = self._req_session.get('/'.join([self._solr_url.strip("/"), 'admin', 'collections']),
-                                               params=payload)
+                result = self._req_session.get(f"{self._solr_url.strip('/')}/solr/admin/collections", params=payload)
                 response = result.json()
                 logger.info(f"solr collection created {response}")
                 # Update schema
-                schema_url = '/'.join([self._solr_url.strip('/'), self._granule_collection_name, 'schema'])
+                schema_url = f"{self._solr_url.strip('/')}/{self._granule_collection_name}/schema"

Review comment:
       We don't need to add the /solr string in the path here ? I just want to make sure...

##########
File path: collection_manager/collection_manager/services/history_manager/SolrIngestionHistory.py
##########
@@ -121,13 +119,12 @@ def _create_collection_if_needed(self):
                            'name': self._dataset_collection_name,
                            'numShards': node_number
                            }
-                result = self._req_session.get('/'.join([self._solr_url.strip('/'), 'admin', 'collections']),
-                                               params=payload)
+                result = self._req_session.get(f"{self._solr_url.strip('/')}/solr/admin/collections", params=payload)
                 response = result.json()
                 logger.info(f"solr collection created {response}")
                 # Update schema
                 # http://localhost:8983/solr/nexusdatasets/schema?_=1588555874864&wt=json
-                schema_url = '/'.join([self._solr_url.strip('/'), self._dataset_collection_name, 'schema'])
+                schema_url = f"{self._solr_url.strip('/')}/{self._granule_collection_name}/schema"

Review comment:
       same here. But I guess you had to make the correction at the first place because of that.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org