cassback 0.2.0 → 0.2.1

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: 1a6ce6acc98e349c759f957363b2bed9cea67ae2
4
- data.tar.gz: b16d33f5a9e95a4acd4ff6a8f1f5aa793ddddb7b
3
+ metadata.gz: 324350ff89679af143df4008c19b90bb8b516c2f
4
+ data.tar.gz: 32d6a3027a2fbcac9aa88780b1502717d8810832
5
5
  SHA512:
6
- metadata.gz: 3db4b5bd00d07bd2b02497bb0ff9f619b38fada9f3cb4003393d9089ca2d46bbd39e768c09fe7523b5ebe4c066a90eaa16f7a65ad0abbe383577a28788ea931c
7
- data.tar.gz: 17b2f85b8042c62203081ff31d9ff7b7c77fdc00fa4ca2f1e493f94bd3bc5aa4f44337669d7e7e574338cb5d7fd09f7b44a83bcede11756551322cf851c04e9e
6
+ metadata.gz: a6592775259fb208a9cf4d6612c101ae50b5b4f04bb7d57cfb2ff840319420baa519d3a7b5b04d9113eba22756f517ad1d68a4e93256e51e2cebf56c8c343a59
7
+ data.tar.gz: 0e15ddef44009b314b2861c33bdedefc01c944067c106297eb805dfae37b0468ccfd0ae793fe6af267334a7b9255753741347fb78722784598f8879ef69d2213
data/bin/cassback CHANGED
@@ -19,9 +19,10 @@ end
19
19
  # Create a Ruby logger that logs both to syslog and console.
20
20
  logger = Syslog::Logger.new 'cassback'
21
21
  logger.formatter = proc do |severity, datetime, progname, msg|
22
- print "[#{datetime}] #{severity} #{progname} : #{msg}\n"
23
- "#{msg}"
22
+ print "[#{datetime}] #{severity} #{progname} : #{msg}\n"
23
+ msg.to_s
24
24
  end
25
+ logger.level = 2
25
26
 
26
27
  begin
27
28
  app_version = Gem.loaded_specs['cassback'].version
@@ -49,8 +50,8 @@ command_line_config = {
49
50
  options = {
50
51
  'guardfile' => '/tmp/cassback.guardfile',
51
52
  'cassandra' => {
52
- 'config' => '/etc/cassandra/conf/cassandra.yaml',
53
- 'disk_threshold' => 75
53
+ 'config' => '/etc/cassandra/conf/cassandra.yaml',
54
+ 'disk_threshold' => 75,
54
55
  },
55
56
  'hadoop' => {
56
57
  'hostname' => 'localhost',
@@ -58,7 +59,7 @@ options = {
58
59
  'directory' => 'cassandra',
59
60
  'retryTimes' => 5,
60
61
  'retryInterval' => 1,
61
- 'readTimeout' => 300
62
+ 'readTimeout' => 300,
62
63
  },
63
64
  'restore' => {
64
65
  'destination' => 'cassandra',
@@ -134,6 +135,12 @@ parser = OptionParser.new do |opts|
134
135
  command_line_config['cassandra']['config'] = v
135
136
  end
136
137
 
138
+ opts.separator ''
139
+ opts.separator 'Debug:'
140
+ opts.on('-v', '--verbose', 'Verbose log mode') do
141
+ logger.level = 0
142
+ end
143
+
137
144
  opts.separator ''
138
145
  opts.separator 'Help:'
139
146
  opts.on('-h', '--help', 'Displays Help') do
@@ -1,3 +1,3 @@
1
1
  module Cassback
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
@@ -22,8 +22,8 @@ class TestSimpleNumber < Test::Unit::TestCase
22
22
 
23
23
  # metadata file contains the sstables.
24
24
  metadata_content = File.open(remote_files[0], 'r').read
25
- assert(metadata_content.include? 'SSTable-1-Data.db')
26
- assert(metadata_content.include? 'SSTable-2-Data.db')
25
+ assert(metadata_content.include?('SSTable-1-Data.db'))
26
+ assert(metadata_content.include?('SSTable-2-Data.db'))
27
27
 
28
28
  # cleanup
29
29
  hadoop.delete('test/hadoop')
@@ -50,14 +50,14 @@ class TestSimpleNumber < Test::Unit::TestCase
50
50
 
51
51
  # metadata on first backup file contains the sstables.
52
52
  metadata_content = File.open(remote_files[0], 'r').read
53
- assert(metadata_content.include? 'SSTable-1-Data.db')
54
- assert(metadata_content.include? 'SSTable-2-Data.db')
53
+ assert(metadata_content.include?('SSTable-1-Data.db'))
54
+ assert(metadata_content.include?('SSTable-2-Data.db'))
55
55
 
56
56
  # metadata on second backup file contains the sstables.
57
57
  metadata_content = File.open(remote_files[1], 'r').read
58
- assert(metadata_content.include? 'SSTable-2-Data.db')
59
- assert(metadata_content.include? 'SSTable-3-Data.db')
60
- assert(metadata_content.include? 'SSTable-4-Data.db')
58
+ assert(metadata_content.include?('SSTable-2-Data.db'))
59
+ assert(metadata_content.include?('SSTable-3-Data.db'))
60
+ assert(metadata_content.include?('SSTable-4-Data.db'))
61
61
 
62
62
  # cleanup
63
63
  hadoop.delete('test/hadoop')
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.0
4
+ version: 0.2.1
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-05-19 00:00:00.000000000 Z
12
+ date: 2016-07-07 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.3
171
+ rubygems_version: 2.6.4
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Cassandra backup to HDFS.