Example #1
0
func init() {
	t, err := time.Parse(time.UnixDate, buildTime)
	if buildTime != "" && err != nil {
		panic(fmt.Sprintf("Couldn't parse build timestamp %q: %v", buildTime, err))
	}
	stats.NewString("BuildHost").Set(buildHost)
	stats.NewString("BuildUser").Set(buildUser)
	stats.NewInt("BuildTimestamp").Set(t.Unix())
	stats.NewString("BuildGitRev").Set(buildGitRev)
}
Example #2
0
	"strings"

	"code.google.com/p/go.net/context"

	log "github.com/golang/glog"
	"github.com/henryanand/vitess/go/stats"
	"github.com/henryanand/vitess/go/trace"
	"github.com/henryanand/vitess/go/vt/binlog"
	"github.com/henryanand/vitess/go/vt/tabletserver"
	"github.com/henryanand/vitess/go/vt/tabletserver/planbuilder"
	"github.com/henryanand/vitess/go/vt/topo"
)

var (
	// the stats exported by this module
	statsType          = stats.NewString("TabletType")
	statsKeyspace      = stats.NewString("TabletKeyspace")
	statsShard         = stats.NewString("TabletShard")
	statsKeyRangeStart = stats.NewString("TabletKeyRangeStart")
	statsKeyRangeEnd   = stats.NewString("TabletKeyRangeEnd")

	// constants for this module
	historyLength = 16
)

func (agent *ActionAgent) allowQueries(tablet *topo.Tablet, blacklistedTables []string) error {
	if agent.DBConfigs == nil {
		// test instance, do nothing
		return nil
	}