-
Notifications
You must be signed in to change notification settings - Fork 482
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
Size computation mode #1093
Conversation
Investigating VideosContainerResourceTest failure |
Fix JSON override
public Map<String, Long> call() throws Exception { | ||
Map<String, Long> result = new LinkedHashMap<>(); | ||
for (DownloadableItem item : items) { | ||
InputStreamWrapper stream = connectionProvider.getInputStreamForItem(jobId, 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.
(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; |
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 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).
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.
...ypes-common/src/main/java/org/datatransferproject/types/common/models/videos/VideoModel.java
Show resolved
Hide resolved
.../src/main/java/org/datatransferproject/spi/transfer/idempotentexecutor/ItemImportResult.java
Outdated
Show resolved
Hide resolved
...n/java/org/datatransferproject/spi/transfer/idempotentexecutor/IdempotentImportExecutor.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/datatransferproject/spi/transfer/idempotentexecutor/CachingExecutor.java
Outdated
Show resolved
Hide resolved
...ypes-common/src/main/java/org/datatransferproject/types/common/models/photos/PhotoModel.java
Outdated
Show resolved
Hide resolved
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
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.
Merged changes
This PR is based on #1079. Please see the second commit of this PR (3d6b9fb) for changes related to the size computation mode.