You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the connector uses _Hadoop 3.1.1_. In case you need a different one you can replace it by excluding `org.apache.hadoop` from `monix-hdfs` and add the new one to your library dependencies.
@@ -73,8 +73,9 @@ This module exposes a wide range of methods for interacting with S3 _buckets_ an
73
73
This config file should be placed in the `resources` folder, therefore it will be automatically picked up from the method call `S3.fromConfig`, which will return a `cats.effect.Resource[Task, S3]`.
74
74
The [resource](https://typelevel.org/cats-effect/datatypes/resource.html) is responsible of the *creation* and *release* of the _S3 client_.
75
75
76
-
We recommend using it transparently in your application, meaning that your methods and classes will directly expect an instance of _S3_, which will be called from within the
77
-
_usage_ of the _Resource_. See below code snippet to understand the concept:
76
+
**Try to reuse** the created **S3** client as much as possible in your application multiple times in your application. Otherwise, creating it
77
+
multiple times will waste precious resources... See below code snippet to understand the concept:
78
+
78
79
79
80
```scala
80
81
importmonix.connect.s3.S3
@@ -96,9 +97,9 @@ _usage_ of the _Resource_. See below code snippet to understand the concept:
96
97
}
97
98
} yield download
98
99
}
99
-
100
+
100
101
// the connection gets created and released within the use method and the `S3`
101
-
// instance is directly passed to our application for an easier interoperability
102
+
// instance is directly passed and should be reused across our application
@@ -478,7 +478,9 @@ that's because it is a heavy image and sometimes it takes bit long to start or i
478
478
Finally, now you can already create the connection to _AWS S3_, _notice_ that _minio_ does not support _Anonymous credentials_, instead you'll have to use the _Static Credentials Provider_ and specify the _key_ and _secret_ corresponding respectively to the
479
479
defined environment variables `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY`.
480
480
481
-
Below snippet represents the settings that would be needed to locally connect to _minio_ using config file:
481
+
Below snippet represents the settings that would be needed to locally connect to _minio_ using config file, which should be placed
482
+
under your test resources folder `src/test/resources`.
483
+
482
484
483
485
```hocon
484
486
{
@@ -494,7 +496,7 @@ Below snippet represents the settings that would be needed to locally connect to
494
496
}
495
497
```
496
498
497
-
Alternatively you can create connection like:
499
+
Alternatively you can statically create connection by parameters:
498
500
499
501
```scala
500
502
importmonix.connect.s3.S3
@@ -511,10 +513,10 @@ val s3SecretKey: String = "TESTSECRET" //equal to the `env var `MINIO_SECRET_KEY
In case you prefer to _start_ and _stop_ the _S3_ service from from the code of same test and therefore not depending on _docker_ but just on a _JVM library dependency_, you can refer to [findify/s3Mock](https://github.com/findify/s3mock) to see more.
522
+
In case you prefer to _start_ and _stop_ the _S3_ service from the code of same test and therefore not depending on _docker_ but just on a _JVM library dependency_, you can refer to [findify/s3Mock](https://github.com/findify/s3mock) to find out more.
0 commit comments