-
Notifications
You must be signed in to change notification settings - Fork 383
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
(Draft) Gvfs-fuse implementation and code structure layout #5738
Changes from all commits
30581af
18cd375
b7cbeab
fe4ad01
2ae9427
c9459aa
ae1e591
9d584d7
b13c594
5156f9d
36282f2
cd11e47
4f6e980
5eba1f0
bf2b1d2
a5bb26d
7d08dae
a2b7ad4
8f76564
a9db9a6
3b2fb12
9abd45d
0631316
a48ba1a
bebcd73
f6b0ceb
b0734f1
7640a8f
8ac961b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Build gvfs-fuse and testing | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: [ "main", "branch-*" ] | ||
pull_request: | ||
branches: [ "main", "branch-*" ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
source_changes: | ||
- .github/** | ||
- api/** | ||
- bin/** | ||
- catalogs/** | ||
- clients/filesystem-fuse/** | ||
- common/** | ||
- conf/** | ||
- core/** | ||
- dev/** | ||
- gradle/** | ||
- meta/** | ||
- scripts/** | ||
- server/** | ||
- server-common/** | ||
- build.gradle.kts | ||
- gradle.properties | ||
- gradlew | ||
- setting.gradle.kts | ||
outputs: | ||
source_changes: ${{ steps.filter.outputs.source_changes }} | ||
|
||
# Build for AMD64 architecture | ||
Gvfs-Build: | ||
needs: changes | ||
if: needs.changes.outputs.source_changes == 'true' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
architecture: [linux/amd64] | ||
java-version: [ 17 ] | ||
env: | ||
PLATFORM: ${{ matrix.architecture }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Check required command | ||
run: | | ||
dev/ci/check_commands.sh | ||
|
||
- name: Build and test Gravitino | ||
run: | | ||
./gradlew :clients:filesystem-fuse:build -PenableFuse=true | ||
|
||
- name: Package Gravitino | ||
run: | | ||
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} -PenableFuse=true | ||
|
||
- name: Free up disk space | ||
run: | | ||
dev/ci/util_free_space.sh | ||
|
||
- name: Upload tests reports | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ (failure() && steps.integrationTest.outcome == 'failure') || contains(github.event.pull_request.labels.*.name, 'upload log') }} | ||
with: | ||
name: trino-connector-integrate-test-reports-${{ matrix.java-version }} | ||
path: | | ||
clients/filesystem-fuse/build/test/log/*.log | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,3 @@ | |
# under the License. | ||
|
||
[build] | ||
target-dir = "build" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,25 @@ repository = "https://github.com/apache/gravitino" | |
name = "gvfs-fuse" | ||
path = "src/main.rs" | ||
|
||
[lib] | ||
name="gvfs_fuse" | ||
|
||
[dependencies] | ||
dashmap = "5.5.3" | ||
bytes = "1.6.0" | ||
futures-util = "0.3.30" | ||
fuse3 = { version = "0.8.1", "features" = ["tokio-runtime", "unprivileged"] } | ||
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. do you plan to use 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. Yes, the thread mode of 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. does 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.
I'm not sure which one would be better to use right now. What do you think? 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. My concern about 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. Do you think we should use fuser? |
||
libc = "0.2.164" | ||
log = "0.4.22" | ||
opendal = { version = "0.46.0", features = ["services-s3"] } | ||
tokio = { version = "1.38.0", features = ["full"] } | ||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } | ||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } | ||
regex = "1.11.1" | ||
async-trait = "0.1" | ||
reqwest = { version = "0.12.9", features = ["json"] } | ||
serde = { version = "1.0.215", features = ["derive"] } | ||
urlencoding = "2.1.3" | ||
toml = "0.5" | ||
|
||
[dev-dependencies] | ||
mockito = "0.31" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
.EXPORT_ALL_VARIABLES: | ||
|
||
.PHONY: build | ||
build: | ||
cargo build --all-features --workspace | ||
|
||
fmt: | ||
cargo fmt --all | ||
|
||
cargo-sort: install-cargo-sort | ||
cargo sort -w | ||
|
||
fix-toml: install-taplo-cli | ||
taplo fmt | ||
|
||
check-fmt: | ||
cargo fmt --all -- --check | ||
|
||
check-clippy: | ||
#cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
cargo clippy --all-targets --all-features --workspace -- | ||
|
||
install-cargo-sort: | ||
cargo install [email protected] | ||
|
||
check-cargo-sort: install-cargo-sort | ||
cargo sort -c | ||
|
||
install-cargo-machete: | ||
cargo install cargo-machete | ||
|
||
cargo-machete: install-cargo-machete | ||
cargo machete | ||
|
||
install-taplo-cli: | ||
cargo install [email protected] | ||
|
||
check-toml: install-taplo-cli | ||
taplo check | ||
|
||
check: check-fmt check-clippy check-cargo-sort check-toml cargo-machete | ||
|
||
doc-test: | ||
cargo test --no-fail-fast --doc --all-features --workspace | ||
|
||
unit-test: doc-test | ||
cargo test --no-fail-fast --lib --all-features --workspace | ||
|
||
test: doc-test | ||
cargo test --no-fail-fast --all-targets --all-features --workspace | ||
|
||
clean: | ||
cargo clean |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# fuse settings | ||
[fuse] | ||
mount_to = "gvfs" | ||
mount_from = "gvfs://fileset/schema/catalog1/schema1/fileset1" | ||
default_mask = 755 | ||
|
||
[fuse.properties] | ||
key1 = "value1" | ||
key2 = "value2" | ||
|
||
# filesystem settings | ||
[filesystem] | ||
block_size = 8192 | ||
|
||
# Gravitino settings | ||
[gravitino] | ||
gravitino_url = "http://example.com:9000" | ||
metalake = "test" | ||
|
||
# extent settings | ||
[extent_config] | ||
access_key = "mybucket" | ||
secret_key = "jdfw" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
[toolchain] | ||
channel = "1.82.0" | ||
components = ["rustfmt", "clippy", "rust-src"] | ||
profile = "default" |
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
compileDistribution
afterBuild and test Gravitino
?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.
compileDistribution
is use to running the integration test, build and test only run utsThere 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.
do you mean you mix fuseIT in compileDistribution?
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, fuseITs depend on the package of compileDistribution
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.
what's the function of
-PenableFuse=true
hereThere 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.
plz remove this and the below steps since it's unnecessary now