JohnSnowLabs / spark-nlp

State of the Art Natural Language Processing
https://sparknlp.org/
Apache License 2.0
3.77k stars 705 forks source link

Closed the S3 connection #14233

Closed mehmetbutgul closed 2 months ago

mehmetbutgul commented 3 months ago

The main goal of this PR is to close the connection of s3.

Description

Releases any underlying system resources by invoking the close() method in ResourceDownloader. There is a bug in spark-nlp==5.3.3, related to https://github.com/JohnSnowLabs/spark-nlp/pull/14224 When a lot of models are downloaded; since the connection is consumed,
"Timeout waiting for connection from pool" error is thrown.

Motivation and Context

There is a bug in spark-nlp==5.3.3. This PR will solve the bug.

How Has This Been Tested?

Locally with Python and Scala. Additionally, I ran some test code in the Jenkins server when using the jar I created from this branch

Types of changes

Checklist: