hazelcast-jet icon indicating copy to clipboard operation
hazelcast-jet copied to clipboard

hazelcast-download.properties inside the lib directory

Open jerrinot opened this issue 4 years ago • 5 comments

when I build the latest master and unzip the tar.gz distribution then the lib directory contains hazelcast-download.properties. Is this expected? I guess it should not be there.

jerrinot avatar Jan 04 '21 15:01 jerrinot

Yes, it should be there to distinguish call homes between Jet jar from maven, from tar/zip distribution and from docker.

$ cat hazelcast-jet-4.4-SNAPSHOT/lib/hazelcast-download.properties 
hazelcastDownloadId=distribution

$ docker run hazelcast/hazelcast-jet:latest-snapshot cat /opt/hazelcast-jet/lib/hazelcast-download.properties
hazelcastDownloadId=docker

frant-hartm avatar Jan 05 '21 08:01 frant-hartm

that's a weird location, isnt it? as a user I am confused by this.

jerrinot avatar Jan 05 '21 08:01 jerrinot

Moreover can we add single line comment into the file which explains reason of this file?

olukas avatar Jan 05 '21 09:01 olukas

Options discussed:

  • have the file with the correct value in hazelcast-jet jar - I don't like this as we would have 3 different jars - one in maven central, one in tar/zip, one in docker
  • move the file to config/ and put the whole config folder on CP - @jerrinot doesn't like the whole folder on CP, single file can't put on CP
  • package the file into a jar and put the jar in lib/, could be done using yet another assembly

I think the best solution would be to add support for passing a value via a system property to the PhoneHome.

frant-hartm avatar Jan 13 '21 13:01 frant-hartm

@frant-hartm seems this is how it was done for IMDG: https://github.com/hazelcast/hazelcast-docker/pull/230/files#diff-fcaf45f62a2fdc483b0edd5506e0bb6a7fbd11bba72dedcef1ab36117aecda20R56

cangencer avatar Feb 01 '21 07:02 cangencer