Skip to content

Conversation

@GraciesPadre
Copy link
Contributor

This addresses https://jira.spectralogic.com/browse/JSDK-185.

There are 2 parts:

  1. Read jobs are refactored so that failures in writing a file short-circuit the read retry logic and bubble an exception back to the client.

  2. Implements a helper function that allows customer to see if the objects they want to get from a BP bucket will fit in a directory they tell us about, instead of relying on catching an exception during the read.

final Collection<String> objectNames)
throws IOException
{
final Map<String, Long> objectSizeMap = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this map going to be mutated? If not convert this to an ImmutableMap and use the ImmutableMap.Builder to create it.


long requiredSpace = 0;
long availableSpace = 0;
final IOException ioException = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this purposefully alway null?

helpers.ensureBucketExists(bucketName);
} catch (final IOException e) {
return new ObjectStorageSpaceVerificationResult(ObjectStorageSpaceVerificationResult.VerificationStatus.BucketDoesNotExist,
requiredSpace, availableSpace, ioException);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is e supposed to be passed in instead of ioException


import java.io.IOException;

public class UnrecoverableIOException extends IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an explanation of what an unrecoverable IO Exception is.

@rpmoore rpmoore merged commit f264616 into SpectraLogic:master Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants