-
Notifications
You must be signed in to change notification settings - Fork 59
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
Issue 815 batch restore of objects for GCP #816
base: issue_792_batch_restore_s3
Are you sure you want to change the base?
Issue 815 batch restore of objects for GCP #816
Conversation
…StackOF problem - need to fix!
…ests for restoreFolder GCP method helper.
} | ||
}; | ||
} | ||
} |
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.
add empty line please
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.
fixed
} | ||
} | ||
|
||
private boolean isFileWithDeleteMarkerAndShouldBeRestore(final AbstractDataStorageItem item, |
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.
Maybe we should move this method into ProviderUtils
to reuse it into S3Helper
?
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.
good idea, replaced
if (StringUtils.isNotBlank(folderPath)) { | ||
folderPath = normalizeFolderPath(requestPath); | ||
} | ||
final Page<Blob> blobs = client.list(bucketName, |
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.
Maybe it would be better to move this logic into separate method and reuse it into listItems
methd?
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.
Did it, now it looks little bit better
} | ||
}; | ||
} | ||
} |
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.
add a new line please
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.
duplicate)
} | ||
} | ||
|
||
private boolean isFileWithDeleteMarkerAndShouldBeRestore(final AbstractDataStorageItem item, |
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.
Maybe we should move this method into ProviderUtils
class and reuse it into S3Helper
?
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.
duplicate)
if (isFileWithDeleteMarkerAndShouldBeRestore(item, restoreFolderVO)) { | ||
final Blob blob = checkBlobExistsAndGet(bucketName, item.getPath(), client, | ||
removeDeletedMarkerFromVersion(((DataStorageFile) item).getVersion())); | ||
final Storage.CopyRequest request = Storage.CopyRequest.newBuilder() |
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.
Maybe it would be better to create a new method (wth copy bob logic) and reuse it into restoreFileVersion
?
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.
done
e5b8a8e
to
2ac0ccf
Compare
This PR related to issue #815
The same logic as in PR #806 (issue #792)
Description:
Introducing of a new feature in the GCP-CP client for the ability to restore folders in the GCP storage.
Implementing a new RestoreFolderVO object to configure folder restoration.
General options:
Details:
Specifying RestoreFolderVO is mandatory; specifying the include/exclude lists is optional.
Specifying the path to the recovery folder is optional; an empty path means the root directory.