未验证 提交 07961c9f 编写于 作者: S stonelgh 提交者: GitHub

m3db: fix Errorf calls (#703)

上级 f770b3cf
......@@ -72,12 +72,7 @@ func main() {
items := getTransferItems(endpoint, metric)
//log.Println(items[0])
start := time.Now().UnixNano()
err := cli.Push(items)
if err != nil {
fmt.Println("err:", err)
} else {
//fmt.Println("resp:", resp)
}
cli.Push2Queue(items)
log.Println((time.Now().UnixNano() - start) / 1000000)
}(endpoint, metric)
}
......
......@@ -145,7 +145,7 @@ func (p *Client) QueryData(inputs []dataobj.QueryData) []*dataobj.TsdbQueryRespo
query, opts := p.config.queryDataOptions(inputs)
ret, err := fetchTagged(session, p.namespaceID, query, opts)
if err != nil {
logger.Errorf("unable to query data: ", err)
logger.Errorf("unable to query data: %v", err)
return nil
}
......@@ -198,7 +198,7 @@ func (p *Client) QueryMetrics(input dataobj.EndpointsRecv) *dataobj.MetricResp {
tags, err := completeTags(session, p.namespaceID, query, opts)
if err != nil {
logger.Errorf("unable completeTags: ", err)
logger.Errorf("unable completeTags: %v", err)
return nil
}
return tagsMr(tags)
......@@ -222,7 +222,7 @@ func (p *Client) QueryTagPairs(input dataobj.EndpointMetricRecv) []dataobj.Index
tags, err := completeTags(session, p.namespaceID, query, opts)
if err != nil {
logger.Errorf("unable completeTags: ", err)
logger.Errorf("unable completeTags: %v", err)
return nil
}
......@@ -254,7 +254,7 @@ func (p *Client) queryIndexByClude(session client.Session, input dataobj.CludeRe
iter, _, err := session.FetchTaggedIDs(p.namespaceID, query, opts)
if err != nil {
logger.Errorf("unable FetchTaggedIDs: ", err)
logger.Errorf("unable FetchTaggedIDs: %v", err)
return nil
}
......@@ -276,7 +276,7 @@ func (p *Client) queryIndexByClude(session client.Session, input dataobj.CludeRe
}
if err := iter.Err(); err != nil {
logger.Errorf("FetchTaggedIDs iter:", err)
logger.Errorf("FetchTaggedIDs iter: %v", err)
return nil
}
......@@ -331,7 +331,7 @@ func (p *Client) queryIndexByFullTags(session client.Session, input dataobj.Inde
iter, _, err := session.FetchTaggedIDs(p.namespaceID, query, opts)
if err != nil {
logger.Errorf("unable FetchTaggedIDs: ", err)
logger.Errorf("unable FetchTaggedIDs: %v", err)
return
}
......@@ -350,7 +350,7 @@ func (p *Client) queryIndexByFullTags(session client.Session, input dataobj.Inde
ret.Tags = append(ret.Tags, k)
}
if err := iter.Err(); err != nil {
logger.Errorf("FetchTaggedIDs iter:", err)
logger.Errorf("FetchTaggedIDs iter: %v", err)
}
return ret
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册