embulk-parser-msgpack 0.4.0-java → 0.6.0-java

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
  SHA256:
3
- metadata.gz: fdb711108162dd91474d31a3dbc76a0e4fbbaf76b0e899c80ce414aef0de71f1
4
- data.tar.gz: 66dbe37b5e09db6689a3bb9e95bbb1702095a8243b7f81e9b224b7d41cf0db8a
3
+ metadata.gz: 1151f4ffe7c9c04d7465ca6eba40d69653bab9a9959db2bdebd3d4543e775976
4
+ data.tar.gz: d652ff5e113fa303139885c067cf9f330e7c6b0c217441b9561e63ae71efe207
5
5
  SHA512:
6
- metadata.gz: ee22bab19190e93c9a90d541d3861a1aa4992b96c6a24b01a1e70c3c581cfffc27be57f98f796d2e5899b7e971bc157f8b1a60954e516a7332c710fb544c4580
7
- data.tar.gz: f48f550cef4cbb5204baa20a43020c4bdf92d136b844f99997834e09aeca6fc823bbe83ef7f1968fbd470f9b9d0ba5849a40b4388ada20dd27324e63340289d5
6
+ metadata.gz: ad8c531c1734b60383f7a67b0390443f3a7ae11d90cb943bf085a325e6c59f901bf196016c6944b79e8c5c0f00fb234bc72ad6068709ac8b779ae354756666f8
7
+ data.tar.gz: 62698fc8bd529cbc4b8bf0832c9685376739bdc9c0743388535a5b280e9a5c4397ea0b10c62239a8cf917dd449a548303b0703edeca256025d073191bbc3e7b1
data/NOTICE CHANGED
@@ -1,17 +1,66 @@
1
1
  embulk-parser-msgpack
2
- Copyright 2015-2022 Sadayuki Furuhashi, and the Embulk project.
2
+ Copyright 2015-2023 Sadayuki Furuhashi, and the Embulk project.
3
3
 
4
4
  This product includes software developed at
5
5
  The Embulk project (https://www.embulk.org/).
6
6
 
7
7
 
8
- The RubyGems distribution of this product bundles products of
9
- the Jackson project, as-is.
10
- They are licensed under the Apache Software License, Version 2.0.
11
- See: https://github.com/FasterXML/jackson
12
8
 
9
+ The RubyGems distribution of this product includes a modified portion of
10
+ MessagePack for Java, licensed under
11
+ the Apache License, Version 2.0.
13
12
 
14
- The RubyGems distribution of this product bundles products of
15
- the Jakarta Bean Validation API 1.1, as-is.
16
- They are licensed under the Apache Software License, Version 2.0.
17
- See: https://beanvalidation.org/1.1/
13
+ * The NOTICE file of MessagePack for Java is embedded in this NOTICE below.
14
+
15
+
16
+
17
+ The RubyGems distribution of this product includes
18
+ Jackson JSON processor, developed by
19
+ Tatu Saloranta, tatu.saloranta@iki.fi, licensed under
20
+ the Apache License, Version 2.0.
21
+
22
+ * Copyright (c) 2007- Tatu Saloranta, tatu.saloranta@iki.fi
23
+ * The NOTICE file of Jackson JSON processor is embedded in this NOTICE below.
24
+
25
+
26
+
27
+ The RubyGems distribution of this product includes
28
+ the Bean Validation API 1.1, developed by
29
+ the JSR-349 Expert Group (https://beanvalidation.org/1.1/), licensed under
30
+ the Apache License, Version 2.0.
31
+
32
+
33
+
34
+ NOTICE of MessagePack for Java
35
+ -------------------------------
36
+
37
+ This product includes the software developed by third-party:
38
+
39
+ * Google Guava https://code.google.com/p/guava-libraries/ (APL2)
40
+ * sbt-extras: https://github.com/paulp/sbt-extras (BSD) (LICENSE.sbt-extras.txt)
41
+
42
+
43
+
44
+ NOTICE of Jackson JSON processor
45
+ ---------------------------------
46
+
47
+ # Jackson JSON processor
48
+
49
+ Jackson is a high-performance, Free/Open Source JSON processing library.
50
+ It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
51
+ been in development since 2007.
52
+ It is currently developed by a community of developers, as well as supported
53
+ commercially by FasterXML.com.
54
+
55
+ ## Licensing
56
+
57
+ Jackson core and extension components may be licensed under different licenses.
58
+ To find the details that apply to this artifact see the accompanying LICENSE file.
59
+ For more information, including possible other licensing options, contact
60
+ FasterXML.com (http://fasterxml.com).
61
+
62
+ ## Credits
63
+
64
+ A list of contributors may be found from CREDITS file, which is included
65
+ in some artifacts (usually source distributions); but is always available
66
+ from the source code management (SCM) system project uses.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-msgpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: java
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -10,30 +10,30 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-10-25 00:00:00.000000000 Z
13
+ date: 2023-10-24 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Parses files encoded in MessagePack.
16
16
  email:
17
17
  - frsyuki@gmail.com
18
18
  - muga.nishizawa@gmail.com
19
- - dmikurube@treasure-data.com
19
+ - dmikurube@acm.org
20
20
  executables: []
21
21
  extensions: []
22
22
  extra_rdoc_files: []
23
23
  files:
24
24
  - LICENSE
25
25
  - NOTICE
26
- - classpath/embulk-parser-msgpack-0.4.0.jar
27
- - classpath/embulk-util-config-0.3.1.jar
28
- - classpath/embulk-util-dynamic-0.1.1.jar
29
- - classpath/embulk-util-rubytime-0.3.2.jar
30
- - classpath/embulk-util-timestamp-0.2.1.jar
26
+ - classpath/embulk-parser-msgpack-0.6.0.jar
27
+ - classpath/embulk-util-config-0.3.4.jar
28
+ - classpath/embulk-util-dynamic-0.2.1.jar
29
+ - classpath/embulk-util-msgpack-0.8.24.1.jar
30
+ - classpath/embulk-util-rubytime-0.3.3.jar
31
+ - classpath/embulk-util-timestamp-0.2.2.jar
31
32
  - classpath/jackson-annotations-2.6.7.jar
32
33
  - classpath/jackson-core-2.6.7.jar
33
- - classpath/jackson-databind-2.6.7.jar
34
+ - classpath/jackson-databind-2.6.7.5.jar
34
35
  - classpath/jackson-datatype-jdk8-2.6.7.jar
35
36
  - classpath/validation-api-1.1.0.Final.jar
36
- - lib/embulk/guess/msgpack.rb
37
37
  - lib/embulk/parser/msgpack.rb
38
38
  homepage: https://github.com/embulk/embulk-parser-msgpack
39
39
  licenses:
@@ -54,8 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubyforge_project:
58
- rubygems_version: 2.7.9
57
+ rubygems_version: 3.3.26
59
58
  signing_key:
60
59
  specification_version: 4
61
60
  summary: MessagePack parser plugin for Embulk
Binary file
@@ -1,89 +0,0 @@
1
- module Embulk
2
- module Guess
3
-
4
- class Msgpack < GuessPlugin
5
- Plugin.register_guess("msgpack", self)
6
-
7
- def guess(config, sample_buffer)
8
- return {} unless config.fetch("parser", {}).fetch("type", "msgpack") == "msgpack"
9
-
10
- parser_config = config["parser"] || {}
11
-
12
- classpath = File.expand_path('../../../../classpath', __FILE__)
13
- Dir["#{classpath}/*.jar"].each {|jar| require jar }
14
-
15
- file_encoding = parser_config["file_encoding"]
16
- row_encoding = parser_config["row_encoding"]
17
-
18
- if !file_encoding || !row_encoding
19
- uk = new_unpacker(sample_buffer)
20
- begin
21
- n = uk.unpackArrayHeader
22
- begin
23
- n = uk.unpackArrayHeader
24
- file_encoding = "array"
25
- row_encoding = "array"
26
- rescue org.msgpack.core.MessageTypeException
27
- file_encoding = "sequence"
28
- row_encoding = "array"
29
- end
30
- rescue org.msgpack.core.MessageTypeException
31
- uk = new_unpacker(sample_buffer) # TODO unpackArrayHeader consumes buffer (unexpectedly)
32
- begin
33
- n = uk.unpackMapHeader
34
- file_encoding = "sequence"
35
- row_encoding = "map"
36
- rescue org.msgpack.core.MessageTypeException
37
- return {} # not a msgpack
38
- end
39
- end
40
- end
41
-
42
- uk = new_unpacker(sample_buffer)
43
-
44
- case file_encoding
45
- when "array"
46
- uk.unpackArrayHeader # skip array header to convert to sequence
47
- when "sequence"
48
- # do nothing
49
- end
50
-
51
- rows = []
52
-
53
- begin
54
- while true
55
- rows << JSON.parse(uk.unpackValue.toJson)
56
- end
57
- rescue java.io.EOFException
58
- end
59
-
60
- if rows.size <= 3
61
- return {}
62
- end
63
-
64
- case row_encoding
65
- when "map"
66
- schema = Embulk::Guess::SchemaGuess.from_hash_records(rows)
67
- when "array"
68
- column_count = rows.map {|r| r.size }.max
69
- column_names = column_count.times.map {|i| "c#{i}" }
70
- schema = Embulk::Guess::SchemaGuess.from_array_records(column_names, rows)
71
- end
72
-
73
- parser_guessed = {"type" => "msgpack"}
74
- parser_guessed["row_encoding"] = row_encoding
75
- parser_guessed["file_encoding"] = file_encoding
76
- parser_guessed["columns"] = schema
77
-
78
- return {"parser" => parser_guessed}
79
-
80
- rescue org.msgpack.core.MessagePackException
81
- return {}
82
- end
83
-
84
- def new_unpacker(sample_buffer)
85
- org.msgpack.core.MessagePack.newDefaultUnpacker(sample_buffer.to_java_bytes)
86
- end
87
- end
88
- end
89
- end