The metadata associated with an object is immutable. There is no operation to modify the
metadata associated with an object after the object has been stored. Instead, the storeMetadata
operation can be used to create a completely new object by associating new user metadata with
the underlying data and system-metadata of an existing object. The storeMetadata operation
does not merge the new metadata in with the metadata from the original OID; instead, the
storeMetadata operation creates a new metadata record pointing to the same data object. To
accomplish a merge of new eld values into existing metadata, the customer application must
manually retrieve the existing metadata from the original object, perform the merge into a
single NameValueRecord on the client side, and then call storeMetadata to create a new object
with the merged metadata.
When creating a new object using storeMetadata, a new system.object_id and new
system.object_ctime are generated, to indicate that a new object has been created. The
metadata computed from the object data itself (system.object_length,
system.object_hash_alg, and system.object_hash) does not change. Both the storeObject
and the storeMetadata operations return a SystemRecord value that includes all of the
system-assigned elds.
While retrieving the OID is the most common use of the SystemRecord, the other system elds
can also be helpful. For example, the customer application might use the
system.object_length, the system.object_hash_alg and the system.object_hash elds to
verify that the data as stored matches the data as present in the customer application. If a hash
independently computed on the client matches the hash stored on the 5800 system, then the
data store has been validated.
The metadata values associated with an object can be retrieved using the retrieveMetadata
operation. The retrieveMetadata operation takes an OID as input, and returns the entire set
of user, system, and system-computed metadata. The retrieved metadata is in the form of a
NameValueRecord that contains the value of each eld as originally stored. The system elds
occur using their eld names, for example. the eld system.object_ctime contains the object
creation time. There is no operation to retrieve just a single eld or a subset of elds by
supplying a list of eld names. The retrieveMetadata operation retrieves the values of both
queryable and non-queryable elds.
The 5800 System Query Model
One of the primary methods for retrieving data is to specify the characteristics of the desired
data and then let the system nd it for you. In the 5800 system, a query expression species a set
of conditions on metadata eld values. The system then returns a list of all the objects whose
metadata values match the query conditions. Each object is considered individually without
reference to any other objects. There are no queries that compare elds in one object with elds
in a dierent object.
5800SystemOverview
SunStorageTek 5800SystemClientAPIReferenceManual • June 200820