-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What changes are proposed in this pull request? Add support for libfuse3 in jnifuse module. This PR adds - Actual implementation code - A configuration key `alluxio.fuse.jnifuse.libfuse.version` to set the libfuse to use - set 3 to use 3, 2 to use 2, and other value to load 2 first, if failed load 3 - In macOS, always use 2 - Installed `libfuse3=3.2.6-r1` in the docker image. The version is the latest version in the repo of base docker image - Separate github actions to test jnifuse module using libfuse2 and libfuse3 on java 8 and 11 ### Why are the changes needed? libfuse3 provides more features than libfuse2. ### Does this PR introduce any user facing changes? Added a configuration key `alluxio.fuse.jnifuse.libfuse.version` to set the libfuse version to use. Set 3 to use 3, 2 to use 2, and other value to load 2 first, if failed load 3. In macOS, always use 2 pr-link: #15002 change-id: cid-9aaaff52dfc1052992697af2e6b4798857a598e8
- Loading branch information
Showing
27 changed files
with
704 additions
and
97 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Fuse Integration Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
name: "modules: fuse" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: ["8", "11"] | ||
version: ["2", "3"] | ||
|
||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.pull_request.title, 'DOCFIX') && | ||
!contains(github.event.pull_request.title, 'SKIPCI')" | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.11.0' | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Run tests | ||
id: test0 | ||
run: | | ||
mkdir -p ~/.m2 | ||
ALLUXIO_DOCKER_NO_TTY=true \ | ||
ALLUXIO_DOCKER_GIT_CLEAN=true \ | ||
ALLUXIO_DOCKER_MVN_RUNTOEND=true \ | ||
ALLUXIO_DOCKER_MVN_PROJECT_LIST=!webui,!shaded/client,!integration/tools/hms,!integration/yarn,!assembly/client,!assembly/server,!table/server/underdb/glue,!underfs/hdfs,!underfs/ozone,!underfs/adl,!underfs/abfs,!underfs/cosn,!underfs/wasb,!underfs/cos,!underfs/kodo,!underfs/oss,!underfs/swift \ | ||
dev/github/run_docker.sh "\"-Dtest=alluxio.client.fuse.**\"" "\"-Dalluxio.fuse.jnifuse.libfuse.version=${{ matrix.version }}\"" -pl tests | ||
timeout-minutes: 60 | ||
|
||
- name: Archive artifacts | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: artifact | ||
path: | | ||
**/target/surefire-reports/* | ||
**/target/artifacts/* | ||
**/target/logs/* | ||
retention-days: 7 |
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
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
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
45 changes: 45 additions & 0 deletions
45
integration/jnifuse/fs/src/main/java/alluxio/jnifuse/struct/Fuse2FuseFileInfo.java
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 | ||
* (the "License"). You may not use this work except in compliance with the License, which is | ||
* available at www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied, as more fully set forth in the License. | ||
* | ||
* See the NOTICE file distributed with this work for information regarding copyright ownership. | ||
*/ | ||
|
||
package alluxio.jnifuse.struct; | ||
|
||
import jnr.ffi.NativeType; | ||
import jnr.ffi.Runtime; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* Maps to struct fuse_file_info in /usr/include/fuse/fuse_common.h | ||
*/ | ||
public class Fuse2FuseFileInfo extends FuseFileInfo { | ||
|
||
// unused fields are omitted | ||
|
||
/** | ||
* Creates a FuseFileInfo class matching the struct fuse_file_info in libfuse2. | ||
* | ||
* This struct is not meant to be used directly. | ||
* You should use {@link alluxio.jnifuse.struct.FuseFileInfo#of(ByteBuffer)} | ||
* to create a FuseFileIfo that matches currently used libfuse. | ||
* | ||
* @param runtime the JNR runtime | ||
* @param buffer the ByteBuffer containing struct fuse_file_info from JNR | ||
*/ | ||
public Fuse2FuseFileInfo(Runtime runtime, ByteBuffer buffer) { | ||
super(runtime, buffer); | ||
|
||
this.flags = new Signed32(); | ||
new UnsignedLong(); // fh_old | ||
new Padding(NativeType.UCHAR, 4); // unused flags and paddings | ||
this.fh = new u_int64_t(); | ||
new u_int64_t(); // lock_owner | ||
} | ||
} |
Oops, something went wrong.