Java runtime
Druid fully supports Java 8 and 11. The project team recommends Java 11. The project team does not recommend running with Java 17, because certain Druid functionality is not currently compatible with Java 17.
The project team recommends using an OpenJDK-based Java distribution. There are many free and actively-supported distributions available, including , Azul Zulu, and . The project team does not recommend any specific distribution over any other.
In general, the project team recommends using the G1 collector with default settings. This is the default collector in Java 11. To enable G1 on Java 8, use . There is no harm in explicitly specifying this on Java 11 as well.
Garbage collector selection and tuning is a form of sport in the Java community. There may be situations where adjusting garbage collection configuration improves or worsens performance. The project team’s guidance is that most people do not need to stray away from G1 with default settings.
These warning messages are harmless, and can be ignored. However, you can avoid them entirely if you wish by adding the following Java command line parameters. These parameters are not part of the default configurations that ship with Druid, because Java 8 does not recognize these parameters and fails to start up if they are provided.
To do this, add the following lines to your jvm.config
files:
The Xms
, Xmx
, and MaxDirectMemorySize
parameters in the line above are merely an example. You may use different values in your specific environment.