cassback 0.2.1 → 0.2.2

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: 324350ff89679af143df4008c19b90bb8b516c2f
4
- data.tar.gz: 32d6a3027a2fbcac9aa88780b1502717d8810832
3
+ metadata.gz: 4e7a97a9c8109931fcc60bc344d4bbd21e77b52d
4
+ data.tar.gz: ae8b20c65edb06200c39cff9d6807c30bce641b9
5
5
  SHA512:
6
- metadata.gz: a6592775259fb208a9cf4d6612c101ae50b5b4f04bb7d57cfb2ff840319420baa519d3a7b5b04d9113eba22756f517ad1d68a4e93256e51e2cebf56c8c343a59
7
- data.tar.gz: 0e15ddef44009b314b2861c33bdedefc01c944067c106297eb805dfae37b0468ccfd0ae793fe6af267334a7b9255753741347fb78722784598f8879ef69d2213
6
+ metadata.gz: c1f13b8a68a8f8c1ab87f6128824acf796c41ae2ed3c1adc6844c264cd5a3a7c74bfd9aad7f301e529dd080b6328dc09f642c18db57df15ad5c22f51d7f440a8
7
+ data.tar.gz: 3e125579865dd92ee08f1bff96aaf8991ccc3066e51d5ca3ffc121531af1b0f2b90c9b3bfa812d303fcef1e77154e7e8922debc4b08d984185996ef206f1f511
data/README.md CHANGED
@@ -127,6 +127,17 @@ Unit tests can be executed locally by running the following command :
127
127
 
128
128
  rake test
129
129
 
130
+ ## Guard file
131
+
132
+ Sometimes you maybe want to prevent backups running on a specific node during maintenance operations. This is possible by
133
+ creating a guard file.
134
+
135
+ touch /tmp/cassback.guardfile
136
+
137
+ While this file will exist, no operation will be possible
138
+
139
+ Note that you can change the file location in configuration file
140
+
130
141
  ## Contributing
131
142
 
132
143
  Bug reports and pull requests are welcome on GitHub at : https://github.com/criteo/cassback
data/lib/backuptool.rb CHANGED
@@ -110,7 +110,14 @@ class BackupTool
110
110
  remote = @hadoop.base_dir + '/' + snapshot.cluster + '/' + snapshot.node + '/' + file
111
111
  @logger.debug("#{local} => #{remote}")
112
112
  f = File.open(local, 'r')
113
- @hadoop.create(remote, f, overwrite: true)
113
+ begin
114
+ retries = 3
115
+ @hadoop.create(remote, f, overwrite: true)
116
+ rescue
117
+ @logger.info("Hadoop write failed - retrying in 1s")
118
+ sleep 1
119
+ retry if (retries -= 1) < 0
120
+ end
114
121
  f.close
115
122
  end
116
123
 
@@ -1,3 +1,3 @@
1
1
  module Cassback
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Van Hollebeke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-07 00:00:00.000000000 Z
12
+ date: 2016-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.6.4
171
+ rubygems_version: 2.5.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Cassandra backup to HDFS.
@@ -176,4 +176,3 @@ test_files:
176
176
  - test/cassandra_stub.rb
177
177
  - test/hadoop_stub.rb
178
178
  - test/test_backuptool.rb
179
- has_rdoc: