flydata 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/flydata.gemspec +3 -3
- data/lib/flydata/command/helper.rb +1 -1
- data/lib/flydata/command/sender.rb +1 -1
- data/lib/flydata/command/sync.rb +7 -9
- data/lib/flydata/fluent-plugins/in_mysql_binlog_flydata.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 325ec216ca30d8548887146aa97bde6daff26476
|
4
|
+
data.tar.gz: 59a60554b1eea3751b0fc904d9df55fbbc1fab4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34cf256c13392454624c461b5920bbf8f77540fbe99a470b4acc1249a31e49d3ab627934c1f6b54b32083edf520c8e2836622bb71228febd5236b3b02a36abba
|
7
|
+
data.tar.gz: b2004689294e57c0dee428ea852fe421fbd945b1bf47ec130757c097212d4c0e0eb469543df32994365b5b21cd90b4721cc843f195b80c0f15437119c205fa06
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/flydata.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: flydata 0.4.
|
5
|
+
# stub: flydata 0.4.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "flydata"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Koichi Fujikawa", "Masashi Miyazaki", "Matthew Luu", "Mak Inada", "Sriram NS"]
|
14
|
-
s.date = "2015-
|
14
|
+
s.date = "2015-07-08"
|
15
15
|
s.description = "FlyData Agent"
|
16
16
|
s.email = "sysadmin@flydata.com"
|
17
17
|
s.executables = ["fdmysqldump", "flydata", "serverinfo"]
|
@@ -113,7 +113,7 @@ if #{running_cmd}; then
|
|
113
113
|
sleep 1.0
|
114
114
|
if [ $i -gt 10 ]; then # 10sec
|
115
115
|
echo "Timeout warning: It failed to stop within 10 seconds. The process will be killed with SIGKILL."
|
116
|
-
kill -9 -$(ps --pid
|
116
|
+
kill -9 -$(ps --pid `cat #{@helper_config.helper_pid_path}` --no-heading -o "%r" | tr -d ' ')
|
117
117
|
else
|
118
118
|
i=`expr $i + 1`
|
119
119
|
fi
|
data/lib/flydata/command/sync.rb
CHANGED
@@ -387,6 +387,12 @@ EOS
|
|
387
387
|
return call_block_or_return_io(fp, &block)
|
388
388
|
end
|
389
389
|
|
390
|
+
log_info_stdout("Checking MySQL server connection and configuration...")
|
391
|
+
Flydata::MysqlCompatibilityCheck.new(dp, de['mysql_data_entry_preference'], dump_dir: fp, backup_dir: sync_fm.backup_dir).check
|
392
|
+
log_info_stdout("Checking the database size...")
|
393
|
+
|
394
|
+
db_bytesize = Flydata::Parser::Mysql::DatabaseSizeCheck.new(de['mysql_data_entry_preference'].merge('tables' => target_tables)).get_db_bytesize
|
395
|
+
|
390
396
|
tables = target_tables
|
391
397
|
tables ||= '<all tables>'
|
392
398
|
data_servers = de['mysql_data_entry_preference']['data_servers'] ? "\n data servers: #{de['mysql_data_entry_preference']['data_servers']}" : ""
|
@@ -406,6 +412,7 @@ EOM
|
|
406
412
|
EOM
|
407
413
|
confirmation_text << <<-EOM if file_dump
|
408
414
|
dump file: #{fp}
|
415
|
+
approx. size: #{as_size(db_bytesize)} (#{db_bytesize} byte)
|
409
416
|
|
410
417
|
Dump file saves contents of your tables temporarily. Make sure you have enough disk space.
|
411
418
|
EOM
|
@@ -413,13 +420,6 @@ EOM
|
|
413
420
|
log_info confirmation_text.strip
|
414
421
|
|
415
422
|
if ask_yes_no('Start Sync?')
|
416
|
-
log_info_stdout("Checking MySQL server connection and configuration...")
|
417
|
-
Flydata::MysqlCompatibilityCheck.new(dp, de['mysql_data_entry_preference'], dump_dir: fp, backup_dir: sync_fm.backup_dir).check
|
418
|
-
log_info_stdout("Checking the database size...")
|
419
|
-
|
420
|
-
db_bytesize = Flydata::Parser::Mysql::DatabaseSizeCheck.new(de['mysql_data_entry_preference'].merge('tables' => target_tables)).get_db_bytesize
|
421
|
-
log_info_stdout(" -> #{as_size(db_bytesize)} (#{db_bytesize} byte)")
|
422
|
-
|
423
423
|
if file_dump
|
424
424
|
# check free disk space
|
425
425
|
free_disk_bytesize = free_disk_space(File.dirname(fp))
|
@@ -521,8 +521,6 @@ EOM
|
|
521
521
|
log_info_stdout("Resuming... Last processed table: #{option[:table_name]}")
|
522
522
|
else
|
523
523
|
option[:binlog_pos] = binlog_pos
|
524
|
-
#If its a new sync, ensure server side resources are clean
|
525
|
-
cleanup_sync_server(de, target_tables_for_api) unless opts.skip_cleanup?
|
526
524
|
end
|
527
525
|
log_info_stdout("Sending data to FlyData Server...")
|
528
526
|
|
@@ -82,7 +82,6 @@ class MysqlBinlogFlydataInput < MysqlBinlogInput
|
|
82
82
|
$log.info "mysql host:\"#{@host}\" port:\"#{@port}\" username:\"#{@username}\" database:\"#{@database}\" tables:\"#{@tables}\" tables_append_only:\"#{tables_append_only}\""
|
83
83
|
$log.info "mysql client version: #{`mysql -V`}"
|
84
84
|
server_msg = `echo 'select version();' | #{FlydataCore::Mysql::CommandGenerator.generate_mysql_cmd(@db_opts)} 2>&1`
|
85
|
-
server_msg = server_msg.each_line.select{|l| l.start_with?('ERROR ')}.join("\n")
|
86
85
|
if ($?.exitstatus == 0)
|
87
86
|
$log.info "mysql server version: #{server_msg.strip}"
|
88
87
|
else
|
@@ -174,6 +173,10 @@ EOS
|
|
174
173
|
$log.info "Sent position feature is enabled. sent_position_file:#{@sent_position_file_path}"
|
175
174
|
c.sent_binlog_position_file = @sent_position_file_path
|
176
175
|
end
|
176
|
+
|
177
|
+
$log.info("Binlog position - resume_pos:'#{IO.read(@position_file) rescue IOError}' " +
|
178
|
+
"sent_pos:'#{IO.read(@sent_position_file_path) rescue IOError}'")
|
179
|
+
|
177
180
|
c.connection_retry_limit = @retry_limit
|
178
181
|
c.connection_retry_wait = @retry_wait
|
179
182
|
c.log_level = @log_level.to_sym
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flydata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Fujikawa
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rest-client
|