Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build project #3

Open
rongnguyen opened this issue Jan 10, 2018 · 11 comments
Open

Can not build project #3

rongnguyen opened this issue Jan 10, 2018 · 11 comments

Comments

@rongnguyen
Copy link

There are three compile errors:

  1. The constructor DruidNode(String, null, null) is undefined
JsonConfigProvider.bindInstance(binder, Key.get(DruidNode.class, Self.class),
								new DruidNode("druid-client", null, null));
  1. The constructor DirectDruidClient(QueryToolChestWarehouse, QueryWatcher, ObjectMapper, HttpClient, String, ServiceEmitter) is undefined
final DirectDruidClient directDruidClient = new DirectDruidClient(WAREHOUSE, WATCHER, SMILE_MAPPER, httpClient,
				host, SERVICE_EMITTER);
  1. The constructor DirectDruidClient(QueryToolChestWarehouse, QueryWatcher, ObjectMapper, HttpClient, String, ServiceEmitter) is undefined
final DirectDruidClient directDruidClient = new DirectDruidClient(WAREHOUSE, WATCHER, SMILE_MAPPER, httpClient,
				host, SERVICE_EMITTER);

Please review it!
(Thank for great project)

@xuelvming
Copy link

xuelvming commented Jan 22, 2018

Yes. Have the same issue in main branch as well. Seems it's due to the api change in the upstream druid-server.
May need to update the client as well .Thanks

Seems the DirectDruidClient constructor needs a new string parameter named scheme, it's http or https based on the server port config. In client, I guess we need to pass in the parameter based on the broker config. Hope somebody who is familiar with the druid source can confirm and fix it .Thanks.

  public DirectDruidClient(
      QueryToolChestWarehouse warehouse,
      QueryWatcher queryWatcher,
      ObjectMapper objectMapper,
      HttpClient httpClient,
      String scheme,
      String host,
      ServiceEmitter emitter
  )
final DirectDruidClient directDruidClient = new DirectDruidClient(
            WAREHOUSE,
            WATCHER,
            SMILE_MAPPER,
            httpClient,
            "http",
            host,
            SERVICE_EMITTER
    );

@xuelvming
Copy link

Seems the DirectDruidClient constructor needs a new string parameter named scheme, it's http or https based on the server port config. In client, I guess we need to pass in the parameter based on the broker config. Hope somebody who is familiar with the druid source can confirm and fix it .Thanks.

  public DirectDruidClient(
      QueryToolChestWarehouse warehouse,
      QueryWatcher queryWatcher,
      ObjectMapper objectMapper,
      HttpClient httpClient,
      String scheme,
      String host,
      ServiceEmitter emitter
  )
final DirectDruidClient directDruidClient = new DirectDruidClient(
            WAREHOUSE,
            WATCHER,
            SMILE_MAPPER,
            httpClient,
            "http",
            host,
            SERVICE_EMITTER
    );

@Janesh
Copy link

Janesh commented Feb 28, 2018

Can someone please fix this ASAP?

@gianm
Copy link
Member

gianm commented Feb 28, 2018

Hi @Janesh this repository is just an example of how you might use internal unstable Druid APIs, and it isn't officially supported. If you are looking for something more stable then try Druid SQL (http://druid.io/docs/latest/querying/sql.html) -- which includes a JDBC driver -- or the Druid native JSON API.

@Janesh
Copy link

Janesh commented Feb 28, 2018

@gianm - Thanks for the clarification. How about using the druid-processing API directly (i.e using classes like https://github.com/druid-io/druid/blob/master/processing/src/main/java/io/druid/query/Druids.java, https://github.com/druid-io/druid/blob/master/processing/src/main/java/io/druid/query/Query.java etc)? Is the druid-processing API stable for external client use? Or, is it better for Java clients to use the SQL queries? The 3rd option being direct JSON request-response from Java. Any guidance is much appreciated.

@gianm
Copy link
Member

gianm commented Mar 1, 2018

Hi @Janesh, none of the query stuff in druid-processing is considered a stable API. They will work, but if you use them then you will often need to fix compile breakages due to API changes.

The three stable APIs for external clients are all either web or jdbc based.

@Janesh
Copy link

Janesh commented Mar 1, 2018

@gianm - Thank you so much for clarifying this :-). Really appreciate your help 👍

@gianm
Copy link
Member

gianm commented Mar 1, 2018

@Janesh happy to help

@fmarelli
Copy link

fmarelli commented Mar 1, 2018

@gianm thanks for your support. A "working" java client like this would be very useful and make a great addition to the Druid ecosystem.

@gianm
Copy link
Member

gianm commented Mar 1, 2018

Hi @fmarelli, I agree in principle although currently we are focusing our efforts on supporting JSON/HTTP clients and on the SQL layer. If only we had infinite resources :)

In the meantime I hope you find what you are looking for.

@fmarelli
Copy link

fmarelli commented Mar 1, 2018

HI @gianm I fully understand where you are coming from. I've been effectively using Druid with jdbc SQL in the last few months, thanks for the great work. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants