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

Adding pinot file system command #8659

Merged
merged 2 commits into from
May 10, 2022
Merged

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented May 7, 2022

Adding Pinot FS command into toolings for quickly testing if the filesystem configs and settings credentials are correct. Also, users can perform some simple actions if needed.

Usage:

pinot-admins.sh FileSystem <sub-command> <sub-command parameters>

There is also a separate script for it:

pinot-fs-util.sh <sub-command> <sub-command parameters>

Currently, supported sub-command operations are coming from PinotFS interfaces:

ls
cp
mv
rm

Default loaded PinotFS are org.apache.pinot.spi.filesystem.LocalPinotFS and org.apache.pinot.plugin.filesystem.S3PinotFS if scheme is not registered by the config file.

Example:

List files recursively on s3 when AWS is configured:

pinot-admin.sh FileSystem ls -r s3://<my-bucket>/

List files recursively on s3 with the pinot fs config:

pinot-admin.sh  FileSystem -config /tmp/fs.conf  -command ls -r s3://<my-bucket>/

The content of fs.conf will be deserailize to org.apache.pinot.spi.ingestion.batch.spec.PinotFSSpec

class.s3=org.apache.pinot.plugin.filesystem.S3PinotFS
s3.region=us-west-2
s3.accessKey=<my-access-key>
s3.secretKey=<my-secret-key>

Examples of no access for s3:

bin/pinot-admin.sh  FileSystem ls  s3://<my-bucket>

Unable to list files under: s3://<my-bucket>, exception: software.amazon.awssdk.services.s3.model.S3Exception: Access Denied (Service: S3, Status Code: 403, Request ID: 33KA59XA0ZPBDPN2, Extended Request ID: TILm5sJyqoQttVTNgSS5Hs1N89cQa9MtxRAh5oQSH8Jm9DpOG/yI/raYIw/7FU3fYzARba6qQBA=)

@xiangfu0 xiangfu0 added feature release-notes Referenced by PRs that need attention when compiling the next release notes labels May 7, 2022
@xiangfu0 xiangfu0 marked this pull request as draft May 7, 2022 10:14
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch 2 times, most recently from 9680bfe to 538a1d3 Compare May 7, 2022 19:47
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.37%. Comparing base (c0056dc) to head (35187ae).
Report is 3767 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #8659      +/-   ##
============================================
+ Coverage     70.32%   70.37%   +0.05%     
+ Complexity     4418     4347      -71     
============================================
  Files          1693     1693              
  Lines         88309    88309              
  Branches      13212    13212              
============================================
+ Hits          62104    62149      +45     
+ Misses        21921    21876      -45     
  Partials       4284     4284              
Flag Coverage Δ
integration1 27.47% <ø> (+0.07%) ⬆️
integration2 25.59% <ø> (+0.05%) ⬆️
unittests1 66.21% <ø> (+0.04%) ⬆️
unittests2 14.34% <ø> (+<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.

@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch from 538a1d3 to cb8d438 Compare May 8, 2022 10:38
@xiangfu0 xiangfu0 marked this pull request as ready for review May 8, 2022 17:41
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch 3 times, most recently from fa20d5c to 2fffb23 Compare May 9, 2022 09:01
@xiangfu0 xiangfu0 requested review from Jackie-Jiang and walterddr May 9, 2022 09:04
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch from a2f5c85 to 6c8eec0 Compare May 9, 2022 23:47
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch 3 times, most recently from 62fe5de to 7498fa0 Compare May 10, 2022 00:33
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch 5 times, most recently from debd54f to 78e3e4f Compare May 10, 2022 08:22
@xiangfu0 xiangfu0 force-pushed the pinot-fs-tooling branch from 78e3e4f to 35187ae Compare May 10, 2022 10:27
@xiangfu0 xiangfu0 merged commit d208f57 into apache:master May 10, 2022
@xiangfu0 xiangfu0 deleted the pinot-fs-tooling branch May 10, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants