-
Notifications
You must be signed in to change notification settings - Fork 505
Refactor entire code for v9.0.0 #1621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Refactor entire code for v9.0.0 #1621
Conversation
c7bd699
to
e48331a
Compare
9f9d9fa
to
d236c38
Compare
f87f534
to
1eeb6e7
Compare
@balamurugana is this ready to be reviewed? |
|
1eeb6e7
to
330157e
Compare
b20bf98
to
bc2d471
Compare
0afc13f
to
e064a53
Compare
@harshavardhana is the release done? @balamurugana is there anything else pending here other than the reviews? |
} catch (EOFException e) { | ||
throw new MinioException(e); | ||
} catch (IOException e) { | ||
throw new MinioException(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} catch (EOFException e) { | |
throw new MinioException(e); | |
} catch (IOException e) { | |
throw new MinioException(e); | |
} | |
} catch (EOFException | IOException e) { | |
throw new MinioException(e); | |
} |
if not using specific custom message?
} catch (EOFException e) { | ||
throw new MinioException(e); | ||
} catch (IOException e) { | ||
throw new MinioException(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} catch (EOFException e) { | |
throw new MinioException(e); | |
} catch (IOException e) { | |
throw new MinioException(e); | |
} | |
} catch (EOFException | IOException e) { | |
throw new MinioException(e); | |
} |
@JsonProperty("objectsReplicatedTotalSize") | ||
private long objectsReplicatedTotalSize; | ||
|
||
@JsonProperty("objectReplicaTotalSize") | ||
private long objectReplicaTotalSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how are these two fields different?
private BigDecimal totalspace; | ||
|
||
@JsonProperty("usedspace") | ||
private BigDecimal usedspace; | ||
|
||
@JsonProperty("availspace") | ||
private BigDecimal availspace; | ||
|
||
@JsonProperty("readthroughput") | ||
private BigDecimal readthroughput; | ||
|
||
@JsonProperty("writethroughput") | ||
private BigDecimal writethroughput; | ||
|
||
@JsonProperty("readlatency") | ||
private BigDecimal readlatency; | ||
|
||
@JsonProperty("writelatency") | ||
private BigDecimal writelatency; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no camelCase for naming?
@Nullable String group) | ||
throws MinioException { | ||
if (!(user != null ^ group != null)) { | ||
throw new IllegalArgumentException("either user or group must be provided"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be throwing MinioException
here?
} catch (JsonProcessingException e) { | ||
throw new MinioException(e); | ||
} catch (IOException e) { | ||
throw new MinioException(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} catch (JsonProcessingException e) { | |
throw new MinioException(e); | |
} catch (IOException e) { | |
throw new MinioException(e); | |
} | |
} catch (JsonProcessingException | IOException e) { | |
throw new MinioException(e); | |
} |
// Inherited by MinioException | ||
if (e instanceof BucketPolicyTooLargeException) throw (BucketPolicyTooLargeException) e; | ||
if (e instanceof ErrorResponseException) throw (ErrorResponseException) e; | ||
if (e instanceof InsufficientDataException) throw (InsufficientDataException) e; | ||
if (e instanceof InternalException) throw (InternalException) e; | ||
if (e instanceof InvalidResponseException) throw (InvalidResponseException) e; | ||
if (e instanceof ServerException) throw (ServerException) e; | ||
if (e instanceof XmlParserException) throw (XmlParserException) e; | ||
|
||
// Inherited by IOException | ||
if (e instanceof JsonMappingException) throw (JsonMappingException) e; | ||
if (e instanceof JsonParseException) throw (JsonParseException) e; | ||
if (e instanceof JsonProcessingException) throw (JsonProcessingException) e; | ||
if (e instanceof EOFException) throw (EOFException) e; | ||
if (e instanceof FileNotFoundException) throw (FileNotFoundException) e; | ||
if (e instanceof IOException) throw (IOException) e; | ||
|
||
// Inherited by GeneralSecurityException | ||
if (e instanceof CertificateException) throw (CertificateException) e; | ||
if (e instanceof InvalidKeyException) throw (InvalidKeyException) e; | ||
if (e instanceof KeyManagementException) throw (KeyManagementException) e; | ||
if (e instanceof KeyStoreException) throw (KeyStoreException) e; | ||
if (e instanceof NoSuchAlgorithmException) throw (NoSuchAlgorithmException) e; | ||
if (e instanceof GeneralSecurityException) throw (GeneralSecurityException) e; | ||
|
||
throw this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this, when
- All these exceptions already extend their respective parent classes
- They will naturally propagate up the call stack
- No need to manually check and re-throw
private long size; | ||
private ZonedDateTime lastModified; | ||
private RetentionMode retentionMode; | ||
private ZonedDateTime retentionRetainUntilDate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private ZonedDateTime retentionRetainUntilDate; | |
private ZonedDateTime retainUntilDate; |
should be good enough name
@nagashreem Other than review, nothing is pending |
* Move dependent classes as subclasses in messages * PutObject supports parallel uploads and checksum * Examples are updated * Dependencies are upgraded * Remove all deprecated methods * Add appendObject API Signed-off-by: Bala.FA <bala@minio.io>
e064a53
to
93cfd5b
Compare
Uh oh!
There was an error while loading. Please reload this page.