cassback 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ea67ebf7ce61ab5f9fe0606ab9cf15031029ca8
4
- data.tar.gz: 38ad08644367525cd7e399ca5f4199fcce777aca
3
+ metadata.gz: 1b107b26f3da7063045152d59e04f0e4b393eacd
4
+ data.tar.gz: f234d6292937383a03d69bf32b70c20997d8e693
5
5
  SHA512:
6
- metadata.gz: 6e1f3ff9809b7d038dd9357b1be6d4b832e3aefa877798573bb154b2d4191ae6f048d569f7972d720b422567230239fcb5c79ad48fdf563d256f81170def9a93
7
- data.tar.gz: d97a160971c5467cc531f510eb7777a16e25bd34f6d00599d383138555c61cd96d50b9194f9b219600eeeba8ce5b037088c7ecebca1882aa2d039a30445b6a5d
6
+ metadata.gz: cce6bf488cd7e741525f59cce0347e107a972365312d12f0772f6aebd75cfbc2fdaf20d95f3fddb39405877054bb11da488be1080877adb5ebe6fd40a67beecc
7
+ data.tar.gz: aff6febf30585a2fb0e3fccb9d368dd558df4970989f1673ef5fe3f26c1fceed77d282a4e81b3a3540c500884b645295388c74cf86ac5d77e39f757d6d3f2dcf
data/README.md CHANGED
@@ -78,6 +78,9 @@ can retry the file download/upload of data. This is configurable via the followi
78
78
  If you want to check more about Hadoop's checksum algorithm that ensures data integrity you can check the
79
79
  following link : https://www.safaribooksonline.com/library/view/hadoop-the-definitive/9781449328917/ch04.html
80
80
 
81
+ Also there is the **hadoop.readTimeout** property which has been set by default to 300s, but it can be configured to
82
+ another value if necessary (if HDFS cluster is responding too slow sometimes).
83
+
81
84
  ## Cleanup policy
82
85
 
83
86
  Usually backups of databases take a lot of space. Even if we have optimized the code so the backups are done incrementally
@@ -57,6 +57,7 @@ options = {
57
57
  'directory' => 'cassandra',
58
58
  'retryTimes' => 5,
59
59
  'retryInterval' => 1,
60
+ 'readTimeout' => 300
60
61
  },
61
62
  'restore' => {
62
63
  'destination' => 'cassandra',
@@ -162,7 +163,7 @@ begin
162
163
  # Create the Hadoop object
163
164
  hadoop = Hadoop.new(host: options['hadoop']['hostname'], port: options['hadoop']['port'],
164
165
  base_dir: options['hadoop']['directory'], retry_times: options['hadoop']['retryTimes'],
165
- retry_interval: options['hadoop']['retryInterval'])
166
+ retry_interval: options['hadoop']['retryInterval'], read_timeout: options['hadoop']['readTimeout'])
166
167
 
167
168
  #  Create the Cassandra object
168
169
  cassandra = Cassandra.new(options['cassandra']['config'], logger)
@@ -1,3 +1,4 @@
1
+ #Configuration file that can be used as an example.
1
2
  cassandra:
2
3
  # config: "/etc/cassandra/conf/cassandra.yaml"
3
4
  config: "/Users/b.niculescu/Tools/apache-cassandra-2.0.16/conf/cassandra.yaml"
@@ -10,6 +11,7 @@ hadoop:
10
11
  directory: "/tmp/b.niculescu/cassandra"
11
12
  retryTimes : 3
12
13
  retryInterval : 1
14
+ readTimeout: 300
13
15
 
14
16
  restore:
15
17
  destination: "cassback_restore"
@@ -1,9 +1,3 @@
1
1
  module Cassback
2
- # This represents the version that been currently deployed to rubygems.org
3
- # For deploying a new version do the following :
4
- # 1) Increment the version here
5
- # 2) Build the gem using command : gem build cassback.gemspec
6
- # 3) Push the gem using command : gem push cassback-<version>.gem
7
- # 4) Commit the version change into source control system.
8
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
9
3
  end
@@ -6,13 +6,13 @@ WebHDFS::ClientV1::REDIRECTED_OPERATIONS.delete('OPEN')
6
6
  class Hadoop < WebHDFS::Client
7
7
  attr_reader :base_dir
8
8
 
9
- def initialize(host: 'localhost', port: 14_000, base_dir: '/', retry_times: 5, retry_interval: 1)
9
+ def initialize(host: 'localhost', port: 14_000, base_dir: '/', retry_times: 5, retry_interval: 1, read_timeout: 300)
10
10
  super(host = host, port = port)
11
11
  @kerberos = true
12
12
  @base_dir = base_dir
13
13
  @retry_known_errors = true
14
14
  @retry_times = retry_times
15
15
  @retry_interval = retry_interval
16
- @read_timeout = 300
16
+ @read_timeout = read_timeout
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Van Hollebeke