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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5922de1fa29428f24e257451d544e2e04e660d96
4
- data.tar.gz: e40787d17308c083cf302b38c0153f169025aaff
3
+ metadata.gz: 7fa39153c730020f553a6bdf06be353a98e0e45d
4
+ data.tar.gz: 1d9a73cd84ca4b55a24499c19790d93a014c62d7
5
5
  SHA512:
6
- metadata.gz: bbd25e253aa0ef1c31b12cc83199e4b3d45d60fa7debd68b91477221e58c8b30419250ebf28c4c52ec35207a554e05bbe53a305e7da1ee33d5194d83e1419c19
7
- data.tar.gz: b76a37273cdae0d46a3c1d2f604fb9016513b0a01e28384702e9ad2d25497e8c88df27e41ab2c4f2aa0105288f91c9617b6eaa125d401c8cc50db3091da6eebc
6
+ metadata.gz: 05d9212556c3f3691be79bd600048c282fbb16a502a51d4ac7c92f9f4ee5af30b16181b3f984b944d8771327f2f55f48a5e8c2b0ae52c497cfeff9c9dd7651aa
7
+ data.tar.gz: 54e1356301fe0905b61109f2a901a8f41c2b21c3c36dba556b78efa1ada741e3a14e5d0b1a037eb012d95c667fb553d983b75e1a3fac7eef1e1cb518e4992e90
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+
data/Gemfile CHANGED
@@ -1,9 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
  ruby '2.2.2'
3
- gem 'webhdfs'
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
@@ -6,3 +6,5 @@ Rake::TestTask.new do |t|
6
6
  t.test_files = FileList['test/test*.rb']
7
7
  t.verbose = true
8
8
  end
9
+
10
+ task :default => :test
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
- file = metadata_dir() + flag.file
226
- @logger.info("Deleting #{file}")
227
- @hadoop.delete(file)
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
 
@@ -1,3 +1,3 @@
1
1
  module Cassback
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
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.5
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-01-23 00:00:00.000000000 Z
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.5.2
172
+ rubygems_version: 2.6.8
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Cassandra backup to HDFS.