flydata 0.3.2 → 0.3.3

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: 8b8bbf89988f5ae28562da185290028c00f02304
4
- data.tar.gz: e443c6fb75c571b1c1fc95ef40c3a877a7bb31fa
3
+ metadata.gz: 5ef2dc67241b147ae812ec973f9574a332eadc0b
4
+ data.tar.gz: fc755e2fe59e6213320cc01d147a4c00a61ccfbb
5
5
  SHA512:
6
- metadata.gz: aef7d1b13401d4881f020406ed6cfd32aca7193a01570cfac081556ce24a9a67b63678ce7da1762036dfbddeb02cbf67f283e4ce3ff4e7d9c756580cb786960c
7
- data.tar.gz: cb4a80a2c7ce7fc1a507c57b6ad6ea51f23ae3299c562e3165799764d03eb9c8a021895209b1bb7c4708a54ebd609ae29b8dd437cf85d495e166169624dab0f6
6
+ metadata.gz: dc76e606a4c7a3eb5d7d4b32dc80cbeac02fd349b82e1348331ca6708eceb1f3bedba626ed78f8727ecd0cfe9859f1789190c1d38ea882b205c50695ae3025de
7
+ data.tar.gz: 31e441f72535a2d3f3e9cd093a2ee0d0343909e61f53cf327e0f5034e367dde1a090635e43f34f137cc59e3dfbee941c39de8fdd20e7bc552eccb9cc36acba48
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.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.3.2 ruby lib
5
+ # stub: flydata 0.3.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "flydata"
9
- s.version = "0.3.2"
9
+ s.version = "0.3.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-02-25"
14
+ s.date = "2015-02-26"
15
15
  s.description = "FlyData Agent"
16
16
  s.email = "sysadmin@flydata.com"
17
17
  s.executables = ["fdmysqldump", "flydata", "serverinfo"]
@@ -32,6 +32,7 @@ module Flydata
32
32
  def self.slop
33
33
  Slop.new do
34
34
  on 'c', 'skip-cleanup', 'Skip server cleanup'
35
+ on 'f', 'skip-flush', 'Skip server flush'
35
36
  on 'y', 'yes', 'Skip command prompt assuming yes to all questions. Use this for batch operation.'
36
37
  on 'd', 'dump-file', 'Dump mysqldump into a file. Use this for debugging after making sure the free space.' # dummy for compatibility
37
38
  on 's', 'dump-stream', 'Dump mysqldump stream instead of saving dump file. It might cause timeout error if db size is larger than 10GB.'
@@ -124,6 +125,7 @@ EOS
124
125
 
125
126
  def self.slop_flush
126
127
  Slop.new do
128
+ on 'f', 'skip-flush', 'Skip server flush'
127
129
  on 'y', 'yes', 'Skip command prompt assuming yes to all questions. Use this for batch operation.'
128
130
  end
129
131
  end
@@ -724,7 +726,11 @@ Thank you for using FlyData!
724
726
  def flush_buffer_and_stop
725
727
  sender = Flydata::Command::Sender.new
726
728
  sender.flush_client_buffer
727
- wait_for_server_data_processing(SERVER_DATA_PROCESSING_TIMEOUT)
729
+ if opts.skip_flush?
730
+ log_info_stdout("Skip waiting for server data processing.")
731
+ else
732
+ wait_for_server_data_processing(SERVER_DATA_PROCESSING_TIMEOUT)
733
+ end
728
734
  sender.stop(quiet: true)
729
735
  end
730
736
  end
@@ -23,10 +23,12 @@ Usage: flydata COMMAND
23
23
  stop # stop flydata process
24
24
  restart # restart flydata process
25
25
  status # check flydata process
26
+ version # show flydata version
26
27
  conf # show configuration
27
28
  sync [tables] # initial sync (only for mysql database)
28
- sync:generate_table_ddl [tables] # Generate CREATE TABLE script for Redshift
29
- sync:reset [tables] # reset sync
29
+ sync:generate_table_ddl [tables| –all-tables] # Generate CREATE TABLE script for Redshift
30
+ sync:reset [tables] # reset sync and stop flydata process
31
+ sync:flush # flush your current buffer and stop flydata process
30
32
  EOM
31
33
  text += "\n"
32
34
  text += '-' * 64
@@ -181,6 +181,7 @@ REPLACE(TABLE_NAME, '`', '``'), '` ')
181
181
  AS tables
182
182
  FROM INFORMATION_SCHEMA.TABLES
183
183
  WHERE TABLE_TYPE = 'BASE TABLE'
184
+ AND TABLE_SCHEMA IN (%s)
184
185
  AND ENGINE NOT IN ('MEMORY', 'CSV', 'PERFORMANCE_SCHEMA');
185
186
  EOS
186
187
 
@@ -214,7 +215,7 @@ EOS
214
215
  tables = ""
215
216
  if mysql_server_version(client) >= "5.5"
216
217
  # FLUSH TABLES table_names,... WITH READ LOCK syntax is supported from MySQL 5.5
217
- result = client.query(USER_TABLES_QUERY)
218
+ result = client.query(USER_TABLES_QUERY % ["mysql", client.query_options[:database].to_s].collect{|db| "'#{db}'"}.join(","))
218
219
  tables = result.collect{|r| r['tables']}.join(", ")
219
220
  end
220
221
  FLUSH_TABLES_QUERY_TEMPLATE % [tables]
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.3.2
4
+ version: 0.3.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-02-25 00:00:00.000000000 Z
15
+ date: 2015-02-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rest-client