mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
1c2affea8e
|
@ -7,7 +7,7 @@ RUN echo tlsv1 >> ~/.curlrc
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
curl -Lks https://bintray.com$(curl -Lk http://bintray.com/chrislusf/seaweedfs/seaweedfs/_latestVersion | grep linux_amd64.tar.gz | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp") | gunzip | tar -xf - -C /opt/weed/ && \
|
curl -Lks https://bintray.com$(curl -Lk http://bintray.com/chrislusf/seaweedfs/seaweedfs/_latestVersion | grep linux_amd64.tar.gz | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp") | gunzip | tar -xf - -C /opt/weed/ && \
|
||||||
mkdir ./bin && mv weed_*/* ./bin && \
|
mkdir ./bin && mv ./*/* ./bin && \
|
||||||
chmod +x ./bin/weed
|
chmod +x ./bin/weed
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
|
@ -51,7 +51,7 @@ func init() {
|
||||||
var (
|
var (
|
||||||
output = cmdExport.Flag.String("o", "", "output tar file name, must ends with .tar, or just a \"-\" for stdout")
|
output = cmdExport.Flag.String("o", "", "output tar file name, must ends with .tar, or just a \"-\" for stdout")
|
||||||
format = cmdExport.Flag.String("fileNameFormat", defaultFnFormat, "filename formatted with {{.Mime}} {{.Id}} {{.Name}} {{.Ext}}")
|
format = cmdExport.Flag.String("fileNameFormat", defaultFnFormat, "filename formatted with {{.Mime}} {{.Id}} {{.Name}} {{.Ext}}")
|
||||||
newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone")
|
newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone, e.g. 2006-01-02T15:04:05")
|
||||||
|
|
||||||
tarOutputFile *tar.Writer
|
tarOutputFile *tar.Writer
|
||||||
tarHeader tar.Header
|
tarHeader tar.Header
|
||||||
|
|
|
@ -53,7 +53,7 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo
|
||||||
for _, v := range actualVolumes {
|
for _, v := range actualVolumes {
|
||||||
actualVolumeMap[v.Id] = v
|
actualVolumeMap[v.Id] = v
|
||||||
}
|
}
|
||||||
dn.RLock()
|
dn.Lock()
|
||||||
for vid, v := range dn.volumes {
|
for vid, v := range dn.volumes {
|
||||||
if _, ok := actualVolumeMap[vid]; !ok {
|
if _, ok := actualVolumeMap[vid]; !ok {
|
||||||
glog.V(0).Infoln("Deleting volume id:", vid)
|
glog.V(0).Infoln("Deleting volume id:", vid)
|
||||||
|
@ -62,8 +62,8 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo
|
||||||
dn.UpAdjustVolumeCountDelta(-1)
|
dn.UpAdjustVolumeCountDelta(-1)
|
||||||
dn.UpAdjustActiveVolumeCountDelta(-1)
|
dn.UpAdjustActiveVolumeCountDelta(-1)
|
||||||
}
|
}
|
||||||
} //TODO: adjust max volume id, if need to reclaim volume ids
|
}
|
||||||
dn.RUnlock()
|
dn.Unlock()
|
||||||
for _, v := range actualVolumes {
|
for _, v := range actualVolumes {
|
||||||
dn.AddOrUpdateVolume(v)
|
dn.AddOrUpdateVolume(v)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue