code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package schema
// Yes, this sucks. It's a tiny tiny package that needs to be on its own
// It contains a data structure that's shared between sqlparser & tabletse... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package hook
import (
"bytes"
"fmt"
"os"
"os/exec"
"path"
"strings"
"syscall"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
v... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package dbconfigs is reusable by vt tools to load
// the db configs file.
package dbconfigs
import (
"encoding/json"
"flag"
"code.google.com/p/vitess/go/js... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"crypto/md5"
"encoding/hex"
"fmt"
"regexp"
"strings"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
)
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"fmt"
"time"
"code.google.com/p/vitess/go/relog"
)
// if the master is still alive, then we need to demote it gracefully
// make it... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Generate my.cnf files from templates.
*/
package mysqlctl
import (
"bufio"
"bytes"
"fmt"
"io"
"net"
"os"
"path/filepath"
"strconv"
"strings"
)
typ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
// FIXME(msolomon) this actions were copy/pasted from replication.go because
// they were conceptually quite similar. They should be reconciled a... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Handle creating replicas and setting up the replication streams.
*/
package mysqlctl
import (
"bytes"
"errors"
"fmt"
"net"
"os"
"path"
"strconv"
"stri... | Go |
package mysqlctl
import (
"code.google.com/p/vitess/go/relog"
)
type MapFunc func(index int) error
// ConcurrentMap applies fun in a concurrent manner on integers from 0
// to n-1 (they are assumed to be indexes of some slice containing
// items to be processed). The first error returned by a fun
// application wil... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
type BinlogResponse struct {
Error string
BinlogPosition
BinlogData
}
type BinlogServerRequest struct {
StartPosition string
KeyspaceStart ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"bytes"
"fmt"
"io"
"os"
"path"
"strconv"
"sync"
"code.google.com/p/vitess/go/relog"
)
/*
The code in this file helps to track t... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
/*
the binlogreader is intended to "tail -f" a binlog, but be smart enough
to stop tailing it when mysql is done writing to that binlog. The sto... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"code.google.com/p/vitess/go/ioutil2"
"code.... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"encoding/json"
"expvar"
"fmt"
"os"
"path"
"sync"
"sync/atomic"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"bufio"
// "crypto/md5"
"encoding/hex"
"fmt"
"hash"
// "hash/crc64"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"os"
"path"
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Commands for controlling an external mysql process.
Some commands are issued as exec'd tools, some are handled by connecting via
the mysql protocol.
*/
packag... | Go |
package csvsplitter
import (
"bufio"
"bytes"
"io"
"strconv"
"code.google.com/p/vitess/go/vt/key"
)
type KeyspaceCSVReader struct {
reader *bufio.Reader
delim byte
buf *bytes.Buffer
}
func NewKeyspaceCSVReader(r io.Reader, delim byte) *KeyspaceCSVReader {
return &KeyspaceCSVReader{reader: bufio.NewReade... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
import (
"bufio"
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"os"
"path"
"strconv"
"strings"
"time"
"code.google.com/p/vites... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Generate my.cnf files from templates.
package mysqlctl
import (
"bytes"
"fmt"
"io/ioutil"
"path"
"text/template"
"code.google.com/p/vitess/go/vt/env"
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mysqlctl
/* quick hack to diff two string by running diff externally. probably linux only. */
import (
"code.google.com/p/vitess/go/relog"
"io"
"os"
)
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
import (
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/rpcwrap"
rpcproto "code.google.com/p/vitess/go/rpcwrap/pro... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
import (
"bytes"
"code.google.com/p/vitess/go/bson"
"code.google.com/p/vitess/go/bytes2"
"fmt"
)
func (query *Query) MarshalBson(buf *bytes2.Ch... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
import (
mproto "code.google.com/p/vitess/go/mysql/proto"
)
type SessionParams struct {
DbName string
}
type SessionInfo struct {
SessionId int... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"fmt"
"sync"
"sync/atomic"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vite... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"bytes"
"expvar"
"fmt"
"math/rand"
"strings"
"sync"
"sync/atomic"
"time"
"code.google.com/p/vitess/go/mysql"
mproto "code... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/relog"
"fmt"
)
const (
FAIL = iota
RETRY
FATAL
TX_POOL_FULL
)
const (
DUPLICATE_KEY = 1062 // ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"encoding/binary"
"time"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vitess/go/stats"
"code.google.com/p/vitess/... | Go |
package tabletserver
import (
"bytes"
"encoding/json"
"fmt"
"net/url"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/rpcwrap/proto"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vitess/go/streamlog"
)
var SqlQueryLogger = streamlog.New("SqlQuery", 50)
const (... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"encoding/json"
"fmt"
"net/http"
"strconv"
"sync"
"time"
"code.google.com/p/vitess/go/cache"
mproto "code.google.com/p/vite... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"sync"
"sync/atomic"
"time"
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/relog"
"code.google... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"encoding/base64"
"encoding/binary"
"fmt"
"hash/fnv"
"regexp"
"strconv"
"strings"
"sync/atomic"
"code.google.com/p/vitess/... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"net/http"
"time"
"code.google.com/p/vitess/go/memcache"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/relo... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/timer"
"fmt"
"sync/atomic"... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"fmt"
"sync/atomic"
"time"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/pools"
"time"
)
// ConnectionPool re-exposes RoundRobin as a pool of DBConnection objects
type Conne... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"strings"
"time"
"code.google.com/p/vitess/go/mysql"
"code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/re... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"net/http"
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/relog"
rpcproto "code.google.com/p/vit... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/pools"
"sync/atomic"
"time"
)
type ReservedPool struct {
pool *pools.Numbered
lastId ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/cache"
"code.google.com/p/vitess/go/mysql/proto"
"fmt"
"net/http"
"sync"
"sync/atomic"
"time"
)
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"bytes"
"encoding/base64"
"fmt"
"strings"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sqltypes"
"code.g... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"code.google.com/p/vitess/go/vt/tabletserver/proto"
)
const TRAILING_COMMENT = "_trailingComment"
type nomatch struct{}
type mat... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package key
import (
"fmt"
)
type KeyError string
func NewKeyError(format string, args ...interface{}) KeyError {
return KeyError(fmt.Sprintf(format, args...)... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package key
import (
"bytes"
"encoding/binary"
"encoding/hex"
"fmt"
"sort"
"strings"
)
var MinKey = KeyspaceId("")
var MaxKey = KeyspaceId("")
// NOTE(mso... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package client2
import (
"database/sql"
"database/sql/driver"
"fmt"
"io"
"net/url"
"path"
"strings"
"time"
// FIXME(msolomon) needed for the field mappin... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// API compliant to the requirements of database/sql
// Open expects name to be "hostname:port/dbname"
// For query arguments, we assume place-holders in the query... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tablet
import (
"strconv"
)
// These numbers should exactly match values defined in dist/vt-mysql-5.1.52/include/mysql/mysql_com.h
const (
VT_DECIMAL ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This implements some additional error handling logic to make the client
// more robust in the face of transient problems with easy solutions.
package tablet
im... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sqlparser
import (
"bytes"
"fmt"
"code.google.com/p/vitess/go/sqltypes"
)
type ParserError struct {
Message string
}
func NewParserError(format str... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sqlparser
import (
"fmt"
"strconv"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vitess/go/vt/schema... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sqlparser
import (
"bytes"
"fmt"
"io"
"unicode"
"code.google.com/p/vitess/go/sqltypes"
)
const EOFCHAR = 0x100
type Tokenizer struct {
InStream ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sqlparser
import (
"strconv"
"code.google.com/p/vitess/go/vt/key"
)
const (
ROUTE_BY_CONDITION = iota
ROUTE_BY_VALUE
)
const (
EID_NODE = iota
VA... | Go |
//line sql.y:33
package sqlparser
import __yyfmt__ "fmt"
//line sql.y:33
func SetParseTree(yylex interface{}, root *Node) {
tn := yylex.(*Tokenizer)
tn.ParseTree = root
}
func SetAllowComments(yylex interface{}, allow bool) {
tn := yylex.(*Tokenizer)
tn.AllowComments = allow
}
func ForceEOF(yylex interface{}) {... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sqlparser
import (
"bytes"
"encoding/json"
"strconv"
"code.google.com/p/vitess/go/sqltypes"
)
type BindLocation struct {
Offset, Length int
}
type... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package env defines and initializes command line flags that control
// the runtime environment.
//
// After the main program has called flag.Parse, it needs to ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletmanager
import (
"encoding/json"
"fmt"
"path"
"strings"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/vt/key"
"code.googl... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletmanager
import (
"encoding/json"
"fmt"
"path"
"sort"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
"code.google.co... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The TabletServer RPC service handles commands from the wrangler.
*/
package tabletmanager
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.c... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletmanager
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/signal"
"path"
"strings"
"syscall"
"time"
"code.google... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Actions modify the state of a tablet, shard or keyspace.
//
// They are currenty managed through a series of queues stored in zookeeper.
package tabletmanager
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletmanager
import (
"fmt"
"path"
"strconv"
"strings"
"code.google.com/p/vitess/go/zk"
)
// Functions for extracting and deriving zk paths.
func... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Actions modify the state of a tablet, shard or keyspace.
//
// They are stored in zookeeper below "action" nodes and form a queue. Only the
// lowest action id ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The agent listens on a zk node for new actions to perform.
It passes them off to a separate action process. Even though some
actions could be completed inline ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package naming
import (
"encoding/json"
"fmt"
"sort"
"code.google.com/p/vitess/go/vt/key"
"code.google.com/p/vitess/go/zk"
)
// /zk/local/vt/ns/<keyspace>/... | Go |
package naming
/*
Handle logical name resolution - sort of like DNS but tailored to
vt and using zookeeper.
Naming is disconnected from the backend discovery and is used for
front end clients.
The common query is "resolve keyspace.shard.db_type" and return a list
of host:port tuples that export our default server (v... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"path"
"sort"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/mysqlctl"
tm "code.goo... | Go |
package wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
)
// Assume the master is dead and not coming back. Just push your way
// forward. Force means we are reparenting to the same master
// (assuming the data has been externally synched).
func (wr *... | Go |
package wrangler
import (
"fmt"
"sort"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/hook"
"code.google.com/p/vitess/go/vt/mysqlctl"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
)
// helper struct to queue up results
type rpcContext struct {
tablet *tm.T... | Go |
package wrangler
import (
"fmt"
"path"
"sort"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/naming"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.google.com/p/vitess/go/zk"
"code.google.com/p/vitess/go/zk/zkns"
"launchpad.net/gozk/zookeeper... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
/*
Assume a graph of mysql nodes.
Replace node N with X.
Connect to N and record file/position from "show master status"
On N: (Demote Master)... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"path"
"sync"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/key"
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/key"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
)
... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"net"
"path"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
rpc "code.google.com/p/vitess/go/rpcplus"
vtrpc... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"path"
"time"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.google.com/p/vite... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"path"
"reflect"
"sort"
"sync"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.googl... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
hk "code.google.com/p/vitess/go/vt/hook"
tm "code.google.com/p/vitess/... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
)
// forceMasterSnapshot: Normally a ma... | Go |
package wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
)
func (wr *Wrangler) reparentShardGraceful(slaveTabletMap map[string]*tm.TabletInfo, masterTablet, masterElectTablet *tm.TabletInfo, leaveMasterReadOnly bool) error {
// Validate a bunch of assu... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package rpc
// RPC structs shared between many components
type UnusedRequest string
var NilRequest = new(UnusedRequest)
type UnusedResponse string
var NilResp... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package relog
import (
"bytes"
"fmt"
"io/ioutil"
"runtime"
)
var (
dunno = []byte("???")
centerDot = []byte("·")
dot = []byte(".")
)
type Stack... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// relog provides an alternate logger api with support for logging levels
// Although flexible, the recommended usage is to create a logger object,
// set it as th... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"math/rand"
"strings"
"time"
"launchpad.net/gozk/zookeeper"
)
type Stat interface {
Czxid() int64
Mzxid() int64
CTime() time.Time
MT... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
// Contains the bson custom marshaler / unmarshaler.
// Note this is not required, but makes the code faster.
import (
"bytes"
"code.google.com/p... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
// contains the structures used for RPC calls to zkocc.
// in a different module so the client only links with this.
import (
"time"
"launchpad.... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
import (
rpc "code.google.com/p/vitess/go/rpcplus"
)
// defines the RPC services
// the service name to use is 'ZkReader'
type ZkReader interface ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zkocc
import (
"bytes"
"errors"
"expvar"
"fmt"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/stats"
"code.go... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zkocc
import (
"bytes"
"flag"
"fmt"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/stats"
"code.google.com/p/vite... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// cache for zkocc
package zkocc
import (
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/zk/zkocc/proto"
"launchpad.net/gozk/zookeeper"
"syn... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"code.google.com/p/vitess/go/rpcplus"
"code.google.com/p/vitess/go/rpcwrap/bsonrpc"
"code.google.com/p/vitess/go/zk/zkocc/proto"
"fmt"
"l... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Generate zoo.conf files from templates.
*/
package zkctl
import (
"bytes"
"fmt"
"io/ioutil"
"net"
"os"
"path"
"strconv"
"strings"
"text/template"
)... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Commands for controlling an external zookeeper process.
*/
package zkctl
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"os/exec"
"path"
"str... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zkns
import (
"encoding/json"
"fmt"
"math/rand"
"net"
"sort"
"strings"
"code.google.com/p/vitess/go/zk"
)
type ZknsAddr struct {
// These fields... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"fmt"
"log"
"math/rand"
"os"
"path"
"sort"
"strings"
"sync"
"time"
"launchpad.net/gozk/zookeeper"
)
func init() {
rand.Seed(time.... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"bytes"
"fmt"
"log"
"math/rand"
"sync"
"time"
"code.google.com/p/vitess/go/stats"
"launchpad.net/gozk/zookeeper"
)
func init() {
ra... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* Emulate a "global" namespace across n zk quorums. */
package zk
import (
"fmt"
"sort"
"time"
"launchpad.net/gozk/zookeeper"
)
const (
DEFAULT_MAX_RETRIE... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"fmt"
"log"
"os"
"strconv"
"time"
"code.google.com/p/vitess/go/sync2"
"launchpad.net/gozk/zookeeper"
)
// Every blocking call into CG... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zk
import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"sort"
"strings"
"time"
// "launchpad.net/gozk/zookeeper"
)
const (
DEFAULT_BASE_TIMEOUT = ... | Go |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package jscfg
// A few simple macros for keeping JSON config files human readable
// and consistent.
import (
"encoding/json"
"fmt"
"io/ioutil"
"code.google... | Go |
/*
Copyright 2012, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disc... | Go |
/*
Copyright 2012, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disc... | Go |
/*
Copyright 2012, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disc... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.