jnturton opened a new pull request, #2713: URL: https://github.com/apache/drill/pull/2713
# [DRILL-8359](https://issues.apache.org/jira/browse/DRILL-8359): Add mount and unmount command support to the filesystem plugin ## Description Optional mount and unmount commands are added toi the filesystem plugin with the goal of enabling the dynamic definition of filesystem mounts in the storage configuration. It is mainly anticpiated that network and cloud filesystems that have FUSE drivers (sshfs, davfs, rclone, ...) will be used in this way but local device mounts and image/loop device mounts (ISO, IMG, squashfs, etc.) might also be of interest. Filesystems that can be mounted in this way become queryable by Drill without burden of dedicated storage plugin development. The provided commands are executed in their own processes by the host OS and run under the OS user that is running the Drill JVM. The mount command will be executed when an enabled plugin is initialised (something that is done lazily) and when it transitions from disabled to enabled. The provided unmount command will be executed whenever a plugin transitions from enabled to disabled and when the Drillbit shuts down while the plugin is enabled. Example using udisks on Linux to mount and unmount an image of an ext4 filesystem. ``` { "type" : "file", "connection" : "file:///", "mountCommand" : [ "sh", "-c", "udisksctl loop-setup -f /tmp/test.img && udisksctl mount -b /dev/loop0" ], "unmountCommand" : [ "sh", "-c", "udisksctl unmount -b /dev/loop0 && udisksctl loop-delete -b /dev/loop0" ], "workspaces" : { ... ``` ## Documentation New sections to be added to the filesystem doc page. ## Testing New unit test TestMountCommand. Manual test of mount commands through different sequences of startup, enable, disable, shutdown. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org