cassback 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/lib/backuptool.rb +8 -1
- data/lib/cassback/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e7a97a9c8109931fcc60bc344d4bbd21e77b52d
|
4
|
+
data.tar.gz: ae8b20c65edb06200c39cff9d6807c30bce641b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|
data/lib/cassback/version.rb
CHANGED
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.
|
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-
|
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.
|
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:
|