环境准备
说明:本文章使用的ES版本是:6.7.0
JDK
Elastisearch 6.7.0编译需要JDK版本10.0及以上,我直接安装了JDK12.JDK下载地址:https://www.oracle.com/technetwork/java/javase/downloads/index.html
Gradle
brew install gradle
Elastisearch源码
git clone https://github.com/elastic/elasticsearch.git
git tag
git checkout v6.7.0
使用IDEA DEBUG 源码
将工程Import到IDEA
进入Elastisearch根目录,把源码编译为IDEA工程:./gradlew idea