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.

17 lines
410 B

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