fix some typos

This commit is contained in:
Lei Xue 2015-01-13 18:46:56 +08:00
parent 5afdc469a3
commit 029e3a3822
5 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ func (n *Needle) Append(w io.Writer, version Version) (size uint32, err error) {
} }
}(s, end) }(s, end)
} else { } else {
err = fmt.Errorf("Cnnot Read Current Volume Position: %s", e.Error()) err = fmt.Errorf("Cannot Read Current Volume Position: %s", e.Error())
return return
} }
} }

View file

@ -64,7 +64,7 @@ func (mn *MasterNodes) findMaster() (string, error) {
} }
} }
if mn.lastNode < 0 { if mn.lastNode < 0 {
return "", errors.New("No master node avalable!") return "", errors.New("No master node available!")
} }
return mn.nodes[mn.lastNode], nil return mn.nodes[mn.lastNode], nil
} }

View file

@ -175,7 +175,7 @@ func (v *Volume) write(n *Needle) (size uint32, err error) {
} }
var offset int64 var offset int64
if offset, err = v.dataFile.Seek(0, 2); err != nil { if offset, err = v.dataFile.Seek(0, 2); err != nil {
glog.V(0).Infof("faile to seek the end of file: %v", err) glog.V(0).Infof("failed to seek the end of file: %v", err)
return return
} }

View file

@ -119,7 +119,7 @@ func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool {
func (t *Topology) PickForWrite(count int, option *VolumeGrowOption) (string, int, *DataNode, error) { func (t *Topology) PickForWrite(count int, option *VolumeGrowOption) (string, int, *DataNode, error) {
vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl).PickForWrite(count, option) vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl).PickForWrite(count, option)
if err != nil || datanodes.Length() == 0 { if err != nil || datanodes.Length() == 0 {
return "", 0, nil, errors.New("No writable volumes avalable!") return "", 0, nil, errors.New("No writable volumes available!")
} }
fileId, count := t.Sequence.NextFileId(count) fileId, count := t.Sequence.NextFileId(count)
return storage.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nil return storage.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nil

View file

@ -93,7 +93,7 @@ func (w *countingWriter) Write(p []byte) (n int, err error) {
return len(p), nil return len(p), nil
} }
// rangesMIMESize returns the nunber of bytes it takes to encode the // rangesMIMESize returns the number of bytes it takes to encode the
// provided ranges as a multipart response. // provided ranges as a multipart response.
func rangesMIMESize(ranges []httpRange, contentType string, contentSize int64) (encSize int64) { func rangesMIMESize(ranges []httpRange, contentType string, contentSize int64) (encSize int64) {
var w countingWriter var w countingWriter