Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: appengine/logdog/coordinator/config/bigTable.go

Issue 1838803002: LogDog: BigTable batching schema. (Closed) Base URL: https://github.com/luci/luci-go@recordio-split
Patch Set: Minor comments and quality of code tweaks. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | appengine/logdog/coordinator/endpoints/logs/get.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package config 5 package config
6 6
7 import ( 7 import (
8 gaeauthClient "github.com/luci/luci-go/appengine/gaeauth/client" 8 gaeauthClient "github.com/luci/luci-go/appengine/gaeauth/client"
9 "github.com/luci/luci-go/common/errors" 9 "github.com/luci/luci-go/common/errors"
10 log "github.com/luci/luci-go/common/logging" 10 log "github.com/luci/luci-go/common/logging"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if err != nil { 72 if err != nil {
73 log.WithError(err).Errorf(c, "Failed to create BigTable authenti cator.") 73 log.WithError(err).Errorf(c, "Failed to create BigTable authenti cator.")
74 return nil, errors.New("failed to create BigTable authenticator" ) 74 return nil, errors.New("failed to create BigTable authenticator" )
75 } 75 }
76 76
77 // Explicitly clear gRPC metadata from the Context. It is forwarded to 77 // Explicitly clear gRPC metadata from the Context. It is forwarded to
78 // delegate calls by default, and standard request metadata can break Bi gTable 78 // delegate calls by default, and standard request metadata can break Bi gTable
79 // calls. 79 // calls.
80 c = metadata.NewContext(c, nil) 80 c = metadata.NewContext(c, nil)
81 81
82 » return bigtable.New(c, bigtable.Options{ 82 » st, err := bigtable.New(c, bigtable.Options{
83 Project: bt.Project, 83 Project: bt.Project,
84 Zone: bt.Zone, 84 Zone: bt.Zone,
85 Cluster: bt.Cluster, 85 Cluster: bt.Cluster,
86 LogTable: bt.LogTableName, 86 LogTable: bt.LogTableName,
87 ClientOptions: []cloud.ClientOption{ 87 ClientOptions: []cloud.ClientOption{
88 cloud.WithTokenSource(a.TokenSource()), 88 cloud.WithTokenSource(a.TokenSource()),
89 }, 89 },
90 » }), nil 90 » })
91 » if err != nil {
92 » » log.WithError(err).Errorf(c, "Failed to create BigTable instance .")
93 » » return nil, err
94 » }
95 » return st, nil
91 } 96 }
OLDNEW
« no previous file with comments | « no previous file | appengine/logdog/coordinator/endpoints/logs/get.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698