flydata 0.6.6 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7290d3afa3aae7bb6743d2cb07f4fcbc177cd6b2
4
- data.tar.gz: 7b25b15017cbbe48e989a0ac81f144db992edd47
3
+ metadata.gz: b6701c9350e3750c31548dd87a4eef8f7fe0b892
4
+ data.tar.gz: 47bc03157661a676aa260bd8b4874ddb841473dd
5
5
  SHA512:
6
- metadata.gz: 83d1593bbdc920c839eaa47896f7d346d00df01ce746688a0ff90ca9db0fb8165910cb608b0af56614ea0210e82b7a4f670613ad79273cb555b949b986dfd42d
7
- data.tar.gz: 13316271fc44a751101167abb48b8250aceefd2a9393f081c7e29dfc2465b36ad45249734a052f5a0db8ae86ab551c75e6c67d4e369391ba1aa1c4557aee7784
6
+ metadata.gz: 9bad37633ebfa90d3cd8a6cd7a7a0fe89c37b44c6d0af79485b3d73b4ba3aea2f430fc979a9eedad4c390a3ff99270d7470977dcabe7bdadbaf801f6b4ba3210
7
+ data.tar.gz: 2177c90471da7c96ff39fb2af91e5144904296d460a21d024b0b60c9de37ada11de1718a07e239385bd64a62635006db4189cb76687dfdb26acd1eee50c0ccb9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.6
1
+ 0.6.7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "flydata"
8
- s.version = "0.6.6"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Koichi Fujikawa", "Masashi Miyazaki", "Matthew Luu", "Mak Inada", "Sriram NS"]
12
- s.date = "2016-02-09"
12
+ s.date = "2016-02-17"
13
13
  s.description = "FlyData Agent"
14
14
  s.email = "sysadmin@flydata.com"
15
15
  s.executables = ["fdmysqldump", "fdredshift", "flydata", "serverinfo"]
@@ -217,6 +217,7 @@ Gem::Specification.new do |s|
217
217
  "lib/flydata/source/source_pos.rb",
218
218
  "lib/flydata/source/sync.rb",
219
219
  "lib/flydata/source/sync_generate_table_ddl.rb",
220
+ "lib/flydata/source_file/data_entry.rb",
220
221
  "lib/flydata/source_file/setup.rb",
221
222
  "lib/flydata/source_file/sync.rb",
222
223
  "lib/flydata/source_mysql/command/mysql.rb",
@@ -15,8 +15,7 @@ module Flydata
15
15
  sender = Flydata::Command::Sender.new(opts)
16
16
  sender.restart
17
17
  unless opts.skip_helper?
18
- helper = Flydata::Command::Helper.new
19
- helper.restart(quiet: true)
18
+ system "flydata helper:restart"
20
19
  end
21
20
  end
22
21
  run_exclusive :run
@@ -71,7 +71,7 @@ What's next?
71
71
  # Surprisingly, Helper's start method kills the process after starting
72
72
  # the helper thanks to ServerEngine. So the command needs to run in a
73
73
  # separate process.
74
- fork { Flydata::Command::Helper.new.restart(quiet: true) }
74
+ system "flydata helper:restart"
75
75
  Flydata::Command::Login.new.run unless flydata.credentials.authenticated?
76
76
  Flydata::Command::Conf.new.copy_templates
77
77
  puts
@@ -268,11 +268,15 @@ EOS
268
268
  end
269
269
  end
270
270
 
271
+ # Command: flydata sync:repair
272
+ # - Entry method
271
273
  def repair
272
274
  _repair
273
275
  end
274
276
  run_exclusive :repair
275
277
 
278
+ # Command: flydata sync:check
279
+ # - Entry method
276
280
  def check(options = {})
277
281
  context = source.source_pos
278
282
  status, pos_mismatch_tables, gap_tables = _check(context, options)
@@ -310,6 +314,14 @@ EOS
310
314
  end
311
315
  run_exclusive :check
312
316
 
317
+ # Command: flydata sync:compat_check
318
+ # - Entry method
319
+ def compat_check
320
+ context = source.sync_generate_table_ddl(flydata.data_port.get, opts)
321
+ context.run_compatibility_check
322
+ end
323
+ run_exclusive :compat_check
324
+
313
325
  private
314
326
 
315
327
  def generate_kv_pairs(keys, values)
@@ -0,0 +1,11 @@
1
+ require 'flydata/source/data_entry'
2
+
3
+ module Flydata
4
+ module SourceFile
5
+
6
+ class DataEntry < Source::DataEntry
7
+ CONFIG_PARAMS = {}
8
+ end
9
+
10
+ end
11
+ end
@@ -8,14 +8,17 @@ module Flydata
8
8
  include MysqlCommandBase
9
9
 
10
10
  def generate_command(dbconf, args)
11
+ skip_ssl = !!args.delete('--skip-ssl')
11
12
  dbconf.delete('tables')
12
13
  dbconf[:custom_option_end] = args.join(' ')
13
14
  dbconf[:command] = 'mysqlbinlog'
14
15
  # --default-character-set=utf8 is not supported
15
16
  dbconf[:no_default_option] = true
16
17
  # ssl is not supported for mysql5.6 or older mysqlbinlog command
17
- dbconf.delete('ssl_ca')
18
- dbconf.delete('ssl_cipher')
18
+ if skip_ssl
19
+ dbconf.delete('ssl_ca')
20
+ dbconf.delete('ssl_cipher')
21
+ end
19
22
  dbconf.delete('database')
20
23
  if args.empty?
21
24
  puts <<EOT
@@ -24,6 +27,8 @@ example:
24
27
  flydata mysqlbinlog --raw --read-from-remote-server --result-file "binlog-" mysql-bin-changelog.xxxx
25
28
  2. Dump decoded binlog data
26
29
  flydata mysqlbinlog -vv --base64-output=decode-row --hexdump --read-from-remote-server --start-position=4 --stop-position=yyyyy mysql-bin-changelog.xxxxx > mysql-bin-changelog.xxxxx
30
+
31
+ NOTE: Add --skip-ssl to skip ssl options
27
32
  EOT
28
33
  return
29
34
  end
@@ -6,14 +6,12 @@ module Flydata
6
6
  describe Restart do
7
7
  subject { described_class.new }
8
8
  let(:sender) { double("sender") }
9
- let(:helper) { double("helper") }
10
9
  let(:opts) { double("opts") }
11
10
 
12
11
  it "should restart sender and helper when skip-helper option is not passed" do
13
12
  expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
14
13
  expect(sender).to receive(:restart)
15
- expect(Flydata::Command::Helper).to receive(:new).and_return(helper)
16
- expect(helper).to receive(:restart)
14
+ expect_any_instance_of(Flydata::Command::Restart).to receive(:system).with('flydata helper:restart')
17
15
  subject.run
18
16
  end
19
17
 
@@ -21,6 +19,7 @@ module Flydata
21
19
  expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
22
20
  expect(sender).to receive(:restart)
23
21
  expect(opts).to receive(:skip_helper?).and_return(true)
22
+ expect_any_instance_of(Flydata::Command::Restart).to receive(:system).never
24
23
  described_class.new(opts).run
25
24
  end
26
25
  end
@@ -36,7 +36,7 @@ module Flydata
36
36
  expect(Flydata::Command::Conf).to receive(:new).and_return(conf)
37
37
  expect(Flydata::Command::Login).to receive(:new).and_return(login)
38
38
  expect(Flydata::Command::Sender).to receive(:new).and_return(sender).twice
39
-
39
+ expect_any_instance_of(Flydata::Command::Setup).to receive(:system).with('flydata helper:restart')
40
40
  subject.initial_run
41
41
  end
42
42
  end
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.6.6
4
+ version: 0.6.7
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: 2016-02-09 00:00:00.000000000 Z
15
+ date: 2016-02-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rest-client
@@ -692,6 +692,7 @@ files:
692
692
  - lib/flydata/source/source_pos.rb
693
693
  - lib/flydata/source/sync.rb
694
694
  - lib/flydata/source/sync_generate_table_ddl.rb
695
+ - lib/flydata/source_file/data_entry.rb
695
696
  - lib/flydata/source_file/setup.rb
696
697
  - lib/flydata/source_file/sync.rb
697
698
  - lib/flydata/source_mysql/command/mysql.rb