You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
433 B

7 years ago
  1. package needle
  2. import (
  3. . "github.com/chrislusf/seaweedfs/weed/storage/types"
  4. "github.com/google/btree"
  5. )
  6. const (
  7. batch = 100000
  8. )
  9. type NeedleValue struct {
  10. Key NeedleId
  11. Offset Offset `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G
  12. Size uint32 `comment:"Size of the data portion"`
  13. }
  14. func (this NeedleValue) Less(than btree.Item) bool {
  15. that := than.(NeedleValue)
  16. return this.Key < that.Key
  17. }