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

[ozone] Dedicated Ozone browser in Hue #3189

Merged
merged 9 commits into from Mar 10, 2023
Merged

[ozone] Dedicated Ozone browser in Hue #3189

merged 9 commits into from Mar 10, 2023

Conversation

Harshg999
Copy link
Collaborator

@Harshg999 Harshg999 commented Feb 7, 2023

What changes were proposed in this pull request?

  • Adding dedicated Ozone browser in Hue like other file-systems.

The PR can be divided into following sub-sections:

  • Adding ozone related configuration and defining the directory structure.
    • Almost similar to the existing HDFS config.
  • Add the OFS client extending the already existing WebHDFS client.
  • Default to Ozone root for all users.
    • As of now, Ozone is not having the concept of user home directories. If they have it the future, we can make the necessary changes.
  • Give necessary permissions according to the Hue user and groups.
  • Checking all the operations and updating for the ozone specific ones.
  • Having a dedicated upload handler using the /create API because Ozone does not support /append yet.
    • This restricts us to upload the file content as one chunk only.
    • Uploads via the /create API is slow generally, therefore max size (assuming chunk size allows it) also depends on network speed and Hue connection timeout.
  • Add the supporting UI changes.
    • Icons and detailed branding will be done in other PRs.
  • Make Importer work with Ozone path.
    • Hive and Impala needs fs_defaultfs in the path for queries like LOAD DATA INPATH "ofs://....
    • If Ozone is in HA mode, then fs_defaultfs will have a service ID else it will have the URI of the Ozone Manager.
  • Add new unit tests and update the existing ones for the Ozone FS.

How was this patch tested?

  • Via dedicated and existing unit tests.
  • Tested manually by connecting to the un-secure Ozone service supporting HttpfS APIs.
  • Tested E2E in a secure cluster having Ozone service supporting HttpfS APIs.
    • Existing Hue in that cluster was swapped with the latest Hue containing these changes. Hue was working fine in the secure cluster OOTB.

@Harshg999 Harshg999 self-assigned this Feb 7, 2023
@Harshg999 Harshg999 marked this pull request as draft February 7, 2023 21:06
@Harshg999 Harshg999 changed the title [ozone] Add ozone config and improve dir structure [ozone] Add ozone config and improve directory structure Feb 7, 2023
@agl29 agl29 force-pushed the ozone-conf branch 2 times, most recently from 3ad1636 to 12f1468 Compare February 22, 2023 11:31
@Harshg999 Harshg999 changed the title [ozone] Add ozone config and improve directory structure [ozone] Ozone V1 skeleton Mar 1, 2023
@bjornalm bjornalm requested review from bjornalm and removed request for bjornalm March 3, 2023 09:37
@Harshg999 Harshg999 marked this pull request as ready for review March 7, 2023 06:58
@Harshg999 Harshg999 force-pushed the ozone-conf branch 2 times, most recently from 65e10e0 to 4588703 Compare March 8, 2023 12:11
@Harshg999
Copy link
Collaborator Author

The PR is ready for review.
@JohanAhlen @ranade1

@Harshg999 Harshg999 changed the title [ozone] Ozone V1 skeleton [ozone] Dedicated Ozone browser in Hue Mar 8, 2023
@Harshg999
Copy link
Collaborator Author

The PR description has been added.
The changes of the PR has been tested both via unit tests and E2E tests.

Copy link
Contributor

@JohanAhlen JohanAhlen left a comment

Choose a reason for hiding this comment

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

Super nice!

This one is touching quite some legacy UI code and some things can be shortened/improved but I decided not to comment about that as we can better spend time cleaning up as part of moving the File Browser to React.

A few nits but all-in-all looks good to me!

});

self.isOFSVol = ko.pureComputed(function () {
return self.isOFS() && self.currentPath().split("/").length === 3 && self.currentPath().split("/")[2] !== '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Instead of split, why not .. && self.currentPath().toLowerCase() === 'ofs://'?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't get this.
Here we are checking, that current path is at volume level (ofs://volume) or not.
so I was splitting the path like this -> ['ofs:', '', 'volume']

Copy link
Collaborator

@amitsrivastava amitsrivastava left a comment

Choose a reason for hiding this comment

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

Awesome work folks.

I have put up some questions. Please check.

desktop/conf.dist/hue.ini Outdated Show resolved Hide resolved
desktop/conf.dist/hue.ini Show resolved Hide resolved
desktop/core/src/desktop/lib/fs/ozone/ofs.py Show resolved Hide resolved
desktop/core/src/desktop/lib/fs/ozone/upload.py Outdated Show resolved Hide resolved
desktop/core/src/desktop/lib/fs/ozone/upload.py Outdated Show resolved Hide resolved
desktop/libs/indexer/src/indexer/indexers/sql.py Outdated Show resolved Hide resolved
desktop/core/src/desktop/lib/fs/proxyfs.py Show resolved Hide resolved
agl29 and others added 6 commits March 10, 2023 11:14
- Add ofs as a separate fs in proxyfs
- Add ozone to user and group permissions
- Update APIs with ofs
- Default users to ofs root directory
- Check for fs_defaultFS null scenarios and raise error.
- Use urlparse for better code readability.
- Improve comments.
@Harshg999
Copy link
Collaborator Author

PR is rebased, merging now.

@Harshg999 Harshg999 enabled auto-merge (rebase) March 10, 2023 05:46
@Harshg999 Harshg999 merged commit 731cc5c into master Mar 10, 2023
@Harshg999 Harshg999 deleted the ozone-conf branch March 10, 2023 06:04
agl29 pushed a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit 6b03c71)
(cherry picked from commit b5c2255)
Change-Id: I24b7be3aefba808abe949dea9e486f05dbb0727d
(cherry picked from commit 0cc32ca)
agl29 added a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit 6cc167a)
(cherry picked from commit cca6b8e)
Change-Id: I8d6dcce200f0f8b217da7e682f691ba66aa918da
(cherry picked from commit 04a6290)
agl29 pushed a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit 3a067c4)
(cherry picked from commit 045903b)
Change-Id: I49de9d2e91c83fd0a138d544062469a687d1546b
(cherry picked from commit 36a356c)
agl29 added a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit 05e4855)
(cherry picked from commit ac4d32d)
Change-Id: I284ae517df9d217bb2c200ea1dfaa78a86e77d0d
(cherry picked from commit 8386b8f)
agl29 added a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit de3a3e6)
(cherry picked from commit ce14518)
Change-Id: I7d3353bf1648afc403f8e2ed39cd450077422617
(cherry picked from commit 0029f3d)
agl29 added a commit that referenced this pull request Jul 24, 2023
(cherry picked from commit 957fe50)
(cherry picked from commit 71a90da)
Change-Id: Ibce61134a648b6b1eb5c484fa7aaf1b117b28b0b
(cherry picked from commit df1cf50)
agl29 pushed a commit that referenced this pull request Jul 24, 2023
- Add ofs as a separate fs in proxyfs
- Add ozone to user and group permissions
- Update APIs with ofs
- Default users to ofs root directory

(cherry picked from commit f050809)
(cherry picked from commit 2e78a51)
Change-Id: I1f1e7d03f9bb603927f3198d4b981ce062cae1f1
(cherry picked from commit 6034816)
agl29 pushed a commit that referenced this pull request Jul 24, 2023
…3189)

(cherry picked from commit 08d1474)
(cherry picked from commit ea09281)
Change-Id: I562f40a16948dd9b2fa997c30ee3aaed0133c8eb
(cherry picked from commit fd42b1c)
agl29 pushed a commit that referenced this pull request Jul 24, 2023
- Check for fs_defaultFS null scenarios and raise error.
- Use urlparse for better code readability.
- Improve comments.

(cherry picked from commit 731cc5c)
(cherry picked from commit e11b8b0)
Change-Id: If0058097856d33937b74f4741dfa08654cfc02fa
(cherry picked from commit 2c5a148)
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit 6b03c71)
(cherry picked from commit b5c2255)
Change-Id: I24b7be3aefba808abe949dea9e486f05dbb0727d
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit 6cc167a)
(cherry picked from commit cca6b8e)
Change-Id: I8d6dcce200f0f8b217da7e682f691ba66aa918da
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit 3a067c4)
(cherry picked from commit 045903b)
Change-Id: I49de9d2e91c83fd0a138d544062469a687d1546b
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit 05e4855)
(cherry picked from commit ac4d32d)
Change-Id: I284ae517df9d217bb2c200ea1dfaa78a86e77d0d
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit de3a3e6)
(cherry picked from commit ce14518)
Change-Id: I7d3353bf1648afc403f8e2ed39cd450077422617
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
(cherry picked from commit 957fe50)
(cherry picked from commit 71a90da)
Change-Id: Ibce61134a648b6b1eb5c484fa7aaf1b117b28b0b
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
- Add ofs as a separate fs in proxyfs
- Add ozone to user and group permissions
- Update APIs with ofs
- Default users to ofs root directory

(cherry picked from commit f050809)
(cherry picked from commit 2e78a51)
Change-Id: I1f1e7d03f9bb603927f3198d4b981ce062cae1f1
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
…3189)

(cherry picked from commit 08d1474)
(cherry picked from commit ea09281)
Change-Id: I562f40a16948dd9b2fa997c30ee3aaed0133c8eb
athithyaaselvam pushed a commit that referenced this pull request Mar 14, 2024
- Check for fs_defaultFS null scenarios and raise error.
- Use urlparse for better code readability.
- Improve comments.

(cherry picked from commit 731cc5c)
(cherry picked from commit e11b8b0)
Change-Id: If0058097856d33937b74f4741dfa08654cfc02fa
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.

None yet

6 participants