Package org.apache.hadoop.ozone.om
Class OzoneManager
java.lang.Object
org.apache.hadoop.hdds.server.ServiceRuntimeInfoImpl
org.apache.hadoop.ozone.om.OzoneManager
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.hdds.server.ServiceRuntimeInfo,org.apache.hadoop.ozone.audit.Auditor,org.apache.hadoop.ozone.om.IOmMetadataReader,OMMXBean,org.apache.hadoop.ozone.om.protocol.OMInterServiceProtocol,org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol,org.apache.hadoop.ozone.om.protocol.OzoneManagerSecurityProtocol
@LimitedPrivate({"HDFS","CBLOCK","OZONE","HBASE"})
public final class OzoneManager
extends org.apache.hadoop.hdds.server.ServiceRuntimeInfoImpl
implements org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol, org.apache.hadoop.ozone.om.protocol.OMInterServiceProtocol, OMMXBean, org.apache.hadoop.ozone.audit.Auditor
Ozone Manager is the metadata manager of ozone.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
versionID -
Method Summary
Modifier and TypeMethodDescriptionvoidWait until both buffers are flushed.voidbootstrap(org.apache.hadoop.ozone.om.helpers.OMNodeDetails newOMNode) org.apache.hadoop.ozone.audit.AuditMessagebuildAuditMessageForFailure(org.apache.hadoop.ozone.audit.AuditAction op, Map<String, String> auditMap, Throwable throwable) org.apache.hadoop.ozone.audit.AuditMessagebuildAuditMessageForSuccess(org.apache.hadoop.ozone.audit.AuditAction op, Map<String, String> auditMap) voidcancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> token) Cancels a delegation token.org.apache.hadoop.ozone.snapshot.CancelSnapshotDiffResponsecancelSnapshotDiff(String volume, String bucket, String fromSnapshot, String toSnapshot) booleancheckAcls(org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType, org.apache.hadoop.ozone.security.acl.OzoneObj.StoreType storeType, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType aclType, String vol, String bucket, String key, org.apache.hadoop.security.UserGroupInformation ugi, InetAddress remoteAddress, String hostName, boolean throwIfPermissionDenied, String owner) CheckAcls for the ozone object.voidcheckFeatureEnabled(org.apache.hadoop.ozone.OzoneManagerVersion feature) voidChecks the leader status.voidThrows OMException FEATURE_NOT_ENABLED if S3 multi-tenancy is not enabled.voidclose()voidcompactOMDB(String columnFamily) static OzoneManagercreateOm(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) Constructs OM instance based on the configuration.static OzoneManagercreateOm(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, OzoneManager.StartupOption startupOption) booleandoesPeerExist(String omNodeId) Check if the input nodeId exists in the peers list.org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.EchoRPCResponseechoRPCReq(byte[] payloadReq, int payloadSizeResp, boolean writeToRatis) org.apache.hadoop.ozone.upgrade.UpgradeFinalization.StatusAndMessagesfinalizeUpgrade(String upgradeClientID) org.apache.hadoop.ozone.security.acl.IAccessAuthorizerList<org.apache.hadoop.ozone.OzoneAcl> getAcl(org.apache.hadoop.ozone.security.acl.OzoneObj obj) booleanReturn true if Ozone acl's are enabled, else false.List<org.apache.hadoop.ozone.om.helpers.OMNodeDetails> Return list of all current OM peers (does not reload configuration from disk to find newly configured OMs).List<org.apache.hadoop.ozone.om.helpers.OMNodeDetails> Reload configuration from disk and return all the OM nodes present in the new conf under current serviceId.booleanorg.apache.hadoop.ozone.audit.AuditLoggerorg.apache.hadoop.hdds.security.token.OzoneBlockTokenSecretManagerorg.apache.hadoop.hdds.security.token.OzoneBlockTokenSecretManagerReturn SecretManager for OM.org.apache.hadoop.ozone.om.helpers.OmBucketInfogetBucketInfo(String volume, String bucket) Gets the bucket information.getBucketOwner(String volume, String bucket, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType type, org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType) Return the owner of a given bucket.org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClientorg.apache.hadoop.hdds.scm.net.NetworkTopologyorg.apache.hadoop.ozone.om.OmConfigorg.apache.hadoop.hdds.conf.OzoneConfigurationorg.apache.hadoop.ozone.om.helpers.DBUpdatesgetDBUpdates(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DBUpdatesRequest dbUpdatesRequest) Get DB updates since a specific sequence number.org.apache.hadoop.hdds.client.ReplicationConfigorg.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer) Get delegation token from OzoneManager.booleanorg.apache.hadoop.ozone.om.helpers.OzoneFileStatusgetFileStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) Gets the OM hostname.org.apache.hadoop.ozone.om.helpers.KeyInfoWithVolumeContextgetKeyInfo(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean assumeS3Context) booleanorg.apache.hadoop.crypto.key.KeyProviderCryptoExtensionstatic org.slf4j.LoggerlongReturn maximum volumes count per user.org.apache.hadoop.ozone.om.OMMetadataManagerGet metadata manager.intGet metadata manager.org.apache.hadoop.ozone.om.helpers.OMNodeDetailslonggetObjectIdFromTxId(long trxnId) getObjectTagging(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) Return the list of Ozone administrators in effect.org.apache.hadoop.ozone.om.helpers.BucketLayoutstatic org.apache.hadoop.hdds.protocol.proto.HddsProtos.OzoneManagerDetailsProtogetOmDetailsProto(org.apache.hadoop.hdds.conf.ConfigurationSource config, String omID) org.apache.ratis.util.function.UncheckedAutoCloseableSupplier<org.apache.hadoop.ozone.om.IOmMetadataReader> org.apache.ratis.util.LifeCycle.StateGet snapshot manager.org.apache.hadoop.ozone.om.helpers.OMNodeDetailsgetPeerNode(String nodeID) List<org.apache.hadoop.ozone.om.helpers.OMNodeDetails> intReturn config value ofOzoneConfigKeys.OZONE_KEY_PREALLOCATION_BLOCKS_MAX.longorg.apache.hadoop.hdds.conf.ReconfigurationHandlerorg.apache.hadoop.hdds.client.ReplicationConfigValidatorstatic org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3AuthenticationReturns theOzoneManagerProtocolProtos.S3Authenticationfor the current rpc handler thread.org.apache.hadoop.ozone.om.S3SecretManagerorg.apache.hadoop.ozone.om.helpers.S3VolumeContextlongReturn config value ofOzoneConfigKeys.OZONE_SCM_BLOCK_SIZE.Return scmClient.org.apache.hadoop.ozone.om.helpers.ServiceInfoExList<org.apache.hadoop.ozone.om.helpers.ServiceInfo> org.apache.hadoop.ozone.om.helpers.SnapshotInfogetSnapshotInfo(String volumeName, String bucketName, String snapshotName) org.apache.hadoop.ozone.audit.AuditLoggerReturns the ThreadName prefix for the current OM.org.apache.hadoop.hdds.utils.TransactionInfoorg.apache.hadoop.ozone.om.helpers.OmVolumeArgsgetVolumeInfo(String volume) Gets the volume information.getVolumeOwner(String vol, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType type, org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType) voidinitializeEdekCache(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) static voidinitializeSecurity(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, OMStorage omStore, String scmId) Initializes secure OzoneManager.org.apache.ratis.server.protocol.TermIndexinstallSnapshotFromLeader(String leaderId) Download and install latest checkpoint from leader OM.booleanisAdmin(org.apache.hadoop.security.UserGroupInformation callerUgi) Return true if a UserGroupInformation is OM admin, false otherwise.booleanbooleanReturn config value ofHddsConfigKeys.HDDS_BLOCK_TOKEN_ENABLED.booleanReturn true, if the current OM node is leader and in ready state to process the requests.booleanbooleanbooleanisReadOnlyAdmin(org.apache.hadoop.security.UserGroupInformation callerUgi) booleanbooleanisS3Admin(org.apache.hadoop.security.UserGroupInformation callerUgi) booleanReturns true if S3 multi-tenancy is enabled; false otherwise.booleanReturn config value ofOzoneConfigKeys.OZONE_SECURITY_ENABLED_KEY.booleanReturn true if SPNEGO auth is enabled for OM HTTP server, otherwise false.booleanbooleanbooleanvoidjoin()Wait until service has completed shutdown.List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs> listAllVolumes(String prefix, String prevKey, int maxKeys) Lists volume all volumes in the cluster.List<org.apache.hadoop.ozone.om.helpers.OmBucketInfo> listBuckets(String volumeName, String startKey, String prefix, int maxNumOfBuckets, boolean hasSnapshot) org.apache.hadoop.ozone.om.helpers.ListKeysResultorg.apache.hadoop.ozone.om.helpers.ListKeysLightResultlistKeysLight(String volumeName, String bucketName, String startKey, String keyPrefix, int maxKeys) org.apache.hadoop.ozone.om.helpers.OmMultipartUploadListlistMultipartUploads(String volumeName, String bucketName, String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination) org.apache.hadoop.ozone.om.helpers.ListOpenFilesResultlistOpenFiles(String path, int maxKeys, String contToken) org.apache.hadoop.ozone.om.helpers.OmMultipartUploadListPartslistParts(String volumeName, String bucketName, String keyName, String uploadID, int partNumberMarker, int maxParts) org.apache.hadoop.ozone.snapshot.ListSnapshotResponselistSnapshot(String volumeName, String bucketName, String snapshotPrefix, String prevSnapshot, int maxListResult) org.apache.hadoop.ozone.snapshot.ListSnapshotDiffJobResponselistSnapshotDiffJobs(String volume, String bucket, String jobStatus, boolean listAllStatus, String prevSnapshotDiffJob, int maxListResult) List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatus> listStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries) List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatus> listStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries, boolean allowPartialPrefixes) List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatusLight> listStatusLight(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries, boolean allowPartialPrefixes) org.apache.hadoop.ozone.om.helpers.TenantStateListList tenants.org.apache.hadoop.ozone.om.helpers.TenantUserListlistUsersInTenant(String tenantId, String prefix) List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs> listVolumeByUser(String userName, String prefix, String prevKey, int maxKeys) Lists volumes accessible by a specific user.org.apache.hadoop.ozone.om.helpers.OmKeyInfolookupFile(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) org.apache.hadoop.ozone.om.helpers.OmKeyInfolookupKey(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) voidomHAMetricsInit(String leaderId) Create OMHAMetrics instance.static booleanomInit(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) Initializes the OM instance.org.apache.hadoop.ozone.upgrade.UpgradeFinalization.StatusAndMessagesqueryUpgradeFinalizationProgress(String upgradeClientID, boolean takeover, boolean readonly) org.apache.hadoop.ozone.om.helpers.LeaseKeyInforecoverLease(String volumeName, String bucketName, String keyName, boolean force) org.apache.hadoop.hdds.conf.OzoneConfigurationlongrenewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> token) Method to renew a delegationToken issued by OzoneManager.resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested) resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, boolean allowDanglingBuckets) resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, boolean allowDanglingBuckets, boolean aclEnabled) resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, OMClientRequest omClientRequest) resolveBucketLink(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) resolveBucketLink(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyArgs args, OMClientRequest omClientRequest) voidrestart()Restarts the service.voidvoidsetCertClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient newClient) For testing purpose only.voidsetConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) voidsetExitManagerForTesting(org.apache.hadoop.hdds.ExitManager exitManagerForTesting) voidsetMinMultipartUploadPartSize(int partSizeForTest) voidstatic voidsetS3Auth(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3Authentication val) Set theOzoneManagerProtocolProtos.S3Authenticationfor the current rpc handler thread.booleansetSafeMode(org.apache.hadoop.fs.SafeModeAction action, boolean isChecked) voidsetScmTopologyClient(org.apache.hadoop.hdds.scm.client.ScmTopologyClient scmTopologyClient) For testing purpose only.voidsetSecretKeyClient(org.apache.hadoop.hdds.security.symmetric.SecretKeyClient secretKeyClient) For testing purpose only.static voidsetTestReloadConfigFlag(boolean testReloadConfigFlag) static voidsetTestSecureOmFlag(boolean testSecureOmFlag) voidsetTimes(org.apache.hadoop.ozone.om.helpers.OmKeyArgs keyArgs, long mtime, long atime) voidsetTransactionInfo(org.apache.hadoop.hdds.utils.TransactionInfo info) static voidsetUgi(org.apache.hadoop.security.UserGroupInformation user) voidorg.apache.hadoop.ozone.snapshot.SnapshotDiffResponsesnapshotDiff(String volume, String bucket, String fromSnapshot, String toSnapshot, String token, int pageSize, boolean forceFullDiff, boolean disableNativeDiff) voidstart()Start service.voidstartQuotaRepair(List<String> buckets) voidbooleanstop()Stop service.org.apache.hadoop.ozone.om.helpers.TenantUserInfoValuetenantGetUserInfo(String userPrincipal) Tenant get user info.voidvoidtransferLeadership(String newLeaderId) booleantriggerRangerBGSync(boolean noWait) voidupdatePeerList(List<String> newPeers) When OMStateMachine receives a configuration change update, it calls this function to update the peers list, if required.voidvalidateReplicationConfig(org.apache.hadoop.hdds.client.ReplicationConfig replicationConfig) voidwarmUpEdekCache(ExecutorService executor, int delay, int interval, int maxRetries) Methods inherited from class org.apache.hadoop.hdds.server.ServiceRuntimeInfoImpl
getSoftwareVersion, getStartedTimeInMillis, getVersion, setStartTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
abortMultipartUpload, addAcl, allocateBlock, cancelOzoneManagerPrepare, checkVolumeAccess, commitKey, commitMultipartUploadPart, completeMultipartUpload, createBucket, createDirectory, createFile, createSnapshot, createTenant, createVolume, deleteBucket, deleteKey, deleteKeys, deleteKeys, deleteObjectTagging, deleteSnapshot, deleteTenant, deleteVolume, getOzoneManagerPrepareStatus, getS3Secret, getS3Secret, hsyncKey, initiateMultipartUpload, openKey, prepareOzoneManager, printCompactionLogDag, putObjectTagging, recoverKey, removeAcl, renameKey, renameKeys, renameSnapshot, revokeS3Secret, setAcl, setBucketOwner, setBucketProperty, setOwner, setQuota, setS3Secret, tenantAssignAdmin, tenantAssignUserAccessId, tenantRevokeAdmin, tenantRevokeUserAccessIdMethods inherited from interface org.apache.hadoop.hdds.server.ServiceRuntimeInfo
getSoftwareVersion, getStartedTimeInMillis, getVersion
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Method Details
-
initializeEdekCache
public void initializeEdekCache(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) -
warmUpEdekCache
-
isStopped
public boolean isStopped() -
setS3Auth
public static void setS3Auth(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3Authentication val) Set theOzoneManagerProtocolProtos.S3Authenticationfor the current rpc handler thread. -
getS3Auth
public static org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3Authentication getS3Auth()Returns theOzoneManagerProtocolProtos.S3Authenticationfor the current rpc handler thread. -
getThreadNamePrefix
Returns the ThreadName prefix for the current OM. -
setAllowListAllVolumesFromConfig
public void setAllowListAllVolumesFromConfig() -
createOm
public static OzoneManager createOm(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) throws IOException, org.apache.hadoop.security.authentication.client.AuthenticationException Constructs OM instance based on the configuration.- Parameters:
conf- OzoneConfiguration- Returns:
- OM instance
- Throws:
IOException- AuthenticationException in case OM instance creation fails,org.apache.hadoop.security.authentication.client.AuthenticationException
-
createOm
public static OzoneManager createOm(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, OzoneManager.StartupOption startupOption) throws IOException, org.apache.hadoop.security.authentication.client.AuthenticationException - Throws:
IOExceptionorg.apache.hadoop.security.authentication.client.AuthenticationException
-
getScmClient
Return scmClient. -
getBlockTokenSecretManager
public org.apache.hadoop.hdds.security.token.OzoneBlockTokenSecretManager getBlockTokenSecretManager()Return SecretManager for OM. -
getScmBlockSize
public long getScmBlockSize()Return config value ofOzoneConfigKeys.OZONE_SCM_BLOCK_SIZE. -
getPreallocateBlocksMax
public int getPreallocateBlocksMax()Return config value ofOzoneConfigKeys.OZONE_KEY_PREALLOCATION_BLOCKS_MAX. -
isGrpcBlockTokenEnabled
public boolean isGrpcBlockTokenEnabled()Return config value ofHddsConfigKeys.HDDS_BLOCK_TOKEN_ENABLED. -
isS3MultiTenancyEnabled
public boolean isS3MultiTenancyEnabled()Returns true if S3 multi-tenancy is enabled; false otherwise. -
isStrictS3
public boolean isStrictS3() -
checkS3MultiTenancyEnabled
public void checkS3MultiTenancyEnabled() throws org.apache.hadoop.ozone.om.exceptions.OMExceptionThrows OMException FEATURE_NOT_ENABLED if S3 multi-tenancy is not enabled.- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
isSecurityEnabled
public boolean isSecurityEnabled()Return config value ofOzoneConfigKeys.OZONE_SECURITY_ENABLED_KEY. -
isTestSecureOmFlag
public boolean isTestSecureOmFlag() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
refetchSecretKey
- Specified by:
refetchSecretKeyin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
-
startSecretManager
public void startSecretManager() -
setCertClient
public void setCertClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient newClient) throws IOException For testing purpose only.- Throws:
IOException
-
setScmTopologyClient
public void setScmTopologyClient(org.apache.hadoop.hdds.scm.client.ScmTopologyClient scmTopologyClient) For testing purpose only. This allows setting up ScmBlockLocationClient without having to fully setup a working cluster. -
getClusterMap
public org.apache.hadoop.hdds.scm.net.NetworkTopology getClusterMap() -
setSecretKeyClient
public void setSecretKeyClient(org.apache.hadoop.hdds.security.symmetric.SecretKeyClient secretKeyClient) For testing purpose only. This allows testing token in integration test without fully setting up a working secure cluster. -
omInit
public static boolean omInit(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) throws IOException, org.apache.hadoop.security.authentication.client.AuthenticationException Initializes the OM instance.- Parameters:
conf- OzoneConfiguration- Returns:
- true if OM initialization succeeds, false otherwise
- Throws:
IOException- in case ozone metadata directory path is not accessibleorg.apache.hadoop.security.authentication.client.AuthenticationException
-
initializeSecurity
public static void initializeSecurity(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, OMStorage omStore, String scmId) throws IOException Initializes secure OzoneManager.- Throws:
IOException
-
getKeyManager
-
getOmStorage
-
getOmRatisServer
-
getOmSnapshotProvider
-
getOmRpcServerAddr
-
getOmRatisServerState
public org.apache.ratis.util.LifeCycle.State getOmRatisServerState() -
getKmsProvider
public org.apache.hadoop.crypto.key.KeyProviderCryptoExtension getKmsProvider() -
getPrefixManager
-
getVolumeManager
-
getBucketManager
-
getAccessAuthorizer
public org.apache.hadoop.ozone.security.acl.IAccessAuthorizer getAccessAuthorizer() -
getMetadataManager
public org.apache.hadoop.ozone.om.OMMetadataManager getMetadataManager()Get metadata manager.- Returns:
- metadata manager.
-
getS3SecretManager
public org.apache.hadoop.ozone.om.S3SecretManager getS3SecretManager() -
getOmSnapshotManager
Get snapshot manager.- Returns:
- Om snapshot manager.
-
getMultiTenantManager
Get metadata manager.- Returns:
- metadata manager.
-
getBlockTokenMgr
public org.apache.hadoop.hdds.security.token.OzoneBlockTokenSecretManager getBlockTokenMgr() -
getOmServerProtocol
-
getMetrics
-
getOmSnapshotIntMetrics
-
getPerfMetrics
-
getDeletionMetrics
-
start
Start service.- Throws:
IOException
-
restart
Restarts the service. This method re-initializes the rpc server.- Throws:
IOException
-
bootstrap
public void bootstrap(org.apache.hadoop.ozone.om.helpers.OMNodeDetails newOMNode) throws IOException - Specified by:
bootstrapin interfaceorg.apache.hadoop.ozone.om.protocol.OMInterServiceProtocol- Throws:
IOException
-
updatePeerList
When OMStateMachine receives a configuration change update, it calls this function to update the peers list, if required. The configuration change could be to add or to remove an OM from the ring. -
doesPeerExist
Check if the input nodeId exists in the peers list.- Returns:
- true if the nodeId is self or it exists in peer node list, false otherwise.
-
getAllOMNodesInMemory
Return list of all current OM peers (does not reload configuration from disk to find newly configured OMs). -
getAllOMNodesInNewConf
Reload configuration from disk and return all the OM nodes present in the new conf under current serviceId. -
getObjectIdFromTxId
public long getObjectIdFromTxId(long trxnId) -
getTransactionInfo
public org.apache.hadoop.hdds.utils.TransactionInfo getTransactionInfo() -
setTransactionInfo
public void setTransactionInfo(org.apache.hadoop.hdds.utils.TransactionInfo info) -
getRatisSnapshotIndex
- Throws:
IOException
-
stop
public boolean stop()Stop service. -
shutDown
-
terminateOM
public void terminateOM() -
join
public void join()Wait until service has completed shutdown. -
getDelegationToken
public org.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer) throws org.apache.hadoop.ozone.om.exceptions.OMException Get delegation token from OzoneManager.- Specified by:
getDelegationTokenin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerSecurityProtocol- Parameters:
renewer- Renewer information- Returns:
- delegationToken DelegationToken signed by OzoneManager
- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
renewDelegationToken
public long renewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> token) throws org.apache.hadoop.ozone.om.exceptions.OMException Method to renew a delegationToken issued by OzoneManager.- Specified by:
renewDelegationTokenin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerSecurityProtocol- Parameters:
token- token to renew- Returns:
- new expiryTime of the token
- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
cancelDelegationToken
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.ozone.security.OzoneTokenIdentifier> token) throws org.apache.hadoop.ozone.om.exceptions.OMException Cancels a delegation token.- Specified by:
cancelDelegationTokenin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerSecurityProtocol- Parameters:
token- token to cancel- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
isOwner
-
getVolumeOwner
public String getVolumeOwner(String vol, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType type, org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType) throws org.apache.hadoop.ozone.om.exceptions.OMException - Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
getBucketOwner
public String getBucketOwner(String volume, String bucket, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType type, org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType) throws org.apache.hadoop.ozone.om.exceptions.OMException Return the owner of a given bucket.- Returns:
- String
- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
checkAcls
public boolean checkAcls(org.apache.hadoop.ozone.security.acl.OzoneObj.ResourceType resType, org.apache.hadoop.ozone.security.acl.OzoneObj.StoreType storeType, org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLType aclType, String vol, String bucket, String key, org.apache.hadoop.security.UserGroupInformation ugi, InetAddress remoteAddress, String hostName, boolean throwIfPermissionDenied, String owner) throws org.apache.hadoop.ozone.om.exceptions.OMException CheckAcls for the ozone object.- Returns:
- true if permission granted, false if permission denied.
- Throws:
org.apache.hadoop.ozone.om.exceptions.OMException- ResultCodes.PERMISSION_DENIED if permission denied and throwOnPermissionDenied set to true.
-
getAclsEnabled
public boolean getAclsEnabled()Return true if Ozone acl's are enabled, else false.- Returns:
- boolean
-
getAllowListAllVolumes
public boolean getAllowListAllVolumes() -
getOmMetadataReader
public org.apache.ratis.util.function.UncheckedAutoCloseableSupplier<org.apache.hadoop.ozone.om.IOmMetadataReader> getOmMetadataReader() -
isSpnegoEnabled
public boolean isSpnegoEnabled()Return true if SPNEGO auth is enabled for OM HTTP server, otherwise false.- Returns:
- boolean
-
getVolumeInfo
public org.apache.hadoop.ozone.om.helpers.OmVolumeArgs getVolumeInfo(String volume) throws IOException Gets the volume information.- Specified by:
getVolumeInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Parameters:
volume- - Volume name.- Returns:
- VolumeArgs or exception is thrown.
- Throws:
IOException
-
listVolumeByUser
public List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs> listVolumeByUser(String userName, String prefix, String prevKey, int maxKeys) throws IOException Lists volumes accessible by a specific user.- Specified by:
listVolumeByUserin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Parameters:
userName- - user nameprefix- - Filter prefix -- Return only entries that match this.prevKey- - Previous key -- List starts from the next from the prevkeymaxKeys- - Max number of keys to return.- Returns:
- List of Volumes.
- Throws:
IOException
-
listAllVolumes
public List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs> listAllVolumes(String prefix, String prevKey, int maxKeys) throws IOException Lists volume all volumes in the cluster.- Specified by:
listAllVolumesin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Parameters:
prefix- - Filter prefix -- Return only entries that match this.prevKey- - Previous key -- List starts from the next from the prevkeymaxKeys- - Max number of keys to return.- Returns:
- List of Volumes.
- Throws:
IOException
-
listBuckets
public List<org.apache.hadoop.ozone.om.helpers.OmBucketInfo> listBuckets(String volumeName, String startKey, String prefix, int maxNumOfBuckets, boolean hasSnapshot) throws IOException - Specified by:
listBucketsin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getBucketInfo
public org.apache.hadoop.ozone.om.helpers.OmBucketInfo getBucketInfo(String volume, String bucket) throws IOException Gets the bucket information.- Specified by:
getBucketInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Parameters:
volume- - Volume name.bucket- - Bucket name.- Returns:
- OmBucketInfo or exception is thrown.
- Throws:
IOException
-
lookupKey
public org.apache.hadoop.ozone.om.helpers.OmKeyInfo lookupKey(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) throws IOException - Specified by:
lookupKeyin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
lookupKeyin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getKeyInfo
public org.apache.hadoop.ozone.om.helpers.KeyInfoWithVolumeContext getKeyInfo(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean assumeS3Context) throws IOException - Specified by:
getKeyInfoin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
getKeyInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listKeys
public org.apache.hadoop.ozone.om.helpers.ListKeysResult listKeys(String volumeName, String bucketName, String startKey, String keyPrefix, int maxKeys) throws IOException - Specified by:
listKeysin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Throws:
IOException
-
listKeysLight
public org.apache.hadoop.ozone.om.helpers.ListKeysLightResult listKeysLight(String volumeName, String bucketName, String startKey, String keyPrefix, int maxKeys) throws IOException - Specified by:
listKeysLightin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Throws:
IOException
-
getSnapshotInfo
public org.apache.hadoop.ozone.om.helpers.SnapshotInfo getSnapshotInfo(String volumeName, String bucketName, String snapshotName) throws IOException - Specified by:
getSnapshotInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listSnapshot
public org.apache.hadoop.ozone.snapshot.ListSnapshotResponse listSnapshot(String volumeName, String bucketName, String snapshotPrefix, String prevSnapshot, int maxListResult) throws IOException - Specified by:
listSnapshotin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getAuditLogger
public org.apache.hadoop.ozone.audit.AuditLogger getAuditLogger() -
getSystemAuditLogger
public org.apache.hadoop.ozone.audit.AuditLogger getSystemAuditLogger() -
buildAuditMessageForSuccess
public org.apache.hadoop.ozone.audit.AuditMessage buildAuditMessageForSuccess(org.apache.hadoop.ozone.audit.AuditAction op, Map<String, String> auditMap) - Specified by:
buildAuditMessageForSuccessin interfaceorg.apache.hadoop.ozone.audit.Auditor
-
buildAuditMessageForFailure
public org.apache.hadoop.ozone.audit.AuditMessage buildAuditMessageForFailure(org.apache.hadoop.ozone.audit.AuditAction op, Map<String, String> auditMap, Throwable throwable) - Specified by:
buildAuditMessageForFailurein interfaceorg.apache.hadoop.ozone.audit.Auditor
-
getNamespace
- Specified by:
getNamespacein interfaceorg.apache.hadoop.hdds.server.ServiceRuntimeInfo
-
getRpcPort
- Specified by:
getRpcPortin interfaceOMMXBean
-
getRatisRoles
- Specified by:
getRatisRolesin interfaceOMMXBean
-
omHAMetricsInit
Create OMHAMetrics instance. -
getOmhaMetrics
-
getRatisLogDirectory
- Specified by:
getRatisLogDirectoryin interfaceOMMXBean
-
getRocksDbDirectory
- Specified by:
getRocksDbDirectoryin interfaceOMMXBean
-
getHostname
Description copied from interface:OMMXBeanGets the OM hostname.- Specified by:
getHostnamein interfaceOMMXBean- Returns:
- the OM hostname for the datanode.
-
getHttpServer
-
getServiceList
- Specified by:
getServiceListin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getServiceInfo
- Specified by:
getServiceInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listOpenFiles
public org.apache.hadoop.ozone.om.helpers.ListOpenFilesResult listOpenFiles(String path, int maxKeys, String contToken) throws IOException - Specified by:
listOpenFilesin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
transferLeadership
- Specified by:
transferLeadershipin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
triggerRangerBGSync
- Specified by:
triggerRangerBGSyncin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
finalizeUpgrade
public org.apache.hadoop.ozone.upgrade.UpgradeFinalization.StatusAndMessages finalizeUpgrade(String upgradeClientID) throws IOException - Specified by:
finalizeUpgradein interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
queryUpgradeFinalizationProgress
public org.apache.hadoop.ozone.upgrade.UpgradeFinalization.StatusAndMessages queryUpgradeFinalizationProgress(String upgradeClientID, boolean takeover, boolean readonly) throws IOException - Specified by:
queryUpgradeFinalizationProgressin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listTenant
List tenants.- Specified by:
listTenantin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
tenantGetUserInfo
public org.apache.hadoop.ozone.om.helpers.TenantUserInfoValue tenantGetUserInfo(String userPrincipal) throws IOException Tenant get user info.- Specified by:
tenantGetUserInfoin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listUsersInTenant
public org.apache.hadoop.ozone.om.helpers.TenantUserList listUsersInTenant(String tenantId, String prefix) throws IOException - Specified by:
listUsersInTenantin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getS3VolumeContext
- Specified by:
getS3VolumeContextin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listParts
public org.apache.hadoop.ozone.om.helpers.OmMultipartUploadListParts listParts(String volumeName, String bucketName, String keyName, String uploadID, int partNumberMarker, int maxParts) throws IOException - Specified by:
listPartsin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listMultipartUploads
public org.apache.hadoop.ozone.om.helpers.OmMultipartUploadList listMultipartUploads(String volumeName, String bucketName, String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination) throws IOException - Specified by:
listMultipartUploadsin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getFileStatus
public org.apache.hadoop.ozone.om.helpers.OzoneFileStatus getFileStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) throws IOException - Specified by:
getFileStatusin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Throws:
IOException
-
lookupFile
public org.apache.hadoop.ozone.om.helpers.OmKeyInfo lookupFile(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) throws IOException - Specified by:
lookupFilein interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
lookupFilein interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listStatus
public List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatus> listStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries) throws IOException - Specified by:
listStatusin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
listStatusin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listStatus
public List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatus> listStatus(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries, boolean allowPartialPrefixes) throws IOException - Specified by:
listStatusin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
listStatusin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listStatusLight
public List<org.apache.hadoop.ozone.om.helpers.OzoneFileStatusLight> listStatusLight(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args, boolean recursive, String startKey, long numEntries, boolean allowPartialPrefixes) throws IOException - Specified by:
listStatusLightin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
listStatusLightin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getAcl
public List<org.apache.hadoop.ozone.OzoneAcl> getAcl(org.apache.hadoop.ozone.security.acl.OzoneObj obj) throws IOException - Specified by:
getAclin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Throws:
IOException
-
installSnapshotFromLeader
Download and install latest checkpoint from leader OM.- Parameters:
leaderId- peerNodeID of the leader OM- Returns:
- If checkpoint is installed successfully, return the corresponding termIndex. Otherwise, return null.
-
getLogger
public static org.slf4j.Logger getLogger() -
getConfiguration
public org.apache.hadoop.hdds.conf.OzoneConfiguration getConfiguration() -
getConfig
public org.apache.hadoop.ozone.om.OmConfig getConfig() -
setConfiguration
public void setConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) -
reloadConfiguration
public org.apache.hadoop.hdds.conf.OzoneConfiguration reloadConfiguration() -
setTestReloadConfigFlag
public static void setTestReloadConfigFlag(boolean testReloadConfigFlag) -
setTestSecureOmFlag
public static void setTestSecureOmFlag(boolean testSecureOmFlag) -
setUgi
public static void setUgi(org.apache.hadoop.security.UserGroupInformation user) -
getNodeDetails
public org.apache.hadoop.ozone.om.helpers.OMNodeDetails getNodeDetails() -
getOMNodeId
-
getOMServiceId
-
getPeerNodes
-
getPeerNode
-
getCertificateClient
public org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient getCertificateClient() -
getComponent
-
getMaxUserVolumeCount
public long getMaxUserVolumeCount()Return maximum volumes count per user.- Returns:
- maxUserVolumeCount
-
isLeaderReady
public boolean isLeaderReady()Return true, if the current OM node is leader and in ready state to process the requests. If ratis is not enabled, then it always returns true. -
checkLeaderStatus
public void checkLeaderStatus() throws org.apache.hadoop.ozone.om.exceptions.OMNotLeaderException, org.apache.hadoop.ozone.om.exceptions.OMLeaderNotReadyExceptionChecks the leader status. Does nothing if this OM is leader and is ready.- Throws:
org.apache.hadoop.ozone.om.exceptions.OMLeaderNotReadyException- if leader, but not readyorg.apache.hadoop.ozone.om.exceptions.OMNotLeaderException- if not leader
-
isFilesystemSnapshotEnabled
public boolean isFilesystemSnapshotEnabled()- Returns:
- true if Ozone filesystem snapshot is enabled, false otherwise.
-
getDBUpdates
public org.apache.hadoop.ozone.om.helpers.DBUpdates getDBUpdates(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DBUpdatesRequest dbUpdatesRequest) throws IOException Get DB updates since a specific sequence number.- Specified by:
getDBUpdatesin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Parameters:
dbUpdatesRequest- request that encapsulates a sequence number.- Returns:
- Wrapper containing the updates.
- Throws:
org.apache.hadoop.hdds.utils.db.SequenceNumberNotFoundException- if db is unable to read the data.IOException
-
getDelegationTokenMgr
-
getOmAdminUsernames
Return the list of Ozone administrators in effect. -
getOmReadOnlyAdminUsernames
-
getOmAdminGroups
-
isReadOnlyAdmin
public boolean isReadOnlyAdmin(org.apache.hadoop.security.UserGroupInformation callerUgi) - Parameters:
callerUgi- Caller UserGroupInformation- Returns:
- return true if the
ugiis a read-only OM admin
-
isAdmin
public boolean isAdmin(org.apache.hadoop.security.UserGroupInformation callerUgi) Return true if a UserGroupInformation is OM admin, false otherwise.- Parameters:
callerUgi- Caller UserGroupInformation
-
isS3Admin
public boolean isS3Admin(org.apache.hadoop.security.UserGroupInformation callerUgi) -
isRunning
public boolean isRunning() -
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyArgs args, OMClientRequest omClientRequest) throws IOException - Throws:
IOException
-
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested) throws IOException- Throws:
IOException
-
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) throws IOException - Throws:
IOException
-
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, OMClientRequest omClientRequest) throws IOException- Throws:
IOException
-
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, boolean allowDanglingBuckets) throws IOException- Throws:
IOException
-
resolveBucketLink
public ResolvedBucket resolveBucketLink(org.apache.commons.lang3.tuple.Pair<String, String> requested, boolean allowDanglingBuckets, boolean aclEnabled) throws IOException- Throws:
IOException
-
setExitManagerForTesting
public void setExitManagerForTesting(org.apache.hadoop.hdds.ExitManager exitManagerForTesting) -
getEnableFileSystemPaths
public boolean getEnableFileSystemPaths() -
getKeyPathLockEnabled
public boolean getKeyPathLockEnabled() -
getOzoneLockProvider
-
getDefaultReplicationConfig
public org.apache.hadoop.hdds.client.ReplicationConfig getDefaultReplicationConfig() -
setReplicationFromConfig
public void setReplicationFromConfig() -
getOMDefaultBucketLayout
public org.apache.hadoop.ozone.om.helpers.BucketLayout getOMDefaultBucketLayout() -
getVersionManager
-
getPrepareState
-
getMinMultipartUploadPartSize
public int getMinMultipartUploadPartSize() -
setMinMultipartUploadPartSize
public void setMinMultipartUploadPartSize(int partSizeForTest) -
isOmRpcServerRunning
public boolean isOmRpcServerRunning() -
echoRPCReq
public org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.EchoRPCResponse echoRPCReq(byte[] payloadReq, int payloadSizeResp, boolean writeToRatis) - Specified by:
echoRPCReqin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
-
recoverLease
public org.apache.hadoop.ozone.om.helpers.LeaseKeyInfo recoverLease(String volumeName, String bucketName, String keyName, boolean force) - Specified by:
recoverLeasein interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
-
setTimes
public void setTimes(org.apache.hadoop.ozone.om.helpers.OmKeyArgs keyArgs, long mtime, long atime) throws IOException - Specified by:
setTimesin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
setSafeMode
public boolean setSafeMode(org.apache.hadoop.fs.SafeModeAction action, boolean isChecked) throws IOException - Specified by:
setSafeModein interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getQuotaRepairStatus
- Specified by:
getQuotaRepairStatusin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
startQuotaRepair
- Specified by:
startQuotaRepairin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getObjectTagging
public Map<String,String> getObjectTagging(org.apache.hadoop.ozone.om.helpers.OmKeyArgs args) throws IOException - Specified by:
getObjectTaggingin interfaceorg.apache.hadoop.ozone.om.IOmMetadataReader- Specified by:
getObjectTaggingin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
getOmDetailsProto
public static org.apache.hadoop.hdds.protocol.proto.HddsProtos.OzoneManagerDetailsProto getOmDetailsProto(org.apache.hadoop.hdds.conf.ConfigurationSource config, String omID) -
snapshotDiff
public org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse snapshotDiff(String volume, String bucket, String fromSnapshot, String toSnapshot, String token, int pageSize, boolean forceFullDiff, boolean disableNativeDiff) throws IOException - Specified by:
snapshotDiffin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
cancelSnapshotDiff
public org.apache.hadoop.ozone.snapshot.CancelSnapshotDiffResponse cancelSnapshotDiff(String volume, String bucket, String fromSnapshot, String toSnapshot) throws IOException - Specified by:
cancelSnapshotDiffin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
listSnapshotDiffJobs
public org.apache.hadoop.ozone.snapshot.ListSnapshotDiffJobResponse listSnapshotDiffJobs(String volume, String bucket, String jobStatus, boolean listAllStatus, String prevSnapshotDiffJob, int maxListResult) throws IOException - Specified by:
listSnapshotDiffJobsin interfaceorg.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol- Throws:
IOException
-
validateReplicationConfig
public void validateReplicationConfig(org.apache.hadoop.hdds.client.ReplicationConfig replicationConfig) throws org.apache.hadoop.ozone.om.exceptions.OMException - Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
getReplicationConfigValidator
public org.apache.hadoop.hdds.client.ReplicationConfigValidator getReplicationConfigValidator() -
getReconfigurationHandler
public org.apache.hadoop.hdds.conf.ReconfigurationHandler getReconfigurationHandler() -
awaitDoubleBufferFlush
Wait until both buffers are flushed. This is used in cases like "follower bootstrap tarball creation" where the rocksDb for the active fs needs to synchronized with the rocksdb's for the snapshots.- Throws:
InterruptedException
-
checkFeatureEnabled
public void checkFeatureEnabled(org.apache.hadoop.ozone.OzoneManagerVersion feature) throws org.apache.hadoop.ozone.om.exceptions.OMException - Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
compactOMDB
- Throws:
IOException
-
getOmExecutionFlow
-