зеркало из https://github.com/github/vitess-gh.git
Renaming vt/topotools to vt/topo/helpers.
This commit is contained in:
Родитель
f1dcff7b4b
Коммит
9e2a56955c
|
@ -11,7 +11,7 @@ import (
|
||||||
log "github.com/golang/glog"
|
log "github.com/golang/glog"
|
||||||
"github.com/youtube/vitess/go/tb"
|
"github.com/youtube/vitess/go/tb"
|
||||||
"github.com/youtube/vitess/go/vt/topo"
|
"github.com/youtube/vitess/go/vt/topo"
|
||||||
"github.com/youtube/vitess/go/vt/topotools"
|
"github.com/youtube/vitess/go/vt/topo/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fromTopo = flag.String("from", "", "topology to copy data from")
|
var fromTopo = flag.String("from", "", "topology to copy data from")
|
||||||
|
@ -46,15 +46,15 @@ func main() {
|
||||||
toTS := topo.GetServerByName(*toTopo)
|
toTS := topo.GetServerByName(*toTopo)
|
||||||
|
|
||||||
if *doKeyspaces {
|
if *doKeyspaces {
|
||||||
topotools.CopyKeyspaces(fromTS, toTS)
|
helpers.CopyKeyspaces(fromTS, toTS)
|
||||||
}
|
}
|
||||||
if *doShards {
|
if *doShards {
|
||||||
topotools.CopyShards(fromTS, toTS, *deleteKeyspaceShards)
|
helpers.CopyShards(fromTS, toTS, *deleteKeyspaceShards)
|
||||||
}
|
}
|
||||||
if *doShardReplications {
|
if *doShardReplications {
|
||||||
topotools.CopyShardReplications(fromTS, toTS)
|
helpers.CopyShardReplications(fromTS, toTS)
|
||||||
}
|
}
|
||||||
if *doTablets {
|
if *doTablets {
|
||||||
topotools.CopyTablets(fromTS, toTS)
|
helpers.CopyTablets(fromTS, toTS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// topotools package contains a few utility classes to handle topo.Server
|
// helpers package contains a few utility classes to handle topo.Server
|
||||||
// objects, and transitions.
|
// objects, and transitions from one topo implementation to another.
|
||||||
package topotools
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package topotools
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
@ -87,7 +87,7 @@ func createSetup(t *testing.T) (topo.Server, topo.Server) {
|
||||||
t.Fatalf("cannot create slave tablet: %v", err)
|
t.Fatalf("cannot create slave tablet: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
os.Setenv("ZK_CLIENT_CONFIG", testfiles.Locate("topotools_test_zk_client.json"))
|
os.Setenv("ZK_CLIENT_CONFIG", testfiles.Locate("topo_helpers_test_zk_client.json"))
|
||||||
cells, err := fromTS.GetKnownCells()
|
cells, err := fromTS.GetKnownCells()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("fromTS.GetKnownCells: %v", err)
|
t.Fatalf("fromTS.GetKnownCells: %v", err)
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package topotools
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package topotools
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package topotools
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
Загрузка…
Ссылка в новой задаче