Interface ValidationContext
@Evolving
public interface ValidationContext
A context that contains useful information for request validator instances.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.ozone.om.helpers.BucketLayoutgetBucketLayout(String volumeName, String bucketName) Gets theBucketLayoutof the given bucket.static ValidationContextof(org.apache.hadoop.ozone.upgrade.LayoutVersionManager versionManager, org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager) Creates a context object based on the given parameters.org.apache.hadoop.ozone.upgrade.LayoutVersionManagerGets theLayoutVersionManagerof the service, so that a pre finalization validation can check if the layout version it belongs to is finalized already or not.
-
Method Details
-
versionManager
org.apache.hadoop.ozone.upgrade.LayoutVersionManager versionManager()Gets theLayoutVersionManagerof the service, so that a pre finalization validation can check if the layout version it belongs to is finalized already or not.- Returns:
- the
LayoutVersionManagerof the service
-
getBucketLayout
org.apache.hadoop.ozone.om.helpers.BucketLayout getBucketLayout(String volumeName, String bucketName) throws IOException Gets theBucketLayoutof the given bucket. In case of a link bucket the method returns the layout of the source bucket.- Returns:
BucketLayoutof the given bucket.- Throws:
IOException
-
of
static ValidationContext of(org.apache.hadoop.ozone.upgrade.LayoutVersionManager versionManager, org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager) Creates a context object based on the given parameters.- Parameters:
versionManager- theLayoutVersionManagerof the service- Returns:
- the
ValidationContextspecified by the parameters.
-