mindscapehq / druid4net Goto Github PK
View Code? Open in Web Editor NEWA .NET druid.io client written in C#
License: MIT License
A .NET druid.io client written in C#
License: MIT License
This might be the wrong repo almost so I'll try to flesh this out later, but the gist is that a seeming fresh instance of Druid if called with an empty context object will throw an error called JavaUnderflowException.
Given we set useCache
to null this occurs on some calls. Oddly the error seems to have vanished now I made a single request with the useCache value set.
Is there a reason that all of the methods have a class
requirement for TResponse
? As far as I can tell, my IJsonSerializer
does not have the same requirement, and I can theoretically have my serializer return different concrete classes depending on what the data is, as long as it follows some interface. I don't actually have any use cases for when I would need to do this, but I'm trying to plug this into a library where I need to be able to pass an unconstrainted generic into TResponse, and I'm just not seeing why that constraint exists.
public async Task<IEnumerable<TResult>> GetManyAsync<TResult>(IQuery query)
{
// Following line fails because TResult does not have class constraint
var response = await _getClient().ScanAsync<TResult>(
// some code to map query to something ScanAsync can understand
);
return response.Data;
}
I'm not sure if there's a simple workaround to this, other than checking that TResult IsByRef at runtime and using reflection to call ScanAsync
.
Any thoughts/ideas?
According to Druid documentation (Limit Spec) in DefaultLimitSpec
Limit
and Offset
fields are optional integers and in current implementation both values are of type int
. Is there any reason for this and is it possible to change them to long?
or at least int?
? Or is there some walkaround for sorting in GroupBy query without setting offset and limit?
I'm trying to create a new BoundFilter to compare strings. Because there's a struct constraint, it's not letting me pass the string type:
new BoundFilter<string>("srcip", lower: "127", lowerStrict: false, ordering: SortingOrder.alphanumeric)
// Error: CS0453 The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'BoundFilter<T>'
Am I doing something wrong? According to the docs, it should be able to work: https://druid.apache.org/docs/latest/querying/filters.html#bound-filter
{
"type": "bound",
"dimension": "name",
"lower": "foo",
"upper": "hoo"
}
Hihi
When making a SegmentMetadata
request without a Interval call (which is optional to Druid) it includes "intervals":[]
in the resulting call to Druid which invalidates the result.
It's an easy work-around to pass DateTime.Min and DateTime.Max, but thought I'd highlight this here. I'll try put a PR together to fix it.
I'm looking at the DruidClient and Requestor classes and trying to figure out how to support basic authentication on a request. Do you have any recommendations?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.