Search in sources :

Example 76 with OMException

use of org.apache.hadoop.ozone.om.exceptions.OMException in project ozone by apache.

the class OzoneBucketStub method completeMultipartUpload.

@Override
public OmMultipartUploadCompleteInfo completeMultipartUpload(String key, String uploadID, Map<Integer, String> partsMap) throws IOException {
    if (multipartUploadIdMap.get(key) == null) {
        throw new OMException(ResultCodes.NO_SUCH_MULTIPART_UPLOAD_ERROR);
    } else {
        final Map<Integer, Part> partsList = partList.get(key);
        int count = 1;
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        int prevPartNumber = 0;
        for (Map.Entry<Integer, String> part : partsMap.entrySet()) {
            int currentPartNumber = part.getKey();
            if (currentPartNumber <= prevPartNumber) {
                throw new OMException(OMException.ResultCodes.INVALID_PART_ORDER);
            }
            prevPartNumber = currentPartNumber;
        }
        for (Map.Entry<Integer, String> part : partsMap.entrySet()) {
            Part recordedPart = partsList.get(part.getKey());
            if (recordedPart == null || !recordedPart.getPartName().equals(part.getValue())) {
                throw new OMException(ResultCodes.INVALID_PART);
            } else {
                output.write(recordedPart.getContent());
            }
            keyContents.put(key, output.toByteArray());
        }
    }
    return new OmMultipartUploadCompleteInfo(getVolumeName(), getName(), key, DigestUtils.sha256Hex(key));
}
Also used : OmMultipartUploadCompleteInfo(org.apache.hadoop.ozone.om.helpers.OmMultipartUploadCompleteInfo) ByteArrayOutputStream(java.io.ByteArrayOutputStream) OMException(org.apache.hadoop.ozone.om.exceptions.OMException) HashMap(java.util.HashMap) Map(java.util.Map) TreeMap(java.util.TreeMap)

Example 77 with OMException

use of org.apache.hadoop.ozone.om.exceptions.OMException in project ozone by apache.

the class OzoneBucketStub method listParts.

@Override
public OzoneMultipartUploadPartListParts listParts(String key, String uploadID, int partNumberMarker, int maxParts) throws IOException {
    if (multipartUploadIdMap.get(key) == null) {
        throw new OMException(ResultCodes.NO_SUCH_MULTIPART_UPLOAD_ERROR);
    }
    List<PartInfo> partInfoList = new ArrayList<>();
    if (partList.get(key) == null) {
        return new OzoneMultipartUploadPartListParts(ReplicationType.RATIS, ReplicationFactor.ONE, 0, false);
    } else {
        Map<Integer, Part> partMap = partList.get(key);
        Iterator<Map.Entry<Integer, Part>> partIterator = partMap.entrySet().iterator();
        int count = 0;
        int nextPartNumberMarker = 0;
        boolean truncated = false;
        while (count < maxParts && partIterator.hasNext()) {
            Map.Entry<Integer, Part> partEntry = partIterator.next();
            nextPartNumberMarker = partEntry.getKey();
            if (partEntry.getKey() > partNumberMarker) {
                PartInfo partInfo = new PartInfo(partEntry.getKey(), partEntry.getValue().getPartName(), partEntry.getValue().getContent().length, Time.now());
                partInfoList.add(partInfo);
                count++;
            }
        }
        if (partIterator.hasNext()) {
            truncated = true;
        } else {
            truncated = false;
            nextPartNumberMarker = 0;
        }
        OzoneMultipartUploadPartListParts ozoneMultipartUploadPartListParts = new OzoneMultipartUploadPartListParts(ReplicationType.RATIS, ReplicationFactor.ONE, nextPartNumberMarker, truncated);
        ozoneMultipartUploadPartListParts.addAllParts(partInfoList);
        return ozoneMultipartUploadPartListParts;
    }
}
Also used : ArrayList(java.util.ArrayList) PartInfo(org.apache.hadoop.ozone.client.OzoneMultipartUploadPartListParts.PartInfo) OMException(org.apache.hadoop.ozone.om.exceptions.OMException) HashMap(java.util.HashMap) Map(java.util.Map) TreeMap(java.util.TreeMap)

Example 78 with OMException

use of org.apache.hadoop.ozone.om.exceptions.OMException in project ozone by apache.

the class OMBucketDeleteRequest method validateAndUpdateCache.

@Override
public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, long transactionLogIndex, OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
    OMMetrics omMetrics = ozoneManager.getMetrics();
    omMetrics.incNumBucketDeletes();
    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
    OMRequest omRequest = getOmRequest();
    DeleteBucketRequest deleteBucketRequest = omRequest.getDeleteBucketRequest();
    String volumeName = deleteBucketRequest.getVolumeName();
    String bucketName = deleteBucketRequest.getBucketName();
    // Generate end user response
    OMResponse.Builder omResponse = OmResponseUtil.getOMResponseBuilder(getOmRequest());
    AuditLogger auditLogger = ozoneManager.getAuditLogger();
    Map<String, String> auditMap = buildVolumeAuditMap(volumeName);
    auditMap.put(OzoneConsts.BUCKET, bucketName);
    OzoneManagerProtocolProtos.UserInfo userInfo = getOmRequest().getUserInfo();
    IOException exception = null;
    boolean acquiredBucketLock = false, acquiredVolumeLock = false;
    boolean success = true;
    OMClientResponse omClientResponse = null;
    try {
        // check Acl
        if (ozoneManager.getAclsEnabled()) {
            checkAcls(ozoneManager, OzoneObj.ResourceType.BUCKET, OzoneObj.StoreType.OZONE, IAccessAuthorizer.ACLType.DELETE, volumeName, bucketName, null);
        }
        // acquire lock
        acquiredVolumeLock = omMetadataManager.getLock().acquireReadLock(VOLUME_LOCK, volumeName);
        acquiredBucketLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK, volumeName, bucketName);
        // No need to check volume exists here, as bucket cannot be created
        // with out volume creation. Check if bucket exists
        String bucketKey = omMetadataManager.getBucketKey(volumeName, bucketName);
        OmBucketInfo omBucketInfo = omMetadataManager.getBucketTable().get(bucketKey);
        if (omBucketInfo == null) {
            LOG.debug("bucket: {} not found ", bucketName);
            throw new OMException("Bucket not exists", BUCKET_NOT_FOUND);
        }
        // Check if bucket is empty
        if (!omMetadataManager.isBucketEmpty(volumeName, bucketName)) {
            LOG.debug("bucket: {} is not empty ", bucketName);
            throw new OMException("Bucket is not empty", OMException.ResultCodes.BUCKET_NOT_EMPTY);
        }
        if (omBucketInfo.getBucketLayout().isFileSystemOptimized()) {
            omMetrics.incNumFSOBucketDeletes();
        }
        omMetrics.decNumBuckets();
        // Update table cache.
        omMetadataManager.getBucketTable().addCacheEntry(new CacheKey<>(bucketKey), new CacheValue<>(Optional.absent(), transactionLogIndex));
        omResponse.setDeleteBucketResponse(DeleteBucketResponse.newBuilder().build());
        // update used namespace for volume
        String volumeKey = omMetadataManager.getVolumeKey(volumeName);
        OmVolumeArgs omVolumeArgs = omMetadataManager.getVolumeTable().getReadCopy(volumeKey);
        if (omVolumeArgs == null) {
            throw new OMException("Volume " + volumeName + " is not found", OMException.ResultCodes.VOLUME_NOT_FOUND);
        }
        omVolumeArgs.incrUsedNamespace(-1L);
        // Update table cache.
        omMetadataManager.getVolumeTable().addCacheEntry(new CacheKey<>(volumeKey), new CacheValue<>(Optional.of(omVolumeArgs), transactionLogIndex));
        // Add to double buffer.
        omClientResponse = new OMBucketDeleteResponse(omResponse.build(), volumeName, bucketName, omVolumeArgs.copyObject());
    } catch (IOException ex) {
        success = false;
        exception = ex;
        omClientResponse = new OMBucketDeleteResponse(createErrorOMResponse(omResponse, exception));
    } finally {
        addResponseToDoubleBuffer(transactionLogIndex, omClientResponse, ozoneManagerDoubleBufferHelper);
        if (acquiredBucketLock) {
            omMetadataManager.getLock().releaseWriteLock(BUCKET_LOCK, volumeName, bucketName);
        }
        if (acquiredVolumeLock) {
            omMetadataManager.getLock().releaseReadLock(VOLUME_LOCK, volumeName);
        }
    }
    // Performing audit logging outside of the lock.
    auditLog(auditLogger, buildAuditMessage(OMAction.DELETE_BUCKET, auditMap, exception, userInfo));
    // return response.
    if (success) {
        LOG.debug("Deleted bucket:{} in volume:{}", bucketName, volumeName);
        return omClientResponse;
    } else {
        omMetrics.incNumBucketDeleteFails();
        LOG.error("Delete bucket failed for bucket:{} in volume:{}", bucketName, volumeName, exception);
        return omClientResponse;
    }
}
Also used : OmBucketInfo(org.apache.hadoop.ozone.om.helpers.OmBucketInfo) AuditLogger(org.apache.hadoop.ozone.audit.AuditLogger) DeleteBucketRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DeleteBucketRequest) OMClientResponse(org.apache.hadoop.ozone.om.response.OMClientResponse) OmVolumeArgs(org.apache.hadoop.ozone.om.helpers.OmVolumeArgs) IOException(java.io.IOException) OMMetrics(org.apache.hadoop.ozone.om.OMMetrics) OMResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse) OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) OzoneManagerProtocolProtos(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos) OMBucketDeleteResponse(org.apache.hadoop.ozone.om.response.bucket.OMBucketDeleteResponse) OMMetadataManager(org.apache.hadoop.ozone.om.OMMetadataManager) OMException(org.apache.hadoop.ozone.om.exceptions.OMException)

Example 79 with OMException

use of org.apache.hadoop.ozone.om.exceptions.OMException in project ozone by apache.

the class OMBucketSetOwnerRequest method validateAndUpdateCache.

@Override
public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, long transactionLogIndex, OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
    SetBucketPropertyRequest setBucketPropertyRequest = getOmRequest().getSetBucketPropertyRequest();
    Preconditions.checkNotNull(setBucketPropertyRequest);
    OMResponse.Builder omResponse = OmResponseUtil.getOMResponseBuilder(getOmRequest());
    if (!setBucketPropertyRequest.getBucketArgs().hasOwnerName()) {
        omResponse.setStatus(OzoneManagerProtocolProtos.Status.INVALID_REQUEST).setSuccess(false);
        return new OMBucketSetOwnerResponse(omResponse.build());
    }
    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
    OMMetrics omMetrics = ozoneManager.getMetrics();
    omMetrics.incNumBucketUpdates();
    BucketArgs bucketArgs = setBucketPropertyRequest.getBucketArgs();
    OmBucketArgs omBucketArgs = OmBucketArgs.getFromProtobuf(bucketArgs);
    String volumeName = bucketArgs.getVolumeName();
    String bucketName = bucketArgs.getBucketName();
    String newOwner = bucketArgs.getOwnerName();
    String oldOwner = null;
    AuditLogger auditLogger = ozoneManager.getAuditLogger();
    OzoneManagerProtocolProtos.UserInfo userInfo = getOmRequest().getUserInfo();
    IOException exception = null;
    boolean acquiredBucketLock = false, success = true;
    OMClientResponse omClientResponse = null;
    try {
        // check Acl
        if (ozoneManager.getAclsEnabled()) {
            checkAcls(ozoneManager, OzoneObj.ResourceType.BUCKET, OzoneObj.StoreType.OZONE, IAccessAuthorizer.ACLType.WRITE_ACL, volumeName, bucketName, null);
        }
        // acquire lock.
        acquiredBucketLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK, volumeName, bucketName);
        String bucketKey = omMetadataManager.getBucketKey(volumeName, bucketName);
        OmBucketInfo omBucketInfo = omMetadataManager.getBucketTable().get(bucketKey);
        // Check if bucket exist
        if (omBucketInfo == null) {
            LOG.debug("Bucket: {} not found ", bucketName);
            throw new OMException("Bucket doesnt exist", OMException.ResultCodes.BUCKET_NOT_FOUND);
        }
        oldOwner = omBucketInfo.getOwner();
        if (oldOwner.equals(newOwner)) {
            LOG.warn("Bucket '{}/{}' owner is already user '{}'.", volumeName, bucketName, oldOwner);
            omResponse.setStatus(OzoneManagerProtocolProtos.Status.OK).setMessage("Bucket '" + volumeName + "/" + bucketName + "' owner is already '" + newOwner + "'.").setSuccess(false);
            omResponse.setSetBucketPropertyResponse(SetBucketPropertyResponse.newBuilder().setResponse(false).build());
            omClientResponse = new OMBucketSetOwnerResponse(omResponse.build());
            return omClientResponse;
        }
        omBucketInfo.setOwner(newOwner);
        LOG.debug("Updating bucket owner to {} for bucket: {} in volume: {}", newOwner, bucketName, volumeName);
        omBucketInfo.setModificationTime(setBucketPropertyRequest.getModificationTime());
        // Set the updateID to current transaction log index
        omBucketInfo.setUpdateID(transactionLogIndex, ozoneManager.isRatisEnabled());
        // Update table cache.
        omMetadataManager.getBucketTable().addCacheEntry(new CacheKey<>(bucketKey), new CacheValue<>(Optional.of(omBucketInfo), transactionLogIndex));
        omResponse.setSetBucketPropertyResponse(SetBucketPropertyResponse.newBuilder().setResponse(true).build());
        omClientResponse = new OMBucketSetOwnerResponse(omResponse.build(), omBucketInfo);
    } catch (IOException ex) {
        success = false;
        exception = ex;
        omClientResponse = new OMBucketSetOwnerResponse(createErrorOMResponse(omResponse, exception));
    } finally {
        addResponseToDoubleBuffer(transactionLogIndex, omClientResponse, ozoneManagerDoubleBufferHelper);
        if (acquiredBucketLock) {
            omMetadataManager.getLock().releaseWriteLock(BUCKET_LOCK, volumeName, bucketName);
        }
    }
    // Performing audit logging outside of the lock.
    auditLog(auditLogger, buildAuditMessage(OMAction.SET_OWNER, omBucketArgs.toAuditMap(), exception, userInfo));
    // return response.
    if (success) {
        LOG.debug("Successfully changed Owner of Bucket {}/{} from {} -> {}", volumeName, bucketName, oldOwner, newOwner);
        return omClientResponse;
    } else {
        LOG.error("Setting Owner failed for bucket:{} in volume:{}", bucketName, volumeName, exception);
        omMetrics.incNumBucketUpdateFails();
        return omClientResponse;
    }
}
Also used : OmBucketInfo(org.apache.hadoop.ozone.om.helpers.OmBucketInfo) AuditLogger(org.apache.hadoop.ozone.audit.AuditLogger) OMClientResponse(org.apache.hadoop.ozone.om.response.OMClientResponse) OmBucketArgs(org.apache.hadoop.ozone.om.helpers.OmBucketArgs) BucketArgs(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.BucketArgs) IOException(java.io.IOException) OMResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse) OMMetrics(org.apache.hadoop.ozone.om.OMMetrics) OzoneManagerProtocolProtos(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos) OmBucketArgs(org.apache.hadoop.ozone.om.helpers.OmBucketArgs) OMMetadataManager(org.apache.hadoop.ozone.om.OMMetadataManager) OMBucketSetOwnerResponse(org.apache.hadoop.ozone.om.response.bucket.OMBucketSetOwnerResponse) OMException(org.apache.hadoop.ozone.om.exceptions.OMException) SetBucketPropertyRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyRequest)

Example 80 with OMException

use of org.apache.hadoop.ozone.om.exceptions.OMException in project ozone by apache.

the class OMBucketSetPropertyRequest method validateAndUpdateCache.

@Override
@SuppressWarnings("methodlength")
public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, long transactionLogIndex, OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
    SetBucketPropertyRequest setBucketPropertyRequest = getOmRequest().getSetBucketPropertyRequest();
    Preconditions.checkNotNull(setBucketPropertyRequest);
    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
    OMMetrics omMetrics = ozoneManager.getMetrics();
    omMetrics.incNumBucketUpdates();
    BucketArgs bucketArgs = setBucketPropertyRequest.getBucketArgs();
    OmBucketArgs omBucketArgs = OmBucketArgs.getFromProtobuf(bucketArgs);
    String volumeName = bucketArgs.getVolumeName();
    String bucketName = bucketArgs.getBucketName();
    OMResponse.Builder omResponse = OmResponseUtil.getOMResponseBuilder(getOmRequest());
    OmBucketInfo omBucketInfo = null;
    AuditLogger auditLogger = ozoneManager.getAuditLogger();
    OzoneManagerProtocolProtos.UserInfo userInfo = getOmRequest().getUserInfo();
    IOException exception = null;
    boolean acquiredBucketLock = false, success = true;
    OMClientResponse omClientResponse = null;
    try {
        // check Acl
        if (ozoneManager.getAclsEnabled()) {
            checkAcls(ozoneManager, OzoneObj.ResourceType.BUCKET, OzoneObj.StoreType.OZONE, IAccessAuthorizer.ACLType.WRITE, volumeName, bucketName, null);
        }
        // acquire lock.
        acquiredBucketLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK, volumeName, bucketName);
        String bucketKey = omMetadataManager.getBucketKey(volumeName, bucketName);
        OmBucketInfo dbBucketInfo = omMetadataManager.getBucketTable().get(bucketKey);
        // Check if bucket exist
        if (dbBucketInfo == null) {
            LOG.debug("bucket: {} not found ", bucketName);
            throw new OMException("Bucket doesn't exist", OMException.ResultCodes.BUCKET_NOT_FOUND);
        }
        OmBucketInfo.Builder bucketInfoBuilder = OmBucketInfo.newBuilder();
        bucketInfoBuilder.setVolumeName(dbBucketInfo.getVolumeName()).setBucketName(dbBucketInfo.getBucketName()).setObjectID(dbBucketInfo.getObjectID()).setUpdateID(transactionLogIndex);
        bucketInfoBuilder.addAllMetadata(KeyValueUtil.getFromProtobuf(bucketArgs.getMetadataList()));
        // Check StorageType to update
        StorageType storageType = omBucketArgs.getStorageType();
        if (storageType != null) {
            bucketInfoBuilder.setStorageType(storageType);
            LOG.debug("Updating bucket storage type for bucket: {} in volume: {}", bucketName, volumeName);
        } else {
            bucketInfoBuilder.setStorageType(dbBucketInfo.getStorageType());
        }
        // Check Versioning to update
        Boolean versioning = omBucketArgs.getIsVersionEnabled();
        if (versioning != null) {
            bucketInfoBuilder.setIsVersionEnabled(versioning);
            LOG.debug("Updating bucket versioning for bucket: {} in volume: {}", bucketName, volumeName);
        } else {
            bucketInfoBuilder.setIsVersionEnabled(dbBucketInfo.getIsVersionEnabled());
        }
        // Check quotaInBytes and quotaInNamespace to update
        String volumeKey = omMetadataManager.getVolumeKey(volumeName);
        OmVolumeArgs omVolumeArgs = omMetadataManager.getVolumeTable().get(volumeKey);
        if (checkQuotaBytesValid(omMetadataManager, omVolumeArgs, omBucketArgs)) {
            bucketInfoBuilder.setQuotaInBytes(omBucketArgs.getQuotaInBytes());
        } else {
            bucketInfoBuilder.setQuotaInBytes(dbBucketInfo.getQuotaInBytes());
        }
        if (checkQuotaNamespaceValid(omVolumeArgs, omBucketArgs)) {
            bucketInfoBuilder.setQuotaInNamespace(omBucketArgs.getQuotaInNamespace());
        } else {
            bucketInfoBuilder.setQuotaInNamespace(dbBucketInfo.getQuotaInNamespace());
        }
        bucketInfoBuilder.setCreationTime(dbBucketInfo.getCreationTime());
        bucketInfoBuilder.setModificationTime(setBucketPropertyRequest.getModificationTime());
        // Set acls from dbBucketInfo if it has any.
        if (dbBucketInfo.getAcls() != null) {
            bucketInfoBuilder.setAcls(dbBucketInfo.getAcls());
        }
        // Set the objectID to dbBucketInfo objectID, if present
        if (dbBucketInfo.getObjectID() != 0) {
            bucketInfoBuilder.setObjectID(dbBucketInfo.getObjectID());
        }
        // Set the updateID to current transaction log index
        bucketInfoBuilder.setUpdateID(transactionLogIndex);
        // Quota used remains unchanged
        bucketInfoBuilder.setUsedBytes(dbBucketInfo.getUsedBytes());
        bucketInfoBuilder.setUsedNamespace(dbBucketInfo.getUsedNamespace());
        omBucketInfo = bucketInfoBuilder.build();
        // Update table cache.
        omMetadataManager.getBucketTable().addCacheEntry(new CacheKey<>(bucketKey), new CacheValue<>(Optional.of(omBucketInfo), transactionLogIndex));
        omResponse.setSetBucketPropertyResponse(SetBucketPropertyResponse.newBuilder().build());
        omClientResponse = new OMBucketSetPropertyResponse(omResponse.build(), omBucketInfo);
    } catch (IOException ex) {
        success = false;
        exception = ex;
        omClientResponse = new OMBucketSetPropertyResponse(createErrorOMResponse(omResponse, exception));
    } finally {
        addResponseToDoubleBuffer(transactionLogIndex, omClientResponse, ozoneManagerDoubleBufferHelper);
        if (acquiredBucketLock) {
            omMetadataManager.getLock().releaseWriteLock(BUCKET_LOCK, volumeName, bucketName);
        }
    }
    // Performing audit logging outside of the lock.
    auditLog(auditLogger, buildAuditMessage(OMAction.UPDATE_BUCKET, omBucketArgs.toAuditMap(), exception, userInfo));
    // return response.
    if (success) {
        LOG.debug("Setting bucket property for bucket:{} in volume:{}", bucketName, volumeName);
        return omClientResponse;
    } else {
        LOG.error("Setting bucket property failed for bucket:{} in volume:{}", bucketName, volumeName, exception);
        omMetrics.incNumBucketUpdateFails();
        return omClientResponse;
    }
}
Also used : OmBucketInfo(org.apache.hadoop.ozone.om.helpers.OmBucketInfo) AuditLogger(org.apache.hadoop.ozone.audit.AuditLogger) StorageType(org.apache.hadoop.hdds.protocol.StorageType) OMClientResponse(org.apache.hadoop.ozone.om.response.OMClientResponse) OmVolumeArgs(org.apache.hadoop.ozone.om.helpers.OmVolumeArgs) OmBucketArgs(org.apache.hadoop.ozone.om.helpers.OmBucketArgs) BucketArgs(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.BucketArgs) OMBucketSetPropertyResponse(org.apache.hadoop.ozone.om.response.bucket.OMBucketSetPropertyResponse) IOException(java.io.IOException) OMMetrics(org.apache.hadoop.ozone.om.OMMetrics) OMResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse) OzoneManagerProtocolProtos(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos) OmBucketArgs(org.apache.hadoop.ozone.om.helpers.OmBucketArgs) OMMetadataManager(org.apache.hadoop.ozone.om.OMMetadataManager) OMException(org.apache.hadoop.ozone.om.exceptions.OMException) SetBucketPropertyRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyRequest)

Aggregations

OMException (org.apache.hadoop.ozone.om.exceptions.OMException)179 IOException (java.io.IOException)83 OmBucketInfo (org.apache.hadoop.ozone.om.helpers.OmBucketInfo)44 OzoneBucket (org.apache.hadoop.ozone.client.OzoneBucket)43 OmKeyInfo (org.apache.hadoop.ozone.om.helpers.OmKeyInfo)39 Test (org.junit.Test)37 ArrayList (java.util.ArrayList)30 OMMetadataManager (org.apache.hadoop.ozone.om.OMMetadataManager)30 OMClientResponse (org.apache.hadoop.ozone.om.response.OMClientResponse)30 OzoneVolume (org.apache.hadoop.ozone.client.OzoneVolume)28 OMResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse)28 OMMetrics (org.apache.hadoop.ozone.om.OMMetrics)22 OmVolumeArgs (org.apache.hadoop.ozone.om.helpers.OmVolumeArgs)20 OzoneFileStatus (org.apache.hadoop.ozone.om.helpers.OzoneFileStatus)18 OzoneOutputStream (org.apache.hadoop.ozone.client.io.OzoneOutputStream)17 RepeatedOmKeyInfo (org.apache.hadoop.ozone.om.helpers.RepeatedOmKeyInfo)17 OzoneManagerProtocolProtos (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos)17 OmKeyLocationInfo (org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo)16 KeyArgs (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyArgs)15 AuditLogger (org.apache.hadoop.ozone.audit.AuditLogger)14