Skip to content

Commit

Permalink
Update log verbosity level
Browse files Browse the repository at this point in the history
Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 committed Aug 7, 2024
1 parent 99d096f commit 186ff75
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions druid/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashicorp/go-retryablehttp"

Check failure on line 23 in druid/client.go

View workflow job for this annotation

GitHub Actions / Build

File is not `goimports`-ed (goimports)
"log"
"time"

druidgo "github.com/grafadruid/go-druid"
"github.com/hashicorp/go-retryablehttp"
"github.com/pkg/errors"
"k8s.io/klog/v2"
health "kmodules.xyz/client-go/tools/healthchecker"
Expand Down Expand Up @@ -198,7 +198,7 @@ func CheckDBReadWriteAccess(druidCoordinatorsClient *Client, druidBrokersClient
if err != nil {
return err, false
}
klog.Info("Successfully updated coordinators config to stop waiting before deleting segment")
klog.V(5).Info("Successfully updated coordinators config to stop waiting before deleting segment")
oldData = DruidHealthDataZero
newData = DruidHealthDataOne
}
Expand Down Expand Up @@ -321,7 +321,7 @@ func (c *Client) SubmitTaskRecurrently(taskType DruidTaskType, dataSource string
return err
}
if taskStatus {
klog.Info("Task successful")
klog.V(5).Info("Task successful")
return nil
}
time.Sleep(6 * time.Second)
Expand Down Expand Up @@ -438,9 +438,8 @@ func (c *Client) CheckTaskStatus(taskID string) (bool, error) {
}

func (c *Client) checkDBReadAccess(oldData string) error {
klog.Info("waiting for the segments to be available for query...")

for i := 0; i < 5; i++ {
klog.V(5).Info("waiting for the segments to be available for query...")
time.Sleep(6 * time.Second)

data, err := c.GetData()
Expand All @@ -449,7 +448,7 @@ func (c *Client) checkDBReadAccess(oldData string) error {
return err
}
if data != oldData {
klog.Info("successfully read ingested data")
klog.V(5).Info("successfully read ingested data")
return nil
}
}
Expand Down

0 comments on commit 186ff75

Please sign in to comment.