Custom metadata is user-supplied descriptive information about an object. Custom metadata is specified as annotations, where each annotation is a discrete unit of information about the object. You can add, replace, or delete an annotation in its entirety. You cannot modify it in place.
Each object can have zero or more annotations, including a special one named default (referred to as the default annotation). Custom metadata from releases earlier than 6.0 is converted to the default annotation on upgrade.
Annotations let you compartmentalize custom metadata by logical units, such as organization or application. They can also help prevent collisions between two users or applications trying to update custom metadata at the same time. Annotations can be empty, that is, you can create an annotation that has no content.
Each annotation has a name. The default annotation can be created or accessed without specifying a name or by using the name default. Annotation names must be one through 32 characters long. They must contain at least one alphanumeric character and can contain periods (.), underscores (_), and hyphens (-). Annotation names are case sensitive.
Annotations are typically specified in XML format, but this is not necessarily required. The namespace configuration determines whether HCP checks that annotations are well-formed XML. While checking is enabled, if you try to store an annotation that is not well-formed XML, HCP rejects it.
Custom metadata has these limits:
Description | Limits |
---|---|
Maximum number of annotations per object |
10 |
Maximum annotation size |
1 GB |
Largest annotation that HCP indexes |
1 MB |
Largest nondefault annotation that HCP checks for well-formed XML |
1 MB |
Largest default annotation that HCP checks for well-formed XML |
1 GB |
Maximum level of nested XML elements |
100 |
Maximum number of XML elements in an annotation |
10,000 |
To add, replace, or delete the default annotation, you can use the HTTP or WebDAV protocol. To add, replace, or delete any other annotation, you need to use the HTTP protocol.
With HTTP, you can use a single request to store or retrieve an annotation together with the object data. With WebDAV, you store and retrieve annotations separately from object data.
With WebDAV, you store the default annotation in the custom-metadata.xml metafile. You can also use the custom-metadata.xml metafile to store dead properties. For more information on storing dead properties in the custom-metadata.xml metafile, see Storing dead properties as custom metadata.
With HTTP, you use a GET request to retrieve an annotation for an object. With WebDAV, CIFS, and NFS, you retrieve the default annotation for an object from the custom-metadata.xml metafile.
The namespace configuration determines what you can do with custom metadata for objects that are under retention. The namespace can be set to:
•Allow all annotation operations for objects under retention
•Allow only the addition of new annotations for objects under retention and disallow replacement or deletion of existing annotations
•Disallow all annotation operations for objects under retention
Whether annotations are indexed and how they are indexed depend on system-level and namespace-level settings.
For an example of:
•Storing annotations with the HTTP protocol, see Storing an annotation
•Using a single HTTP request to store object data and an annotation together, see Example 2: Sending object or version data with an annotation (Unix)
•Using a single HTTP request to retrieve object data and an annotation together, see Example 7: Retrieving object data and an annotation together (Java)
•Storing WebDAV dead properties in the custom-metadata.xml metafile, see Example 4: Storing a dead property as custom metadata (WebDAV).
© 2016 Hitachi Data Systems Corporation. All rights reserved.