Skip to content

Commit

Permalink
*: update the import path(release-3.0) (#2779)
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <[email protected]>
  • Loading branch information
nolouch authored Aug 24, 2020
1 parent 4f91897 commit 1f26153
Show file tree
Hide file tree
Showing 196 changed files with 529 additions and 529 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Thank you for working on PD! Please read PD's [CONTRIBUTING](https://github.com/pingcap/pd/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
Thank you for working on PD! Please read PD's [CONTRIBUTING](https://github.com/tikv/pd/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
-->

### What problem does this PR solve? <!--add the issue link with summary if it exists-->
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cache:
directories:
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
- $GOPATH/src/github.com/pingcap/pd/.retools
- $GOPATH/src/github.com/tikv/pd/.retools

go:
- 1.13
Expand Down
144 changes: 72 additions & 72 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ RUN cd / && \
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq && \
chmod +x jq

RUN mkdir -p /go/src/github.com/pingcap/pd
WORKDIR /go/src/github.com/pingcap/pd
RUN mkdir -p /go/src/github.com/tikv/pd
WORKDIR /go/src/github.com/tikv/pd

# Cache dependencies
COPY go.mod .
Expand All @@ -25,8 +25,8 @@ RUN make

FROM alpine:3.5

COPY --from=builder /go/src/github.com/pingcap/pd/bin/pd-server /pd-server
COPY --from=builder /go/src/github.com/pingcap/pd/bin/pd-ctl /pd-ctl
COPY --from=builder /go/src/github.com/tikv/pd/bin/pd-server /pd-server
COPY --from=builder /go/src/github.com/tikv/pd/bin/pd-ctl /pd-ctl
COPY --from=builder /jq /usr/local/bin/jq

EXPOSE 2379 2380
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PD_PKG := github.com/pingcap/pd/v3
PD_PKG := github.com/tikv/pd

TEST_PKGS := $(shell find . -iname "*_test.go" -exec dirname {} \; | \
uniq | sed -e "s/^\./github.com\/pingcap\/pd\/v3/")
uniq | sed -e "s/^\./github.com\/tikv\/pd/")
INTEGRATION_TEST_PKGS := $(shell find . -iname "*_test.go" -exec dirname {} \; | \
uniq | sed -e "s/^\./github.com\/pingcap\/pd\/v3/" | grep -E "tests")
uniq | sed -e "s/^\./github.com\/tikv\/pd/" | grep -E "tests")
BASIC_TEST_PKGS := $(filter-out $(INTEGRATION_TEST_PKGS),$(TEST_PKGS))

PACKAGES := go list ./...
Expand Down Expand Up @@ -99,7 +99,7 @@ travis_coverage: export GO111MODULE=on
travis_coverage:
ifeq ("$(TRAVIS_COVERAGE)", "1")
@$(FAILPOINT_ENABLE)
CGO_ENABLED=1 ./scripts/retool do $(OVERALLS) -concurrency=8 -project=github.com/pingcap/pd -covermode=count -ignore='.git,vendor' -- -coverpkg=./... || { $(FAILPOINT_DISABLE); exit 1; }
CGO_ENABLED=1 ./scripts/retool do $(OVERALLS) -concurrency=8 -project=github.com/tikv/pd -covermode=count -ignore='.git,vendor' -- -coverpkg=./... || { $(FAILPOINT_DISABLE); exit 1; }
@$(FAILPOINT_DISABLE)
else
@echo "coverage only runs in travis."
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PD

[![TravisCI Build Status](https://travis-ci.org/pingcap/pd.svg?branch=master)](https://travis-ci.org/pingcap/pd)
![GitHub release](https://img.shields.io/github/release/pingcap/pd.svg)
[![CircleCI Build Status](https://circleci.com/gh/pingcap/pd.svg?style=shield)](https://circleci.com/gh/pingcap/pd)
[![Go Report Card](https://goreportcard.com/badge/github.com/pingcap/pd)](https://goreportcard.com/report/github.com/pingcap/pd)
[![codecov](https://codecov.io/gh/pingcap/pd/branch/master/graph/badge.svg)](https://codecov.io/gh/pingcap/pd)
[![TravisCI Build Status](https://travis-ci.org/tikv/pd.svg?branch=master)](https://travis-ci.org/tikv/pd)
![GitHub release](https://img.shields.io/github/release/tikv/pd.svg)
[![CircleCI Build Status](https://circleci.com/gh/tikv/pd.svg?style=shield)](https://circleci.com/gh/tikv/pd)
[![Go Report Card](https://goreportcard.com/badge/github.com/tikv/pd)](https://goreportcard.com/report/github.com/tikv/pd)
[![codecov](https://codecov.io/gh/tikv/pd/branch/master/graph/badge.svg)](https://codecov.io/gh/tikv/pd)

PD is the abbreviation for Placement Driver. It is used to manage and schedule the [TiKV](https://github.com/tikv/tikv) cluster.

Expand Down Expand Up @@ -76,13 +76,13 @@ X-Etcd-Cluster-Id: 33dc747581249309
You can use the following command to build a PD image directly:

```bash
docker build -t pingcap/pd .
docker build -t tikv/pd .
```

Or you can also use following command to get PD from Docker hub:

```bash
docker pull pingcap/pd
docker pull tikv/pd
```

Run a single node with Docker:
Expand All @@ -91,7 +91,7 @@ Run a single node with Docker:
# Set correct HostIP here.
export HostIP="192.168.199.105"

docker run -d -p 2379:2379 -p 2380:2380 --name pd pingcap/pd \
docker run -d -p 2379:2379 -p 2380:2380 --name pd tikv/pd \
--name="pd" \
--data-dir="pd" \
--client-urls="http://0.0.0.0:2379" \
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# For `--version`
$PD_PKG = "github.com/pingcap/pd"
$PD_PKG = "github.com/tikv/pd"
$GO_LDFLAGS = "-X `"$PD_PKG/server.PDReleaseVersion=$(git describe --tags --dirty)`""
$GO_LDFLAGS += " -X `"$PD_PKG/server.PDBuildTS=$(date -u '+%Y-%m-%d_%I:%M:%S')`""
$GO_LDFLAGS += " -X `"$PD_PKG/server.PDGitHash=$(git rev-parse HEAD)`""
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
docker:
- image: golang:1.12
working_directory: /go/src/github.com/pingcap/pd
working_directory: /go/src/github.com/tikv/pd
steps:
- checkout
- restore_cache:
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/log"
"github.com/pingcap/pd/v3/pkg/grpcutil"
"github.com/pkg/errors"
"github.com/tikv/pd/pkg/grpcutil"
"go.uber.org/zap"
"google.golang.org/grpc"
)
Expand Down
8 changes: 4 additions & 4 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
. "github.com/pingcap/check"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/pd/v3/pkg/mock/mockid"
"github.com/pingcap/pd/v3/pkg/testutil"
"github.com/pingcap/pd/v3/server"
"github.com/pingcap/pd/v3/server/core"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/testutil"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/core"
"google.golang.org/grpc"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/pd-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ import (

grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
log "github.com/pingcap/log"
"github.com/pingcap/pd/v3/pkg/logutil"
"github.com/pingcap/pd/v3/pkg/metricutil"
"github.com/pingcap/pd/v3/server"
"github.com/pingcap/pd/v3/server/api"
"github.com/pkg/errors"
"github.com/tikv/pd/pkg/logutil"
"github.com/tikv/pd/pkg/metricutil"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/api"
"go.uber.org/zap"

// Register schedulers.
_ "github.com/pingcap/pd/v3/server/schedulers"
_ "github.com/tikv/pd/server/schedulers"
// Register namespace classifiers.
_ "github.com/pingcap/pd/v3/table"
_ "github.com/tikv/pd/table"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions docs/development-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Start by forking the `pd` GitHub repository, make changes in a branch and then s
## Set up your pd GitHub Repository


After forking the [PD upstream](https://github.com/pingcap/pd/fork) source repository to your personal repository. You can set up your personal development environment for PD project.
After forking the [PD upstream](https://github.com/tikv/pd/fork) source repository to your personal repository. You can set up your personal development environment for PD project.

```sh
$ cd $GOPATH/src/github.com/pingcap
Expand All @@ -18,7 +18,7 @@ $ cd pd


```sh
$ git remote add upstream https://github.com/pingcap/pd
$ git remote add upstream https://github.com/tikv/pd
$ git fetch upstream
$ git merge upstream/master
...
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The full test suite is ran with:

This takes a while to run. The test suite uses a fork of [gocheck](http://labix.org/gocheck). With gocheck, individual tests can be ran with this form:

go test github.com/pingcap/pd/server/api -check.f TestJsonRespondError
go test github.com/tikv/pd/server/api -check.f TestJsonRespondError

# Changing APIs

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/pingcap/pd/v3
module github.com/tikv/pd

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion pkg/etcdutil/etcdutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/pkg/tempurl"
"github.com/tikv/pd/pkg/tempurl"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion pkg/logutil/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *testLogSuite) TestLogging(c *C) {

log.SetOutput(s.buf)

tlog := capnslog.NewPackageLogger("github.com/pingcap/pd/pkg/logutil", "test")
tlog := capnslog.NewPackageLogger("github.com/tikv/pd/pkg/logutil", "test")

tlog.Infof("[this message should not be sent to buf]")
c.Assert(s.buf.Len(), Equals, 0)
Expand Down
2 changes: 1 addition & 1 deletion pkg/metricutil/metricutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"unicode"

log "github.com/pingcap/log"
"github.com/pingcap/pd/v3/pkg/typeutil"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/push"
"github.com/tikv/pd/pkg/typeutil"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/metricutil/metricutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"time"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/pkg/typeutil"
"github.com/tikv/pd/pkg/typeutil"
)

func Test(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/mock/mockclassifier/mockclassifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package mockclassifier

import "github.com/pingcap/pd/v3/server/core"
import "github.com/tikv/pd/server/core"

// Classifier is used for test purpose.
type Classifier struct{}
Expand Down
10 changes: 5 additions & 5 deletions pkg/mock/mockcluster/mockcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
log "github.com/pingcap/log"
"github.com/pingcap/pd/v3/pkg/mock/mockid"
"github.com/pingcap/pd/v3/pkg/mock/mockoption"
"github.com/pingcap/pd/v3/server/core"
"github.com/pingcap/pd/v3/server/namespace"
"github.com/pingcap/pd/v3/server/statistics"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/mock/mockoption"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/namespace"
"github.com/tikv/pd/server/statistics"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/mock/mockhbstream/mockhbstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/pd/v3/server/core"
"github.com/tikv/pd/server/core"
)

// HeartbeatStream is used to mock HeartbeatStream for test use.
Expand Down
2 changes: 1 addition & 1 deletion pkg/mock/mockoption/mockoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"time"

"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/pd/v3/server/core"
"github.com/tikv/pd/server/core"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/operator_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package testutil

import (
check "github.com/pingcap/check"
"github.com/pingcap/pd/v3/server/schedule"
"github.com/tikv/pd/server/schedule"
)

// CheckAddPeer checks if the operator is to add peer on specified store.
Expand Down
2 changes: 1 addition & 1 deletion server/api/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strconv"

"github.com/gorilla/mux"
"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
4 changes: 2 additions & 2 deletions server/api/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"net/http"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/server"
"github.com/pingcap/pd/v3/server/core"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/core"
)

var _ = Suite(&testAdminSuite{})
Expand Down
2 changes: 1 addition & 1 deletion server/api/classifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package api
import (
"net/http"

"github.com/pingcap/pd/v3/server"
"github.com/pkg/errors"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package api
import (
"net/http"

"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

. "github.com/pingcap/check"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
)

var _ = Suite(&testClusterInfo{})
Expand Down
2 changes: 1 addition & 1 deletion server/api/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/gorilla/mux"
"github.com/pingcap/errcode"
"github.com/pingcap/pd/v3/server"
"github.com/pkg/errors"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
)

var _ = Suite(&testConfigSuite{})
Expand Down
2 changes: 1 addition & 1 deletion server/api/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"time"

"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/pd/v3/server"
"github.com/pkg/errors"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/diagnose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"net/http"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
)

var _ = Suite(&testDiagnoseAPISuite{})
Expand Down
2 changes: 1 addition & 1 deletion server/api/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package api
import (
"net/http"

"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"

. "github.com/pingcap/check"
"github.com/pingcap/pd/v3/server"
"github.com/tikv/pd/server"
)

var _ = Suite(&testHealthAPISuite{})
Expand Down
Loading

0 comments on commit 1f26153

Please sign in to comment.