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

Size computation mode #1093

Merged
merged 5 commits into from
Jun 18, 2022
Merged

Size computation mode #1093

merged 5 commits into from
Jun 18, 2022

Conversation

xokker
Copy link
Collaborator

@xokker xokker commented Jun 16, 2022

This PR is based on #1079. Please see the second commit of this PR (3d6b9fb) for changes related to the size computation mode.

@xokker xokker requested a review from wmorland June 16, 2022 12:34
@wmorland
Copy link
Collaborator

Investigating VideosContainerResourceTest failure

Fix JSON override
@wmorland wmorland requested a review from jzacsh June 17, 2022 16:41
public Map<String, Long> call() throws Exception {
Map<String, Long> result = new LinkedHashMap<>();
for (DownloadableItem item : items) {
InputStreamWrapper stream = connectionProvider.getInputStreamForItem(jobId, item);
Copy link
Collaborator

Choose a reason for hiding this comment

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

(shouldn't block PR) consideration for the future: If I'm understanding this right, then I think we could use a counting proxy and then maybe just have a single pass

@@ -205,6 +227,34 @@ private void importIteration(
}
}

private void sizeCalculationIteration(UUID jobId, String jobIdPrefix,
DataModel exportedData) throws CopyException {
Collection<? extends DownloadableItem> items;
Copy link
Collaborator

Choose a reason for hiding this comment

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

(shouldn't block PR) another future consideration is make getItems an interface all models are required to have so we don't have to maintain this coverage. We should definitely at least come back to this code after you merge and drop a TODO here to fill out the coverage (either via interface or by hand for the current known models).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

jzacsh
jzacsh previously approved these changes Jun 17, 2022
@jzacsh
Copy link
Collaborator

jzacsh commented Jun 17, 2022

as with PR #1079 feel free to merge - just left comments for your consideration later. The one compilation comment I made is probably moot since clearly the bot ran some gradle stuff so I guess we're all good.

# Conflicts:
#	portability-spi-transfer/src/main/java/org/datatransferproject/spi/transfer/idempotentexecutor/IdempotentImportExecutor.java
#	portability-spi-transfer/src/main/java/org/datatransferproject/spi/transfer/idempotentexecutor/ItemImportResult.java
#	portability-types-common/src/main/java/org/datatransferproject/types/common/models/photos/PhotoModel.java
Copy link
Collaborator

@wmorland wmorland left a comment

Choose a reason for hiding this comment

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

Merged changes

@wmorland wmorland merged commit 46aac50 into dtinit:master Jun 18, 2022
@xokker xokker deleted the size-computation-mode branch June 21, 2022 13:12
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.

3 participants