This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch lostluck-protosuffix
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/lostluck-protosuffix by this
push:
new e229c74 Update monitoring.go
e229c74 is described below
commit e229c7482c1b499850854a7321502c3699145c6d
Author: Robert Burke <[email protected]>
AuthorDate: Tue Apr 7 22:36:11 2020 -0700
Update monitoring.go
---
.../go/pkg/beam/core/runtime/harness/monitoring.go | 26 +++++++++++-----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/sdks/go/pkg/beam/core/runtime/harness/monitoring.go
b/sdks/go/pkg/beam/core/runtime/harness/monitoring.go
index df1093f..eb61d2b 100644
--- a/sdks/go/pkg/beam/core/runtime/harness/monitoring.go
+++ b/sdks/go/pkg/beam/core/runtime/harness/monitoring.go
@@ -26,7 +26,7 @@ import (
"github.com/apache/beam/sdks/go/pkg/beam/core/graph/mtime"
"github.com/apache/beam/sdks/go/pkg/beam/core/metrics"
"github.com/apache/beam/sdks/go/pkg/beam/core/runtime/exec"
- ppb "github.com/apache/beam/sdks/go/pkg/beam/model/pipeline_v1"
+ pipepb "github.com/apache/beam/sdks/go/pkg/beam/model/pipeline_v1"
)
type mUrn uint32
@@ -137,7 +137,7 @@ type shortKey struct {
type shortIDCache struct {
mu sync.Mutex
labels2ShortIds map[shortKey]string
- shortIds2Infos map[string]*ppb.MonitoringInfo
+ shortIds2Infos map[string]*pipepb.MonitoringInfo
lastShortID int64
}
@@ -145,7 +145,7 @@ type shortIDCache struct {
func newShortIDCache() *shortIDCache {
return &shortIDCache{
labels2ShortIds: make(map[shortKey]string),
- shortIds2Infos: make(map[string]*ppb.MonitoringInfo),
+ shortIds2Infos: make(map[string]*pipepb.MonitoringInfo),
}
}
@@ -166,7 +166,7 @@ func (c *shortIDCache) getShortID(l metrics.Labels, urn
mUrn) string {
}
s = c.getNextShortID()
c.labels2ShortIds[k] = s
- c.shortIds2Infos[s] = &ppb.MonitoringInfo{
+ c.shortIds2Infos[s] = &pipepb.MonitoringInfo{
Urn: sUrns[urn],
Type: urnToType(urn),
Labels: userLabels(l),
@@ -174,10 +174,10 @@ func (c *shortIDCache) getShortID(l metrics.Labels, urn
mUrn) string {
return s
}
-func (c *shortIDCache) shortIdsToInfos(shortids []string)
map[string]*ppb.MonitoringInfo {
+func (c *shortIDCache) shortIdsToInfos(shortids []string)
map[string]*pipepb.MonitoringInfo {
c.mu.Lock()
defer c.mu.Unlock()
- m := make(map[string]*ppb.MonitoringInfo, len(shortids))
+ m := make(map[string]*pipepb.MonitoringInfo, len(shortids))
for _, s := range shortids {
m[s] = c.shortIds2Infos[s]
}
@@ -195,11 +195,11 @@ func getShortID(l metrics.Labels, urn mUrn) string {
return defaultShortIDCache.getShortID(l, urn)
}
-func shortIdsToInfos(shortids []string) map[string]*ppb.MonitoringInfo {
+func shortIdsToInfos(shortids []string) map[string]*pipepb.MonitoringInfo {
return defaultShortIDCache.shortIdsToInfos(shortids)
}
-func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo, map[string][]byte) {
+func monitoring(p *exec.Plan) ([]*pipepb.MonitoringInfo, map[string][]byte) {
store := p.Store()
if store == nil {
return nil, nil
@@ -208,7 +208,7 @@ func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo,
map[string][]byte) {
defaultShortIDCache.mu.Lock()
defer defaultShortIDCache.mu.Unlock()
- var monitoringInfo []*ppb.MonitoringInfo
+ var monitoringInfo []*pipepb.MonitoringInfo
payloads := make(map[string][]byte)
metrics.Extractor{
SumInt64: func(l metrics.Labels, v int64) {
@@ -219,7 +219,7 @@ func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo,
map[string][]byte) {
payloads[getShortID(l, urnUserSumInt64)] = payload
monitoringInfo = append(monitoringInfo,
- &ppb.MonitoringInfo{
+ &pipepb.MonitoringInfo{
Urn: sUrns[urnUserSumInt64],
Type: urnToType(urnUserSumInt64),
Labels: userLabels(l),
@@ -234,7 +234,7 @@ func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo,
map[string][]byte) {
payloads[getShortID(l, urnUserDistInt64)] = payload
monitoringInfo = append(monitoringInfo,
- &ppb.MonitoringInfo{
+ &pipepb.MonitoringInfo{
Urn: sUrns[urnUserDistInt64],
Type: urnToType(urnUserDistInt64),
Labels: userLabels(l),
@@ -249,7 +249,7 @@ func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo,
map[string][]byte) {
payloads[getShortID(l, urnUserLatestMsInt64)] = payload
monitoringInfo = append(monitoringInfo,
- &ppb.MonitoringInfo{
+ &pipepb.MonitoringInfo{
Urn: sUrns[urnUserLatestMsInt64],
Type:
urnToType(urnUserLatestMsInt64),
Labels: userLabels(l),
@@ -268,7 +268,7 @@ func monitoring(p *exec.Plan) ([]*ppb.MonitoringInfo,
map[string][]byte) {
payloads[getShortID(metrics.PCollectionLabels(snapshot.PID),
urnElementCount)] = payload
monitoringInfo = append(monitoringInfo,
- &ppb.MonitoringInfo{
+ &pipepb.MonitoringInfo{
Urn: sUrns[urnElementCount],
Type: urnToType(urnElementCount),
Labels: map[string]string{