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

this druid client conflicts with fastjson? #94

Closed
axzhcode opened this issue May 29, 2019 · 1 comment
Closed

this druid client conflicts with fastjson? #94

axzhcode opened this issue May 29, 2019 · 1 comment

Comments

@axzhcode
Copy link

axzhcode commented May 29, 2019

when i import fastjson in pom, the response code is 500, remove is ok.
code:

public static void main(String[] args) {
        DateTime startTime = new DateTime(2016, 1, 1, 0,
                0, 0, DateTimeZone.UTC);
        DateTime endTime = new DateTime(2017, 1, 2, 0,
                0, 0, DateTimeZone.UTC);
        Interval interval = new Interval(startTime, endTime);
        PagingSpec pagingSpec = new PagingSpec(5, new HashMap<>());
        Granularity granularity = new SimpleGranularity(PredefinedGranularity.ALL);
        DruidSelectQuery query = DruidSelectQuery.builder()
                .dataSource("wikipedia")
                .descending(false)
                .granularity(granularity)
                .intervals(Collections.singletonList(interval))
                .pagingSpec(pagingSpec)
                .build();
        try {
            DruidConfiguration config = DruidConfiguration
                    .builder()
                    .host("localhost")
                    .port(8082)
                    .endpoint("druid/v2/")
                    .build();
            DruidClient client = new DruidJerseyClient(config);
            client.connect();
            String query1 = client.query(query);
            System.out.println(query1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

exception:

in.zapr.druid.druidry.client.exception.QueryException: null
	at in.zapr.druid.druidry.client.DruidJerseyClient.handleInternalServerResponse(DruidJerseyClient.java:145)
	at in.zapr.druid.druidry.client.DruidJerseyClient.query(DruidJerseyClient.java:108)
	at com.aaa.demo.springboot.DemoApplicationTests.main(DemoApplicationTests.java:50)
in.zapr.druid.druidry.client.exception.QueryException
	at in.zapr.druid.druidry.client.DruidJerseyClient.handleInternalServerResponse(DruidJerseyClient.java:145)
	at in.zapr.druid.druidry.client.DruidJerseyClient.query(DruidJerseyClient.java:108)
	at com.aaa.demo.springboot.DemoApplicationTests.main(DemoApplicationTests.java:50)
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.58</version>
        </dependency>
@axzhcode
Copy link
Author

axzhcode commented May 30, 2019

#89

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

1 participant