Permalink
Browse files

Updated HDFS filesystem to allow usage of s3n as store

  • Loading branch information...
1 parent e506ca9 commit 4abc1c5c174528b0450e59836625884c285fa11a @temujin9 temujin9 committed Oct 6, 2011
Showing with 6 additions and 4 deletions.
  1. +1 −1 VERSION
  2. +4 −2 lib/swineherd/filesystem/hadoopfilesystem.rb
  3. +1 −1 swineherd.gemspec
View
2 VERSION
@@ -1 +1 @@
-0.0.5
+0.0.6
View
6 lib/swineherd/filesystem/hadoopfilesystem.rb
@@ -14,10 +14,12 @@ class HadoopFileSystem
#
# Initialize a new hadoop file system, needs path to hadoop configuration
#
- def initialize *args
+ def initialize params={}, *args
check_and_set_environment
@conf = Java::org.apache.hadoop.conf.Configuration.new
- @hdfs = Java::org.apache.hadoop.fs.FileSystem.get(@conf)
+ uri = Java::java.net.URI.new params[:filesystem] if params[:filesystem]
+ fs_params = uri ? [ uri, @conf ] : [ @conf ]
+ @hdfs = Java::org.apache.hadoop.fs.FileSystem.get *fs_params
end
#
View
2 swineherd.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{swineherd}
- s.version = "0.0.5"
+ s.version = "0.0.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jacob Perkins","Infochimps"]

0 comments on commit 4abc1c5

Please sign in to comment.