It seems there is no way to disable them at the moment. This is
causing issues when one wants to enable G1GC instead. How about making these defaults conditional?
Lucene tests against G1 regularly and finds index-corrupting errors as well. From Lucene's "known java bugs" page:
Do not, under any circumstances, run Lucene with the G1 garbage collector. Lucene's test suite fails with the G1 garbage collector on a regular basis, including bugs that cause index corruption. There is no person on this planet that seems to understand such bugs (see Loading..., open for over a year), so don't count on the situation changing soon.
So, morale of the story is don't use G1GC yet =)
If you absolutely must change the java options, you'll simply have to change the elasticsearch.in.sh script. But then you are essentially running "unsupported" and any issues you encounter will likely need to set back to default before anyone will be able to help, since ES is designed/tested against those defaults.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.