Sha256: f5aa2d9a1b6894cdb465c97e335b22db00eec9938273b99efb48e57113a809e6
Contents?: true
Size: 854 Bytes
Versions: 3
Compression:
Stored size: 854 Bytes
Contents
require "lock_jar" LockJar.load module Viking java_import java.net.URI java_import org.apache.hadoop.fs.FileSystem java_import org.apache.hadoop.hdfs.DistributedFileSystem java_import org.apache.hadoop.conf.Configuration java_import org.apache.hadoop.fs.Path java_import org.apache.hadoop.fs.permission.FsPermission DEFAULT_BUFFER_SIZE = 4096 def self.configure(config) path = URI.new("hdfs://#{config[:host]}:#{config[:port]}") @buffer_size = config[:buffer_size] @client = DistributedFileSystem.new @client.initialize__method(path, Configuration.new) end def self.client @client ||= FileSystem.get_local(Configuration.new) end def self.buffer_size @buffer_size || DEFAULT_BUFFER_SIZE end end require "viking/version" require 'viking/file' require 'viking/dir' require 'viking/fileutilz'
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hdfs-viking-0.0.8 | lib/viking.rb |
hdfs-viking-0.0.7 | lib/viking.rb |
hdfs-viking-0.0.6 | lib/viking.rb |