Documentation
¶
Overview ¶
Package striper contains a set of wrappers around Ceph's libradosstriper API.
The Striper type supports synchronous operations to read and write data, as well as read and manipulate xattrs. Note that a striped object will consist of one or more objects in RADOS.
There is no object list API in libradosstriper. Listing objects must be done using the base RADOS APIs. Striped objects will be stored in RADOS using the provided Striped Object ID (soid) suffixed by a dot (.) and a 16 byte 0-prefixed hex number (for example, "foo.0000000000000000" or "bar.000000000000000a"). The object suffixed with ".0000000000000000" is the 0-index stripe and will also possess striper specific xattrs (see the ceph libradosstriper implementation for a list) that are hidden from the libradosstriper xattr APIs. You can use the name and/or these striper xattrs to distinguish a striped object from a non-striped RADOS object.
Index ¶
- type Layout
- type StatInfo
- type Striper
- func (s *Striper) Append(soid string, data []byte) error
- func (s *Striper) Destroy()
- func (s *Striper) GetXattr(soid string, name string, data []byte) (int, error)
- func (s *Striper) ListXattrs(soid string) (map[string][]byte, error)
- func (s *Striper) Read(soid string, data []byte, offset uint64) (int, error)
- func (s *Striper) Remove(soid string) error
- func (s *Striper) RmXattr(soid string, name string) error
- func (s *Striper) SetObjectLayoutObjectSize(count uint) error
- func (s *Striper) SetObjectLayoutStripeCount(count uint) error
- func (s *Striper) SetObjectLayoutStripeUnit(count uint) error
- func (s *Striper) SetXattr(soid string, name string, data []byte) error
- func (s *Striper) Stat(soid string) (StatInfo, error)
- func (s *Striper) Truncate(soid string, size uint64) error
- func (s *Striper) Write(soid string, data []byte, offset uint64) error
- func (s *Striper) WriteFull(soid string, data []byte) error
- type Timespec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
Layout contains a group of values used to define the size parameters of striped objects. Note that these parameters only effect new striped objects. Existing striped objects retain the parameters they were created with.
type Striper ¶
type Striper struct {
// contains filtered or unexported fields
}
Striper helps manage the reading, writing, and management of RADOS striped objects.
func NewWithLayout ¶
NewWithLayout returns a rados Striper object created from a rados IOContext and striper layout parameters. These parameters will be used when new objects are created.
func (*Striper) Append ¶
Append the bytes in data to the end of the striped object.
Implements:
int rados_striper_append(rados_striper_t striper, const char *soid, const char *buf, size_t len);
func (*Striper) Destroy ¶
func (s *Striper) Destroy()
Destroy the radosstriper object at the Ceph API level.
func (*Striper) GetXattr ¶
GetXattr retrieves an extended attribute (xattr) of the given name from the specified striped object.
Implements:
int rados_striper_getxattr(rados_striper_t striper, const char *oid, const char *name, char *buf, size_t len);
func (*Striper) ListXattrs ¶
ListXattrs returns a map containing all of the extended attributes (xattrs) for a striped object. The xattr names provide the key strings and the map's values are byte slices.
Implements:
int rados_striper_getxattrs(rados_striper_t striper, const char *oid, rados_xattrs_iter_t *iter);
func (*Striper) Read ¶
Read bytes into data from the striped object at the specified offset.
Implements:
int rados_striper_read(rados_striper_t striper, const char *soid, const char *buf, size_t len, uint64_t off);
func (*Striper) Remove ¶
Remove a striped RADOS object.
Implements:
int rados_striper_remove(rados_striper_t striper, const char *soid);
func (*Striper) RmXattr ¶
RmXattr removes the extended attribute (xattr) of the given name from the striped object.
Implements:
int rados_striper_rmxattr(rados_striper_t striper, const char *oid, const char *name);
func (*Striper) SetObjectLayoutObjectSize ¶
SetObjectLayoutObjectSize sets the object size value used to layout new objects.
Implements:
int rados_striper_set_object_layout_object_size(rados_striper_t striper, unsigned int object_size);
func (*Striper) SetObjectLayoutStripeCount ¶
SetObjectLayoutStripeCount sets the stripe count value used to layout new objects.
Implements:
int rados_striper_set_object_layout_stripe_count(rados_striper_t striper, unsigned int stripe_count);
func (*Striper) SetObjectLayoutStripeUnit ¶
SetObjectLayoutStripeUnit sets the stripe unit value used to layout new objects.
Implements:
int rados_striper_set_object_layout_stripe_unit(rados_striper_t striper, unsigned int stripe_unit);
func (*Striper) SetXattr ¶
SetXattr sets an extended attribute (xattr) of the given name on the specified striped object.
Implements:
int rados_striper_setxattr(rados_striper_t striper, const char *oid, const char *name, const char *buf, size_t len);
func (*Striper) Stat ¶
Stat returns metadata describing the striped object.
Implements:
int rados_striper_stat2(rados_striper_t striper, const char* soid, uint64_t *psize, struct timespec *pmtime);
func (*Striper) Truncate ¶
Truncate a striped object, setting it to the specified size.
Implements:
int rados_striper_trunc(rados_striper_t striper, const char *soid, uint64_t size);
func (*Striper) Write ¶
Write bytes from data into the striped object at the specified offset.
Implements:
int rados_striper_write(rados_striper_t striper, const char *soid, const char *buf, size_t len, uint64_t off);