Questions Migrating to Java High Level Rest Client 5.6


(Herm Flink) #1

Hi All,

At the moment, we are investigating efforts to move away from the Java Transport Client to the new Java High Level Rest Client.

Two questions already popped up:

  1. For the BulkProcessor we now need to make use of the ThreadPool class. See example in https://www.elastic.co/guide/en/elasticsearch/client/java-rest/5.6/java-rest-high-document-bulk.html#java-rest-high-document-bulk-processor. However, I do not see any documentation explaining the Settings objects that is required for the ThreadPool constructor. Can someone please explain me what is required to instantiate a valid Settings object for ThreadPool? (we are using ES Found, should that matter)
  2. According same documentation, the Mapping API still requires the Low-level Rest Client. This is a cumbersome Client to code against. The code we probably need to modify again once it is supported by the High Level Client. Can someone shed a light on the roadmap when the Mapping API becomes available in the High Level Rest Client?

Many thanks in advance for responding, kind regards,
Herm Flink


(David Pilato) #2

Read this:

Basically:

ThreadPool threadPool = new ThreadPool(Settings.builder()
    .put(Node.NODE_NAME_SETTING.getKey(), "high-level-client")
    .build());

And also


(Herm Flink) #3

Ah, great! Thanks for pointing me to the right directions.
Guess I'll have to deal with the low level client for indices admin (and mappings) for now... and wait for https://github.com/elastic/elasticsearch/issues/25847 to be resolved in some future release.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.