fluent-plugin-bigquery-custom 0.3.8 → 0.3.9

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: 8fa069b1f44e40c71a9eaaeec2120e239a0dec38
4
- data.tar.gz: c439e475ec1bd49f3f8b73b5e3d029b99ae521eb
3
+ metadata.gz: fe157a70c513478cfa4aaa3641ff335b245de00e
4
+ data.tar.gz: 27b84dbdb8a897874fe1fe396e78ecaa4dadcfef
5
5
  SHA512:
6
- metadata.gz: d9ff3c9c78663f7b323b90ccb0243690d7c8385bca74fc9c360cedbae1c1687fea2f6adecf14077d8ddf2c01e625dbbe61b621682c6811f1871adbe280872ed6
7
- data.tar.gz: 6494234184b5788b9888a4f99ca9d141aae7dac0a0d6bc10e71b9748f58f92f06ab0ee3d9665fced614f0dca10aa9db6a0c54846ad8910f507aa23191e78361f
6
+ metadata.gz: 7cf0470af4c5c6e4f73805d607be656c5272296623a327b7657eb70aac2a1b8110c726d24ab6421805a2131efb3243269ec07b7319d92fd96998630c297b10c3
7
+ data.tar.gz: 204dbd6d54c5e119eb510ac870c9c1f863329220572830a8ad0450fe3406a3e55eaef2c68212c6f70f91646a9ba0a7473cf75b05dc18fa8a69d6b83ab09f4ad3
@@ -1,6 +1,6 @@
1
1
  module Fluent
2
2
  module BigQueryPlugin
3
- VERSION = "0.3.8"
3
+ VERSION = "0.3.9"
4
4
  end
5
5
  end
6
6
 
@@ -511,10 +511,7 @@ module Fluent
511
511
  job_id = nil
512
512
 
513
513
  create_upload_source(chunk) do |upload_source|
514
- if @prevent_duplicate_load
515
- job_id = create_job_id(upload_source.path, @dataset, @table, @fields.to_a, @max_bad_records, @ignore_unknown_values)
516
- end
517
- configuration = load_configuration(table_id, template_suffix, upload_source)
514
+ configuration, job_id = load_configuration(table_id, template_suffix, upload_source)
518
515
  res = client.insert_job(
519
516
  @project,
520
517
  configuration,
@@ -537,7 +534,7 @@ module Fluent
537
534
  reason = e.respond_to?(:reason) ? e.reason : nil
538
535
  log.error "job.insert API", project_id: @project, dataset: @dataset, table: table_id, code: e.status_code, message: e.message, reason: reason
539
536
 
540
- return wait_load(job_id) if e.status_code == 409 && e.message =~ /Job/ # duplicate load job
537
+ return wait_load(job_id) if job_id && e.status_code == 409 && e.message =~ /Job/ # duplicate load job
541
538
 
542
539
  if RETRYABLE_ERROR_REASON.include?(reason) || e.is_a?(Google::Apis::ServerError)
543
540
  raise "failed to insert into bigquery, retry" # TODO: error class
@@ -584,7 +581,7 @@ module Fluent
584
581
  raise "Schema is empty" if @fields.empty?
585
582
  end
586
583
 
587
- configuration
584
+ return configuration, job_id
588
585
  end
589
586
 
590
587
  def wait_load(job_id)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-bigquery-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomohiro Hashidate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake