cassback 0.1.6 → 0.1.7
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 +3 -0
- data/bin/cassback +2 -1
- data/conf/local.yml +2 -0
- data/lib/cassback/version.rb +1 -7
- data/lib/hadoop.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b107b26f3da7063045152d59e04f0e4b393eacd
|
4
|
+
data.tar.gz: f234d6292937383a03d69bf32b70c20997d8e693
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce6bf488cd7e741525f59cce0347e107a972365312d12f0772f6aebd75cfbc2fdaf20d95f3fddb39405877054bb11da488be1080877adb5ebe6fd40a67beecc
|
7
|
+
data.tar.gz: aff6febf30585a2fb0e3fccb9d368dd558df4970989f1673ef5fe3f26c1fceed77d282a4e81b3a3540c500884b645295388c74cf86ac5d77e39f757d6d3f2dcf
|
data/README.md
CHANGED
@@ -78,6 +78,9 @@ can retry the file download/upload of data. This is configurable via the followi
|
|
78
78
|
If you want to check more about Hadoop's checksum algorithm that ensures data integrity you can check the
|
79
79
|
following link : https://www.safaribooksonline.com/library/view/hadoop-the-definitive/9781449328917/ch04.html
|
80
80
|
|
81
|
+
Also there is the **hadoop.readTimeout** property which has been set by default to 300s, but it can be configured to
|
82
|
+
another value if necessary (if HDFS cluster is responding too slow sometimes).
|
83
|
+
|
81
84
|
## Cleanup policy
|
82
85
|
|
83
86
|
Usually backups of databases take a lot of space. Even if we have optimized the code so the backups are done incrementally
|
data/bin/cassback
CHANGED
@@ -57,6 +57,7 @@ options = {
|
|
57
57
|
'directory' => 'cassandra',
|
58
58
|
'retryTimes' => 5,
|
59
59
|
'retryInterval' => 1,
|
60
|
+
'readTimeout' => 300
|
60
61
|
},
|
61
62
|
'restore' => {
|
62
63
|
'destination' => 'cassandra',
|
@@ -162,7 +163,7 @@ begin
|
|
162
163
|
# Create the Hadoop object
|
163
164
|
hadoop = Hadoop.new(host: options['hadoop']['hostname'], port: options['hadoop']['port'],
|
164
165
|
base_dir: options['hadoop']['directory'], retry_times: options['hadoop']['retryTimes'],
|
165
|
-
retry_interval: options['hadoop']['retryInterval'])
|
166
|
+
retry_interval: options['hadoop']['retryInterval'], read_timeout: options['hadoop']['readTimeout'])
|
166
167
|
|
167
168
|
# Create the Cassandra object
|
168
169
|
cassandra = Cassandra.new(options['cassandra']['config'], logger)
|
data/conf/local.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
#Configuration file that can be used as an example.
|
1
2
|
cassandra:
|
2
3
|
# config: "/etc/cassandra/conf/cassandra.yaml"
|
3
4
|
config: "/Users/b.niculescu/Tools/apache-cassandra-2.0.16/conf/cassandra.yaml"
|
@@ -10,6 +11,7 @@ hadoop:
|
|
10
11
|
directory: "/tmp/b.niculescu/cassandra"
|
11
12
|
retryTimes : 3
|
12
13
|
retryInterval : 1
|
14
|
+
readTimeout: 300
|
13
15
|
|
14
16
|
restore:
|
15
17
|
destination: "cassback_restore"
|
data/lib/cassback/version.rb
CHANGED
@@ -1,9 +1,3 @@
|
|
1
1
|
module Cassback
|
2
|
-
|
3
|
-
# For deploying a new version do the following :
|
4
|
-
# 1) Increment the version here
|
5
|
-
# 2) Build the gem using command : gem build cassback.gemspec
|
6
|
-
# 3) Push the gem using command : gem push cassback-<version>.gem
|
7
|
-
# 4) Commit the version change into source control system.
|
8
|
-
VERSION = '0.1.6'.freeze
|
2
|
+
VERSION = '0.1.7'.freeze
|
9
3
|
end
|
data/lib/hadoop.rb
CHANGED
@@ -6,13 +6,13 @@ WebHDFS::ClientV1::REDIRECTED_OPERATIONS.delete('OPEN')
|
|
6
6
|
class Hadoop < WebHDFS::Client
|
7
7
|
attr_reader :base_dir
|
8
8
|
|
9
|
-
def initialize(host: 'localhost', port: 14_000, base_dir: '/', retry_times: 5, retry_interval: 1)
|
9
|
+
def initialize(host: 'localhost', port: 14_000, base_dir: '/', retry_times: 5, retry_interval: 1, read_timeout: 300)
|
10
10
|
super(host = host, port = port)
|
11
11
|
@kerberos = true
|
12
12
|
@base_dir = base_dir
|
13
13
|
@retry_known_errors = true
|
14
14
|
@retry_times = retry_times
|
15
15
|
@retry_interval = retry_interval
|
16
|
-
@read_timeout =
|
16
|
+
@read_timeout = read_timeout
|
17
17
|
end
|
18
18
|
end
|