awslabs / amazon-kinesis-producer

Amazon Kinesis Producer Library
Apache License 2.0
401 stars 331 forks source link

When using multiple KPL instances on the server for multiple regions, do I need to specify a unique temp directory for each instance or leaving the deafaults "/tmp" is good enough? #182

Open alexmnyc opened 6 years ago

alexmnyc commented 6 years ago

When using multiple KPL instances on the server for multiple regions, do I need to specify a unique temp directory for each instance or leaving the deafaults "/tmp" is good enough?

do I need to do this:

val javaTempDir = System.getProperty("java.io.tmpdir")
val kplRoot = "amazon-kinesis-producer-native-binaries"
val config = new KinesisProducerConfiguration().setTempDirectory(s"$javaTempDir/$kplRoot/${UUID.randomUUID().toString}")

If doing the above ^^^, does KPL take care of creating subdirectories in /tmp.... ?

pfifer commented 6 years ago

The extracted binary includes a hash to keep the files from conflicting. If the file already exists, and the hash matches it will reuse the existing binary. You don't need to explicitly set the temp directory.

alexmnyc commented 6 years ago

what about certificates for multiple KPL from different regions? Will there be no conflict either?

pfifer commented 6 years ago

The certificates are only extracted if they aren't present. Older versions of the KPL extract the certificate to a different location, so they don't conflict with each other.

pfifer commented 6 years ago

I misread your initial question. The certificates that come with the KPL are root certificates and are used for all regions.