|
@ -44,16 +44,15 @@ type Filer struct { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func NewFiler(masters []string, grpcDialOption grpc.DialOption, |
|
|
func NewFiler(masters []string, grpcDialOption grpc.DialOption, |
|
|
filerHost string, filerGrpcPort uint32, collection string, replication string, notifyFn func()) *Filer { |
|
|
|
|
|
|
|
|
filerHost string, filerGrpcPort uint32, collection string, replication string, dataCenter string, notifyFn func()) *Filer { |
|
|
f := &Filer{ |
|
|
f := &Filer{ |
|
|
MasterClient: wdclient.NewMasterClient(grpcDialOption, "filer", filerHost, filerGrpcPort, masters), |
|
|
|
|
|
|
|
|
MasterClient: wdclient.NewMasterClient(grpcDialOption, "filer", filerHost, filerGrpcPort, dataCenter, masters), |
|
|
fileIdDeletionQueue: util.NewUnboundedQueue(), |
|
|
fileIdDeletionQueue: util.NewUnboundedQueue(), |
|
|
GrpcDialOption: grpcDialOption, |
|
|
GrpcDialOption: grpcDialOption, |
|
|
} |
|
|
} |
|
|
f.LocalMetaLogBuffer = log_buffer.NewLogBuffer(LogFlushInterval, f.logFlushFunc, notifyFn) |
|
|
f.LocalMetaLogBuffer = log_buffer.NewLogBuffer(LogFlushInterval, f.logFlushFunc, notifyFn) |
|
|
f.metaLogCollection = collection |
|
|
f.metaLogCollection = collection |
|
|
f.metaLogReplication = replication |
|
|
f.metaLogReplication = replication |
|
|
|
|
|
|
|
|
go f.loopProcessingDeletion() |
|
|
go f.loopProcessingDeletion() |
|
|
|
|
|
|
|
|
return f |
|
|
return f |
|
|