Skip to content

Commit

Permalink
adjust the structure of directories (pingcap#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanfei1991 authored Dec 20, 2021
1 parent 4a237a6 commit 63cdbb5
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/master-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"

"github.com/hanfei1991/microcosm/client"
"github.com/hanfei1991/microcosm/master/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/pb"
"github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions executor/runtime/jobmaster/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/hanfei1991/microcosm/client"
"github.com/hanfei1991/microcosm/executor/runtime"
"github.com/hanfei1991/microcosm/master/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/master/jobmaster/system"
"github.com/hanfei1991/microcosm/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/jobmaster/system"
"github.com/hanfei1991/microcosm/model"
"github.com/hanfei1991/microcosm/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion executor/runtime/jobmaster/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/hanfei1991/microcosm/executor/runtime"
"github.com/hanfei1991/microcosm/master/jobmaster/system"
"github.com/hanfei1991/microcosm/jobmaster/system"
"github.com/pingcap/tiflow/dm/pkg/log"
"go.uber.org/zap"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"

"github.com/hanfei1991/microcosm/client"
"github.com/hanfei1991/microcosm/master/jobmaster/system"
"github.com/hanfei1991/microcosm/jobmaster/system"
"github.com/hanfei1991/microcosm/model"
"github.com/hanfei1991/microcosm/pkg/autoid"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package benchmark
import (
"context"

"github.com/hanfei1991/microcosm/master/jobmaster/system"
"github.com/hanfei1991/microcosm/jobmaster/system"
"github.com/hanfei1991/microcosm/model"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cluster
package master

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion master/jobmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/hanfei1991/microcosm/client"
"github.com/hanfei1991/microcosm/master/jobmaster/system"
"github.com/hanfei1991/microcosm/jobmaster/system"
"github.com/hanfei1991/microcosm/model"
"github.com/hanfei1991/microcosm/pb"
"github.com/hanfei1991/microcosm/pkg/autoid"
Expand Down
5 changes: 2 additions & 3 deletions master/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"net"

"github.com/hanfei1991/microcosm/master/cluster"
"github.com/hanfei1991/microcosm/model"
"github.com/hanfei1991/microcosm/pb"
"github.com/hanfei1991/microcosm/pkg/errors"
Expand All @@ -29,7 +28,7 @@ type Server struct {
// election *election.Election

// sched scheduler
executorManager *cluster.ExecutorManager
executorManager *ExecutorManager
jobManager *JobManager
//
cfg *Config
Expand All @@ -43,7 +42,7 @@ type Server struct {
// NewServer creates a new master-server.
func NewServer(cfg *Config, ctx *test.Context) (*Server, error) {
executorNotifier := make(chan model.ExecutorID, 100)
executorManager := cluster.NewExecutorManager(executorNotifier, cfg.KeepAliveTTL, cfg.KeepAliveInterval, ctx)
executorManager := NewExecutorManager(executorNotifier, cfg.KeepAliveTTL, cfg.KeepAliveInterval, ctx)

urls, err := parseURLs(cfg.MasterAddr)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/hanfei1991/microcosm/client"
"github.com/hanfei1991/microcosm/executor"
"github.com/hanfei1991/microcosm/executor/runtime"
"github.com/hanfei1991/microcosm/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/master"
"github.com/hanfei1991/microcosm/master/jobmaster/benchmark"
"github.com/hanfei1991/microcosm/pb"
"github.com/hanfei1991/microcosm/pkg/etcdutils"
. "github.com/pingcap/check"
Expand Down

0 comments on commit 63cdbb5

Please sign in to comment.