embulk-parser-msgpack 0.4.0-java → 0.6.0-java
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 +4 -4
- data/NOTICE +58 -9
- data/classpath/embulk-parser-msgpack-0.6.0.jar +0 -0
- data/classpath/{embulk-util-config-0.3.1.jar → embulk-util-config-0.3.4.jar} +0 -0
- data/classpath/embulk-util-dynamic-0.2.1.jar +0 -0
- data/classpath/embulk-util-msgpack-0.8.24.1.jar +0 -0
- data/classpath/{embulk-util-rubytime-0.3.2.jar → embulk-util-rubytime-0.3.3.jar} +0 -0
- data/classpath/{embulk-util-timestamp-0.2.1.jar → embulk-util-timestamp-0.2.2.jar} +0 -0
- data/classpath/jackson-databind-2.6.7.5.jar +0 -0
- metadata +11 -12
- data/classpath/embulk-parser-msgpack-0.4.0.jar +0 -0
- data/classpath/embulk-util-dynamic-0.1.1.jar +0 -0
- data/classpath/jackson-databind-2.6.7.jar +0 -0
- data/lib/embulk/guess/msgpack.rb +0 -89
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1151f4ffe7c9c04d7465ca6eba40d69653bab9a9959db2bdebd3d4543e775976
|
|
4
|
+
data.tar.gz: d652ff5e113fa303139885c067cf9f330e7c6b0c217441b9561e63ae71efe207
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad8c531c1734b60383f7a67b0390443f3a7ae11d90cb943bf085a325e6c59f901bf196016c6944b79e8c5c0f00fb234bc72ad6068709ac8b779ae354756666f8
|
|
7
|
+
data.tar.gz: 62698fc8bd529cbc4b8bf0832c9685376739bdc9c0743388535a5b280e9a5c4397ea0b10c62239a8cf917dd449a548303b0703edeca256025d073191bbc3e7b1
|
data/NOTICE
CHANGED
|
@@ -1,17 +1,66 @@
|
|
|
1
1
|
embulk-parser-msgpack
|
|
2
|
-
Copyright 2015-
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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
|
+
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:
|
|
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@
|
|
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.
|
|
27
|
-
- classpath/embulk-util-config-0.3.
|
|
28
|
-
- classpath/embulk-util-dynamic-0.
|
|
29
|
-
- classpath/embulk-util-
|
|
30
|
-
- classpath/embulk-util-
|
|
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
|
-
|
|
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
|
|
Binary file
|
|
Binary file
|
data/lib/embulk/guess/msgpack.rb
DELETED
|
@@ -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
|