Skip to content

Commit

Permalink
better name
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed Jan 9, 2016
1 parent ea77d37 commit 8ee1051
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions agent/agent_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type AgentServer struct {
computeResource *resource.ComputeResource
allocatedResource *resource.ComputeResource
allocatedResourceLock sync.Mutex
storageBackend *LocalDataShardsManager
storageBackend *LocalDatasetShardsManager
}

func NewAgentServer(option *AgentServerOption) *AgentServer {
Expand All @@ -58,7 +58,7 @@ func NewAgentServer(option *AgentServerOption) *AgentServer {
Option: option,
Master: *option.Master,
Port: *option.Port,
storageBackend: NewLocalDataShardsManager(*option.Dir, *option.Port),
storageBackend: NewLocalDatasetShardsManager(*option.Dir, *option.Port),
computeResource: &resource.ComputeResource{
CPUCount: *option.MaxExecutor,
CPULevel: *option.CPULevel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
"github.com/chrislusf/glow/netchan/store"
)

type LocalDataShardsManager struct {
type LocalDatasetShardsManager struct {
sync.Mutex
dir string
port int
name2Store map[string]store.DataStore
name2StoreCond *sync.Cond
}

func NewLocalDataShardsManager(dir string, port int) *LocalDataShardsManager {
m := &LocalDataShardsManager{
func NewLocalDatasetShardsManager(dir string, port int) *LocalDatasetShardsManager {
m := &LocalDatasetShardsManager{
dir: dir,
port: port,
name2Store: make(map[string]store.DataStore),
Expand All @@ -26,7 +26,7 @@ func NewLocalDataShardsManager(dir string, port int) *LocalDataShardsManager {
return m
}

func (m *LocalDataShardsManager) doDelete(name string) {
func (m *LocalDatasetShardsManager) doDelete(name string) {

ds, ok := m.name2Store[name]
if !ok {
Expand All @@ -38,7 +38,7 @@ func (m *LocalDataShardsManager) doDelete(name string) {
ds.Destroy()
}

func (m *LocalDataShardsManager) DeleteNamedDatasetShard(name string) {
func (m *LocalDatasetShardsManager) DeleteNamedDatasetShard(name string) {

m.Lock()
defer m.Unlock()
Expand All @@ -47,7 +47,7 @@ func (m *LocalDataShardsManager) DeleteNamedDatasetShard(name string) {

}

func (m *LocalDataShardsManager) CreateNamedDatasetShard(name string) store.DataStore {
func (m *LocalDatasetShardsManager) CreateNamedDatasetShard(name string) store.DataStore {

m.Lock()
defer m.Unlock()
Expand All @@ -71,7 +71,7 @@ func (m *LocalDataShardsManager) CreateNamedDatasetShard(name string) store.Data

}

func (m *LocalDataShardsManager) WaitForNamedDatasetShard(name string) store.DataStore {
func (m *LocalDatasetShardsManager) WaitForNamedDatasetShard(name string) store.DataStore {

m.Lock()
defer m.Unlock()
Expand Down

0 comments on commit 8ee1051

Please sign in to comment.