-
Notifications
You must be signed in to change notification settings - Fork 53
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
Chunkinfo #234
Merged
Chunkinfo #234
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8163b4c
add hdf5 to Docker image
jreadey 019c5fc
added IndexIterator
jreadey 1c13a7b
added chunklocator.py
jreadey 49d4969
update SingleObject design
jreadey 5347d0e
add test case for chunk init
jreadey 834a0e8
chunkinitializer support
jreadey e3247b5
fix flake8 error
jreadey 76b9ae6
filter out stray log messages from chunk initializer
jreadey 75960d2
updates based on pr review
jreadey c83e15c
added arange chunk initializer
jreadey 26c7238
fix falke8 errors
jreadey 5c7d884
added intelligent range get support, remove range_proxy
jreadey 9ede8e3
reduced debug log verbosity
jreadey ccdda94
use hyper_dims creation property
jreadey 79e1988
added munger for rangeget requests
jreadey 07dafad
flake8 cleanup
jreadey ddca08d
updates per code review
jreadey e582e9b
fix comment
jreadey 87ed37a
fix numpy warning
jreadey 84c0649
update aiobotocore to 2.5.0
jreadey 39391c8
change urllib requirement
jreadey b996c8b
match requirements.txt with setup.py
jreadey d949a1a
remove version restriction on urllib3
jreadey 9b0fad6
remove version restriction on botocore3
jreadey 663627e
remove urlib3 from dependencies
jreadey 36829ff
fix flake8 errors
jreadey 115f088
fix for numpy deprecation if truth value of empty array
jreadey e8d32ed
fix flake8 errors
jreadey b61bd8f
more flake8 errors
jreadey 073c9ec
merge changes from master
jreadey 80e74e2
optimzie ndarray_compare for non-vlen arrays
jreadey 4b29aa6
fix flake8 error
jreadey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1170,3 +1170,35 @@ def chunkQuery( | |
log.debug(f" {i}: {rsp_arr[i]}") | ||
|
||
return rsp_arr | ||
|
||
def _find_min_pair(h5chunks, max_gap=None): | ||
""" given a dict of chunk_map entries, return the two | ||
chunks nearest to each other in the file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
If max_gap is set, chunms must be within max_gap bytes """ | ||
if len(h5chunks) < 2: | ||
return None | ||
chunk_indices = list(h5chunks.keys()) | ||
min_pair = None | ||
min_gap = None | ||
for index_left in chunk_indices: | ||
for index_right in chunk_indices: | ||
if index_left == index_right: | ||
continue | ||
chunk_left = h5chunks[index_left] | ||
chunk_right = h5chunks[index_right] | ||
if chunk_left["offset"] > chunk_right["offset"]: | ||
continue | ||
gap = chunk_right["offset"] - (chunk_left["offset"] + chunk_left["length"]) | ||
if gap == 0: | ||
# these two are contiguous | ||
return (index_left, index_right) | ||
if max_gap is not None and gap > max_gap: | ||
# too far apart | ||
continue | ||
if min_gap is None or gap < min_gap: | ||
min_gap = gap | ||
min_pair = (index_left, index_right) | ||
return min_pair | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why the sum instead of product? If s3size is a list, isn't each entry in the list a dimension describing the size of the data in s3?
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, it should be sum. In this case s3size is a colon separated list of range lengths, so the sum is the total number of bytes to read.