add dataCenter option when assign file keys

add dataCenter option when starting volume servers
some work related to freeze a volume. Not tested yet.
This commit is contained in:
Chris Lu
2013-06-19 18:10:38 -07:00
parent 715d327df0
commit 50269b74ce
16 changed files with 287 additions and 115 deletions

View File

@@ -34,8 +34,11 @@ func (dn *DataNode) AddOrUpdateVolume(v storage.VolumeInfo) {
dn.volumes[v.Id] = v
}
}
func (dn *DataNode) GetDataCenter() *DataCenter {
return dn.Parent().Parent().(*NodeImpl).value.(*DataCenter)
}
func (dn *DataNode) GetTopology() *Topology {
p := dn.parent
p := dn.Parent()
for p.Parent() != nil {
p = p.Parent()
}