To use the canal project because the search index elasticsearch incremental update, and download client-adapter (client adapter's) default only supports the 6.4 version elasticsearch, but used in the project elasticsearch version is 7.3, in order to unify version of client-adapter transformation
First, choose the canal-master project open client-adapter module and wait for the update maven good dependence on older versions of three elasticsearch in pom file to adjust
Second, repackaged at the root canal-master of: mvn clean package -DskipTests
If the compiler error No Compiler Environment IS Provided in the this , open the directory in the bin directory mvn.cmd maven input file in the first line of the file set JAVA_HOME = C: \ Program Files \ Java \ jdk1.8.0_191 ( here is where the JDK path)
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Third, resolve exceptions canal-adapter upgrade process
Compile Tip: ESAdapter.java: [225,56] incompatible types, can not be converted to long
[ERROR] /canal-master/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/ESAdapter.java:[225,56] 不兼容的类型: or
g.apache.lucene.search.TotalHits无法转换为long
Solution: Increase the value after getTotalHits, because ES7 enlarged the scope of TotalHits
adjusted continue compiler package mvn package -DskipTests, can be directly compiled to continue in the wrong place just waiting compiled, and then directly use the compiled client-adapter