mirror of
https://github.com/gromgit/homebrew-fuse.git
synced 2025-12-06 16:15:54 +00:00
alluxio 2.5.0-2
This commit is contained in:
parent
3ce72b6437
commit
2a4b288086
1 changed files with 61 additions and 0 deletions
61
Formula/alluxio.rb
Normal file
61
Formula/alluxio.rb
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
require_relative "../require/macfuse"
|
||||||
|
|
||||||
|
class Alluxio < Formula
|
||||||
|
desc "Open Source Memory Speed Virtual Distributed Storage"
|
||||||
|
homepage "https://www.alluxio.io/"
|
||||||
|
url "https://downloads.alluxio.io/downloads/files/2.5.0-2/alluxio-2.5.0-2-bin.tar.gz"
|
||||||
|
sha256 "3921176e5206ad278d9154b20cb304ed85ffa70cb14a53c4f9f71f1eedbf3871"
|
||||||
|
license "Apache-2.0"
|
||||||
|
|
||||||
|
livecheck do
|
||||||
|
url "https://downloads.alluxio.io/downloads/files/"
|
||||||
|
regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i)
|
||||||
|
end
|
||||||
|
|
||||||
|
bottle :unneeded
|
||||||
|
|
||||||
|
# Alluxio requires Java 8 or Java 11
|
||||||
|
depends_on "openjdk@11"
|
||||||
|
depends_on MacfuseRequirement
|
||||||
|
depends_on :macos
|
||||||
|
|
||||||
|
def default_alluxio_conf
|
||||||
|
<<~EOS
|
||||||
|
alluxio.master.hostname=localhost
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
|
||||||
|
def install
|
||||||
|
libexec.install Dir["*"]
|
||||||
|
bin.install Dir["#{libexec}/bin/*"]
|
||||||
|
bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env("11")
|
||||||
|
chmod "+x", Dir["#{libexec}/bin/*"]
|
||||||
|
|
||||||
|
rm_rf Dir["#{etc}/alluxio/*"]
|
||||||
|
|
||||||
|
(etc/"alluxio").install libexec/"conf/alluxio-env.sh.template" => "alluxio-env.sh"
|
||||||
|
ln_sf "#{etc}/alluxio/alluxio-env.sh", "#{libexec}/conf/alluxio-env.sh"
|
||||||
|
|
||||||
|
defaults = etc/"alluxio/alluxio-site.properties"
|
||||||
|
defaults.write(default_alluxio_conf) unless defaults.exist?
|
||||||
|
ln_sf "#{etc}/alluxio/alluxio-site.properties", "#{libexec}/conf/alluxio-site.properties"
|
||||||
|
end
|
||||||
|
|
||||||
|
def caveats
|
||||||
|
<<~EOS
|
||||||
|
To configure alluxio, edit
|
||||||
|
#{etc}/alluxio/alluxio-env.sh
|
||||||
|
#{etc}/alluxio/alluxio-site.properties
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
output = shell_output("#{bin}/alluxio validateConf")
|
||||||
|
assert_match "ValidateConf - Validating configuration.", output
|
||||||
|
|
||||||
|
output = shell_output("#{bin}/alluxio clearCache 2>&1", 1)
|
||||||
|
assert_match "drop_caches: No such file or directory", output
|
||||||
|
|
||||||
|
assert_match version.to_s, shell_output("#{bin}/alluxio version")
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue