Permalink
Browse files

Add a formula for Apache Flume NG ("next gen").

New formula is modeled on the existing Flume formula.  Flume NG is not an iterative revision of Flume; it is in some ways a major departure from Flume pre-NG - this formula should not replace the existing Flume formula by any means.
  • Loading branch information...
1 parent a85b390 commit 0f37df35b667fd5b83dd3139da52ba829d9f7234 @mattbornski committed Oct 24, 2012
Showing with 37 additions and 0 deletions.
  1. +37 −0 Library/Formula/flume-ng.rb
@@ -0,0 +1,37 @@
+require 'formula'
+
+class FlumeNg < Formula
+ homepage 'https://github.com/apache/flume'
+ url 'http://archive.cloudera.com/cdh4/cdh/4/flume-ng-1.2.0-cdh4.1.0.tar.gz'
+ sha1 '2217316f274ff615e9e7dc50f411d95edda60cc3'
+ version "1.2.0-cdh4.1.0"
+
+ def flume_ng_script
+ <<-EOS.undent
+ #!/bin/bash
+ export FLUME_CONF_DIR=${FLUME_CONF_DIR-#{libexec}/conf}
+ exec #{libexec}/bin/flume-ng "$@"
+ EOS
+ end
+
+ def caveats
+ <<-EOS.undent
+ See https://cwiki.apache.org/FLUME/getting-started.html for example configurations.
+ Your flume config dir is #{libexec}/conf/
+
+ If you intend to sink data to S3, you will need to download a missing JAR:
+ wget -O #{libexec}/lib/jets3t-0.7.1.jar http://repo1.maven.org/maven2/net/java/dev/jets3t/jets3t/0.7.1/jets3t-0.7.1.jar
+ EOS
+ end
+
+ def install
+ system "mvn", "compile"
+ libexec.install %w[bin conf lib]
+ bin.mkpath
+ (bin + "flume-ng").write flume_ng_script()
+ end
+
+ def test
+ system "flume-ng"
+ end
+end

0 comments on commit 0f37df3

Please sign in to comment.