cassback 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/Gemfile +8 -4
- data/README.md +2 -0
- data/Rakefile.rb +2 -0
- data/lib/backuptool.rb +8 -4
- data/lib/cassback/version.rb +1 -1
- data/test/hadoop_stub.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fa39153c730020f553a6bdf06be353a98e0e45d
|
4
|
+
data.tar.gz: 1d9a73cd84ca4b55a24499c19790d93a014c62d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05d9212556c3f3691be79bd600048c282fbb16a502a51d4ac7c92f9f4ee5af30b16181b3f984b944d8771327f2f55f48a5e8c2b0ae52c497cfeff9c9dd7651aa
|
7
|
+
data.tar.gz: 54e1356301fe0905b61109f2a901a8f41c2b21c3c36dba556b78efa1ada741e3a14e5d0b1a037eb012d95c667fb553d983b75e1a3fac7eef1e1cb518e4992e90
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
ruby '2.2.2'
|
3
|
-
|
4
|
-
gem 'gssapi'
|
5
|
-
gem 'rubocop'
|
6
|
-
gem 'table_print'
|
3
|
+
|
7
4
|
gem 'filesize'
|
5
|
+
gem 'gssapi'
|
6
|
+
gem 'rainbow', '>= 2.1.0', '< 2.2.0'
|
7
|
+
gem 'rake'
|
8
8
|
gem 'rspec_junit_formatter'
|
9
|
+
gem 'rubocop'
|
9
10
|
gem 'rubocop-junit-formatter'
|
11
|
+
gem 'table_print'
|
12
|
+
gem 'test-unit'
|
13
|
+
gem 'webhdfs'
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Cassback
|
2
2
|
|
3
|
+
<img src="https://travis-ci.org/criteo/cassback.svg?branch=master"/>
|
4
|
+
|
3
5
|
Welcome to your Cassback!
|
4
6
|
This is a project that aims backup Cassandra SSTables and load them into HDFS for further usage.
|
5
7
|
It intended to be used as a command line tool - for now it can be triggered only by commands.
|
data/Rakefile.rb
CHANGED
data/lib/backuptool.rb
CHANGED
@@ -23,7 +23,7 @@ class BackupTool
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def metadata_dir_for_backup(node, date)
|
26
|
-
return metadata_dir() + node + '/cass_snap_' + date
|
26
|
+
return metadata_dir() + node + '/cass_snap_' + date
|
27
27
|
end
|
28
28
|
|
29
29
|
def metadata_dir_for_node(node)
|
@@ -222,9 +222,13 @@ class BackupTool
|
|
222
222
|
@logger.info("A total of #{backup_flags_to_be_delete.size} backup flags will be deleted.")
|
223
223
|
|
224
224
|
backup_flags_to_be_delete.each do |flag|
|
225
|
-
|
226
|
-
|
227
|
-
|
225
|
+
begin
|
226
|
+
file = metadata_dir() + flag.file
|
227
|
+
@logger.info("Deleting #{file}")
|
228
|
+
@hadoop.delete(file)
|
229
|
+
rescue Exception => e
|
230
|
+
@logger.warn("Cannot delete #{file} reason: #{e.message}")
|
231
|
+
end
|
228
232
|
end
|
229
233
|
end
|
230
234
|
|
data/lib/cassback/version.rb
CHANGED
data/test/hadoop_stub.rb
CHANGED
@@ -27,12 +27,13 @@ class HadoopStub
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def mkdir(path, _options = {})
|
30
|
+
FileUtils.mkdir_p path
|
30
31
|
return true
|
31
32
|
end
|
32
33
|
|
33
34
|
def list_files(path, _options = {})
|
34
35
|
files_and_folders = Dir.glob("#{path}/**/*")
|
35
|
-
files_and_folders.select { |file| File.file?(file) }
|
36
|
+
files_and_folders.select { |file| File.file?(file) }.sort
|
36
37
|
end
|
37
38
|
|
38
39
|
def create(path, body, _options = {})
|
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.6
|
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: 2017-
|
12
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -131,6 +131,7 @@ extra_rdoc_files: []
|
|
131
131
|
files:
|
132
132
|
- ".gitignore"
|
133
133
|
- ".rubocop.yml"
|
134
|
+
- ".travis.yml"
|
134
135
|
- Gemfile
|
135
136
|
- LICENSE
|
136
137
|
- README.md
|
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
171
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.6.8
|
172
173
|
signing_key:
|
173
174
|
specification_version: 4
|
174
175
|
summary: Cassandra backup to HDFS.
|