embulk-parser-msgpack 0.5.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: f19e6789f9e7241a7b74e6b00243b760a076f319f5173be87b40e45626bc423a
4
- data.tar.gz: 2ef61fbc23e9ac71c4b9ce90139b5932b4fd9259c283d7cde51079865afb6003
3
+ metadata.gz: 1151f4ffe7c9c04d7465ca6eba40d69653bab9a9959db2bdebd3d4543e775976
4
+ data.tar.gz: d652ff5e113fa303139885c067cf9f330e7c6b0c217441b9561e63ae71efe207
5
5
  SHA512:
6
- metadata.gz: 11ffe9995f6b11b14a181a72c7bcd6d1be0c8a5f1fc9038a4136cc7e0ba7d2f673a66206fd145a33a853950ef6b0790522819f6a509f128fb35590183065d8ce
7
- data.tar.gz: 8e0364112024ad49292a5c0f55628478cfc36f6aedc35164567db3a91162661b1b88b43c5138ac8eb1d28e7043359be81648d34704c97106da9cd2fe8b666048
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.5.0
4
+ version: 0.6.0
5
5
  platform: java
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-10-18 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:
@@ -23,9 +23,10 @@ extra_rdoc_files: []
23
23
  files:
24
24
  - LICENSE
25
25
  - NOTICE
26
- - classpath/embulk-parser-msgpack-0.5.0.jar
26
+ - classpath/embulk-parser-msgpack-0.6.0.jar
27
27
  - classpath/embulk-util-config-0.3.4.jar
28
- - classpath/embulk-util-dynamic-0.1.1.jar
28
+ - classpath/embulk-util-dynamic-0.2.1.jar
29
+ - classpath/embulk-util-msgpack-0.8.24.1.jar
29
30
  - classpath/embulk-util-rubytime-0.3.3.jar
30
31
  - classpath/embulk-util-timestamp-0.2.2.jar
31
32
  - classpath/jackson-annotations-2.6.7.jar
@@ -33,7 +34,6 @@ files:
33
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:
@@ -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