Skip to content
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

IGNITE-9433 Extracted zip suffix constant #4652

Closed
wants to merge 3 commits into from

Conversation

voropava
Copy link
Contributor

@voropava voropava commented Aug 30, 2018

@voropava
Copy link
Contributor Author

@EdShangGG could you please review

@@ -77,6 +77,8 @@
/** File suffix. */
public static final String FILE_SUFFIX = ".bin";

public static final String ZIP_SUFFIX = ".zip";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add javadoc to variable.

@@ -121,7 +122,7 @@ public String getAbsolutePath() {

/** {@inheritDoc} */
@Override public boolean isCompressed() {
return file.getName().endsWith(".zip");
return file.getName().endsWith(FilePageStoreManager.ZIP_SUFFIX);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better use static import?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whyfor? i don't think this is readable, except for tests

@@ -2104,9 +2105,9 @@ private void deleteObsoleteRawSegments() {
if (currReservedSegment == -1)
continue;

File tmpZip = new File(walArchiveDir, FileDescriptor.fileName(currReservedSegment) + ".zip" + ".tmp");
File tmpZip = new File(walArchiveDir, FileDescriptor.fileName(currReservedSegment) + FilePageStoreManager.ZIP_SUFFIX + ".tmp");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you extract ".tmp" too

@asfgit asfgit closed this in 6e7b86e Sep 4, 2018
SGrimstad pushed a commit to gridgain/apache-ignite that referenced this pull request Sep 11, 2018
…he#4652.

Signed-off-by: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
voropava added a commit to gridgain/apache-ignite that referenced this pull request Sep 14, 2018
voropava added a commit to gridgain/apache-ignite that referenced this pull request Sep 17, 2018
akalash pushed a commit to gridgain/apache-ignite that referenced this pull request Nov 19, 2018
…he#4652.

Signed-off-by: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
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.

None yet

2 participants