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

Add getFileInfoObject API in gcsio #1160

Merged
merged 3 commits into from
May 29, 2024
Merged

Add getFileInfoObject API in gcsio #1160

merged 3 commits into from
May 29, 2024

Conversation

singhravidutt
Copy link
Contributor

Adding a new API getFileInfoObject. It differs from getFileInfo in following cases

  1. getFileInfo provides the info even for a directory, getFileInfoObject will only provide valid responses if provided path is a valid gcs object.
  2. getFileInfo makes two parallel calls to listObject and getItemInfo where as getFileInfoObject will only make a call to getItemInfo.

This API will hep in extracting fileInfo where we know for sure that request path is an object and not a directory. Having this knowledge will be cost effective as we will be avoiding a class 'A' operation i.e. listObject call.

@singhravidutt
Copy link
Contributor Author

/gcbrun

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.82%. Comparing base (f39c78f) to head (2e3a4d1).

Files Patch % Lines
...hadoop/gcsio/GoogleCloudStorageFileSystemImpl.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1160   +/-   ##
=========================================
  Coverage     81.81%   81.82%           
- Complexity     1901     1903    +2     
=========================================
  Files           103      103           
  Lines          8397     8405    +8     
  Branches       1027     1028    +1     
=========================================
+ Hits           6870     6877    +7     
  Misses         1105     1105           
- Partials        422      423    +1     
Flag Coverage Δ
integrationtest 68.54% <87.50%> (+0.06%) ⬆️
unittest 73.37% <87.50%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@singhravidutt singhravidutt marked this pull request as ready for review May 28, 2024 09:03
@singhravidutt singhravidutt changed the title Get file info object May 29, 2024
@singhravidutt singhravidutt merged commit 449cd8c into master May 29, 2024
4 checks passed
@singhravidutt singhravidutt deleted the getFileInfoObject branch May 29, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants