fluent-plugin-azurestorage-gen2 0.2.1 → 0.2.2

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: 830b58ff51c9166a04c91f7e4994cc5c867c86e1
4
- data.tar.gz: b257f9c0684a7797266920775cea076d9c6f67dc
3
+ metadata.gz: c631dda137f661c5692855eb46d97696df14a5e0
4
+ data.tar.gz: 174ace2e26b75f25b12a38d3c76726d3526f0866
5
5
  SHA512:
6
- metadata.gz: 2512d0e061e46d7820dc6405ea2530eeceb1f65483eb9d31789df8956c4fb1469a43d20a2ebee3b0e496a73143f406331c17aabe812d9a65dae4828729d8c6aa
7
- data.tar.gz: 185079c3757ccdbaf51d205984f57791b5d3e20566c65ec8adea0b94f7db6667a56074a34234543afe29e429fb205f7bc2cf681b70e8e803d0992b1db772e65d
6
+ metadata.gz: 5f135ffbe42f292666e66bca2b84a8c1f49d3ddf727460e376c95658b0382419a9008b110371d48314ccef6af0dc2f3cff5b0ae64730ae29222571dd20333163
7
+ data.tar.gz: e81ba7ac31051ac5813ab4f3c845ee866f7dce3061c16a72fc5f3164e4b53c9c345c1135820762671162f092b195191a93ff6650a2562fc61cb12ea9a4b97ff2
data/Makefile CHANGED
@@ -8,8 +8,6 @@ install: gem
8
8
  push: gem
9
9
  gem push fluent-plugin-azurestorage-gen2*.gem
10
10
 
11
- tag-and-branch:
11
+ tag:
12
12
  git tag "v$$(cat VERSION)" $(RELEASE_COMMIT)
13
- git checkout -b "release/$$(cat VERSION)" $(RELEASE_COMMIT)
14
- git push origin "v$$(cat VERSION)"
15
- git push -u origin "release/$$(cat VERSION)"
13
+ git push origin "v$$(cat VERSION)"
data/README.md CHANGED
@@ -34,9 +34,10 @@ $ gem install fluent-plugin-azurestorage-gen2
34
34
  azure_object_key_format %{path}-%{index}.%{file_extension}
35
35
  azure_oauth_refresh_interval 3600
36
36
  time_slice_format %Y%m%d-%H
37
- file_extension log
37
+ file_extension log # only used with store_as none
38
38
  path "/cluster-logs/myfolder/${tag[1]}-#{Socket.gethostname}-%M"
39
39
  auto_create_container true
40
+ store_as gzip
40
41
  format single_value
41
42
  <buffer tag,time>
42
43
  @type file
@@ -61,8 +62,8 @@ $ gem install fluent-plugin-azurestorage-gen2
61
62
  azure_oauth_secret <my client secret>
62
63
  azure_oauth_refresh_interval 3600
63
64
  time_slice_format %Y%m%d-%H
64
- file_extension log
65
65
  path "/cluster-logs/myfolder/${tag[1]}-#{Socket.gethostname}-%M"
66
+ store_as gzip
66
67
  auto_create_container true
67
68
  format single_value
68
69
  <buffer tag,time>
@@ -121,7 +122,11 @@ This plugin create container if not exist when you set 'auto_create_container' t
121
122
 
122
123
  ### skip_container_check
123
124
 
124
- You can skip the initial container listing (and container creation) operations at startup. That can be useful if the user is not allowed to perform these operations.
125
+ You can skip the initial container listing (and container creation) operations at startup. That can be useful if the user is not allowed to perform this operation.
126
+
127
+ ### enable_retry
128
+
129
+ If you set this option, operations can be retried in the buffer. Default value is false. (Currently only flush command is supported)
125
130
 
126
131
  ### azure_object_key_format
127
132
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -24,6 +24,7 @@ module Fluent
24
24
  chunk.path
25
25
  else
26
26
  w = Tempfile.new("chunk-gzip-tmp")
27
+ w.binmode
27
28
  chunk.write_to(w)
28
29
  w.close
29
30
  w.path
@@ -20,6 +20,7 @@ module Fluent
20
20
 
21
21
  def compress(chunk, tmp)
22
22
  w = Tempfile.new("chunk-xz-tmp")
23
+ w.binmode
23
24
  chunk.write_to(w)
24
25
  w.close
25
26
 
@@ -20,6 +20,7 @@ module Fluent
20
20
 
21
21
  def compress(chunk, tmp)
22
22
  w = Tempfile.new("chunk-tmp")
23
+ w.binmode
23
24
  chunk.write_to(w)
24
25
  w.close
25
26
 
@@ -128,12 +128,14 @@ module Fluent::Plugin
128
128
  log.debug "azurestorage_gen2: processing raw data", chunk_id: dump_unique_id_hex(chunk.unique_id)
129
129
  upload_blob(raw_data, metadata)
130
130
  end
131
+ chunk.close rescue nil
131
132
  @last_azure_storage_path = @azure_storage_path
132
133
  else
133
134
  tmp = Tempfile.new("azure-")
135
+ tmp.binmode
134
136
  begin
135
137
  @compressor.compress(chunk, tmp)
136
- tmp.close
138
+ tmp.rewind
137
139
  generate_log_name(metadata, @current_index)
138
140
  if @last_azure_storage_path != @azure_storage_path
139
141
  @current_index = 0
@@ -144,7 +146,7 @@ module Fluent::Plugin
144
146
  upload_blob(content, metadata)
145
147
  @last_azure_storage_path = @azure_storage_path
146
148
  ensure
147
- tmp.unlink
149
+ tmp.close(true) rescue nil
148
150
  end
149
151
  end
150
152
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-azurestorage-gen2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Szabo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-06 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd