fluent-plugin-webhdfs 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -0
- data/fluent-plugin-webhdfs.gemspec +2 -2
- data/lib/fluent/plugin/out_webhdfs.rb +23 -0
- data/test/plugin/test_out_webhdfs.rb +17 -0
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e67f69a6f94c64ebe9b463b262111626a5cfb0e3
|
4
|
+
data.tar.gz: 9786c0456e296851caf6001898c8e30751724b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6766521d3edaf773135c7d948ba0f8989241535795f7a38d61961c3dd9823df83955c0e4f817b029600c8e83495e24443015d2b863f68dd911dc6ea7ca5f8274
|
7
|
+
data.tar.gz: 3834bcb691d9d5c86df91169f44f77a9aaad09754d849919138be5ce403271b3a168c3620a0bbafc80bd8f3a2553cc0b3fd97bc14e794c0637dd1cc06dc3c7ec
|
data/README.md
CHANGED
@@ -93,6 +93,33 @@ Store data as TSV (TAB separated values) of specified keys, without time, with t
|
|
93
93
|
|
94
94
|
If message doesn't have specified attribute, fluent-plugin-webhdfs outputs 'NULL' instead of values.
|
95
95
|
|
96
|
+
With ssl:
|
97
|
+
|
98
|
+
<match access.**>
|
99
|
+
type webhdfs
|
100
|
+
host namenode.your.cluster.local
|
101
|
+
port 50070
|
102
|
+
path /path/on/hdfs/access.log.%Y%m%d_%H.log
|
103
|
+
ssl true
|
104
|
+
ssl_ca_file /path/to/ca_file.pem # if needed
|
105
|
+
ssl_verify_mode peer # if needed (peer or none)
|
106
|
+
</match>
|
107
|
+
|
108
|
+
Here `ssl_verify_mode peer` means to verify the server's certificate.
|
109
|
+
You can turn off it by setting `ssl_verify_mode none`. The default is `peer`.
|
110
|
+
See [net/http](http://www.ruby-doc.org/stdlib-2.1.3/libdoc/net/http/rdoc/Net/HTTP.html)
|
111
|
+
and [openssl](http://www.ruby-doc.org/stdlib-2.1.3/libdoc/openssl/rdoc/OpenSSL.html) documentation for further details.
|
112
|
+
|
113
|
+
With kerberos authentication:
|
114
|
+
|
115
|
+
<match access.**>
|
116
|
+
type webhdfs
|
117
|
+
host namenode.your.cluster.local
|
118
|
+
port 50070
|
119
|
+
path /path/on/hdfs/access.log.%Y%m%d_%H.log
|
120
|
+
kerberos true
|
121
|
+
</match>
|
122
|
+
|
96
123
|
### Namenode HA / Auto retry for WebHDFS known errors
|
97
124
|
|
98
125
|
`fluent-plugin-webhdfs` (v0.2.0 or later) accepts 2 namenodes for Namenode HA (active/standby). Use `standby_namenode` like this:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-webhdfs"
|
5
|
-
gem.version = "0.
|
5
|
+
gem.version = "0.4.0"
|
6
6
|
gem.authors = ["TAGOMORI Satoshi"]
|
7
7
|
gem.email = ["tagomoris@gmail.com"]
|
8
8
|
gem.summary = %q{Fluentd plugin to write data on HDFS over WebHDFS, with flexible formatting}
|
@@ -19,5 +19,5 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.add_runtime_dependency "fluentd", '>= 0.10.53'
|
20
20
|
gem.add_runtime_dependency "fluent-mixin-plaintextformatter", '>= 0.2.1'
|
21
21
|
gem.add_runtime_dependency "fluent-mixin-config-placeholders", ">= 0.3.0"
|
22
|
-
gem.add_runtime_dependency "webhdfs", '>= 0.
|
22
|
+
gem.add_runtime_dependency "webhdfs", '>= 0.6.0'
|
23
23
|
end
|
@@ -41,6 +41,21 @@ class Fluent::WebHDFSOutput < Fluent::TimeSlicedOutput
|
|
41
41
|
|
42
42
|
config_param :append, :bool, :default => true
|
43
43
|
|
44
|
+
config_param :ssl, :bool, :default => false
|
45
|
+
config_param :ssl_ca_file, :string, :default => nil
|
46
|
+
config_param :ssl_verify_mode, :default => nil do |val|
|
47
|
+
case val
|
48
|
+
when 'none'
|
49
|
+
:none
|
50
|
+
when 'peer'
|
51
|
+
:peer
|
52
|
+
else
|
53
|
+
raise ConfigError, "unexpected parameter on ssl_verify_mode: #{val}"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
config_param :kerberos, :bool, :default => false
|
58
|
+
|
44
59
|
CHUNK_ID_PLACE_HOLDER = '${chunk_id}'
|
45
60
|
|
46
61
|
def initialize
|
@@ -120,6 +135,14 @@ class Fluent::WebHDFSOutput < Fluent::TimeSlicedOutput
|
|
120
135
|
client.retry_interval = @retry_interval if @retry_interval
|
121
136
|
client.retry_times = @retry_times if @retry_times
|
122
137
|
end
|
138
|
+
if @ssl
|
139
|
+
client.ssl = true
|
140
|
+
client.ssl_ca_file = @ssl_ca_file if @ssl_ca_file
|
141
|
+
client.ssl_verify_mode = @ssl_verify_mode if @ssl_verify_mode
|
142
|
+
end
|
143
|
+
if @kerberos
|
144
|
+
client.kerberos = true
|
145
|
+
end
|
123
146
|
|
124
147
|
client
|
125
148
|
end
|
@@ -40,6 +40,23 @@ username hdfs_user
|
|
40
40
|
assert_equal '%Y%m%d%H%M', d.instance.time_slice_format
|
41
41
|
assert_equal true, d.instance.httpfs
|
42
42
|
assert_equal 'hdfs_user', d.instance.username
|
43
|
+
|
44
|
+
d = create_driver %[
|
45
|
+
namenode server.local:14000
|
46
|
+
path /hdfs/path/file.%Y%m%d.%H%M.log
|
47
|
+
ssl true
|
48
|
+
ssl_ca_file /path/to/ca_file.pem
|
49
|
+
ssl_verify_mode peer
|
50
|
+
kerberos true
|
51
|
+
]
|
52
|
+
assert_equal 'server.local', d.instance.instance_eval{ @namenode_host }
|
53
|
+
assert_equal 14000, d.instance.instance_eval{ @namenode_port }
|
54
|
+
assert_equal '/hdfs/path/file.%Y%m%d.%H%M.log', d.instance.path
|
55
|
+
assert_equal '%Y%m%d%H%M', d.instance.time_slice_format
|
56
|
+
assert_equal true, d.instance.ssl
|
57
|
+
assert_equal '/path/to/ca_file.pem', d.instance.ssl_ca_file
|
58
|
+
assert_equal :peer, d.instance.ssl_verify_mode
|
59
|
+
assert_equal true, d.instance.kerberos
|
43
60
|
end
|
44
61
|
|
45
62
|
def test_configure_placeholders
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-webhdfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.6.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.6.0
|
83
83
|
description: For WebHDFS and HttpFs of Hadoop HDFS
|
84
84
|
email:
|
85
85
|
- tagomoris@gmail.com
|
@@ -124,4 +124,3 @@ summary: Fluentd plugin to write data on HDFS over WebHDFS, with flexible format
|
|
124
124
|
test_files:
|
125
125
|
- test/helper.rb
|
126
126
|
- test/plugin/test_out_webhdfs.rb
|
127
|
-
has_rdoc:
|