Class: Filbunke::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/filbunke/repository.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_config) ⇒ Repository

Returns a new instance of Repository.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/filbunke/repository.rb', line 17

def initialize(repository_config)
  @name = repository_config["filbunke_server_repository"]
  @host = repository_config["filbunke_server_host"]
  @port = repository_config["filbunke_server_port"]
  @local_path = repository_config["local_path"]
  @file_umask = repository_config["file_umask"].to_i
  @directory_umask = repository_config["directory_umask"].to_i
  @user = repository_config["file_url_username"]
  @pass = repository_config["file_url_password"]
  @hadoop_binary = repository_config["hadoop_binary"]
  @run_every = repository_config.fetch("run_every", 10).to_i
  @hydra_concurrency = repository_config.fetch("hydra_concurrency", 100).to_i
  @batch_size = repository_config.fetch("batch_size", 0).to_i
end

Instance Attribute Details

#batch_sizeObject

Returns the value of attribute batch_size.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def batch_size
  @batch_size
end

#directory_umaskObject

Returns the value of attribute directory_umask.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def directory_umask
  @directory_umask
end

#file_umaskObject

Returns the value of attribute file_umask.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def file_umask
  @file_umask
end

#hadoop_binaryObject

Returns the value of attribute hadoop_binary.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def hadoop_binary
  @hadoop_binary
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def host
  @host
end

#hydra_concurrencyObject

Returns the value of attribute hydra_concurrency.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def hydra_concurrency
  @hydra_concurrency
end

#local_pathObject

Returns the value of attribute local_path.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def local_path
  @local_path
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def name
  @name
end

#passObject

Returns the value of attribute pass.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def pass
  @pass
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def port
  @port
end

#run_everyObject

Returns the value of attribute run_every.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def run_every
  @run_every
end

#userObject

Returns the value of attribute user.



4
5
6
# File 'lib/filbunke/repository.rb', line 4

def user
  @user
end