Merge pull request #168 from SigNoz/druid_permission_fix

Druid permission fix
This commit is contained in:
Ankit Nayan 2021-06-07 17:24:53 +05:30 committed by GitHub
commit 61bbd5551b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 68 deletions

View File

@ -10,6 +10,9 @@ kafka:
zookeeperConnectionTimeoutMs: 6000
druid:
image:
tag: 0.21.1-rc2
configVars:
# To store data on local disks attached

View File

@ -517,7 +517,7 @@ func GetServices(client *SqlClient, query *model.GetServicesParams) (*[]model.Se
func GetServiceMapDependencies(client *SqlClient, query *model.GetServicesParams) (*[]model.ServiceMapDependencyResponseItem, error) {
sqlQuery := fmt.Sprintf(`SELECT SpanId, ParentSpanId, ServiceName FROM %s WHERE "__time" >= '%s' AND "__time" <= '%s' ORDER BY __time DESC`, constants.DruidDatasource, query.StartTime, query.EndTime)
sqlQuery := fmt.Sprintf(`SELECT SpanId, ParentSpanId, ServiceName FROM %s WHERE "__time" >= '%s' AND "__time" <= '%s' ORDER BY __time DESC LIMIT 100000`, constants.DruidDatasource, query.StartTime, query.EndTime)
// zap.S().Debug(sqlQuery)

View File

@ -1,20 +0,0 @@
package clickhouse
type ClickHouseReader struct {
ClickHouseClientUrl string
}
func connect() string {
return "Connected to ClickHouse"
}
func NewSpanReader() *ClickHouseReader {
connect()
return &ClickHouseReader{
ClickHouseClientUrl: "http://localhost:9000",
}
}
func (chReader *ClickHouseReader) GetServices() string {
return "Hello from ClickHouse"
}

View File

@ -1,20 +0,0 @@
package druid
type DruidReader struct {
DruidClientUrl string
}
func connect() string {
return "Connected to Druid"
}
func NewSpanReader() *DruidReader {
connect()
return &DruidReader{
DruidClientUrl: "http://localhost:8888",
}
}
func (druidReader *DruidReader) GetServices() string {
return "Hello from Druid"
}

View File

@ -1,27 +0,0 @@
package main
import (
"fmt"
"os"
"go.signoz.io/query-service/test/clickhouse"
"go.signoz.io/query-service/test/druid"
)
type StorageReader interface {
GetServices() string
}
func main() {
storage := os.Getenv("STORAGE")
var client StorageReader
if storage == "druid" {
client = druid.NewSpanReader()
} else if storage == "clickhouse" {
client = clickhouse.NewSpanReader()
}
services := client.GetServices()
fmt.Println(services)
}