embulk-input-td 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG.md +5 -0
- data/build.gradle +34 -10
- data/config/checkstyle/README.md +6 -0
- data/config/checkstyle/checkstyle-suppressions.xml +8 -0
- data/config/checkstyle/checkstyle.xml +195 -104
- data/config/checkstyle/google_checks.xml +218 -0
- data/embulk-input-td.gemspec +1 -1
- data/src/main/java/org/embulk/input/td/TdInputPlugin.java +301 -239
- data/src/main/java/org/embulk/input/td/writer/AbstractValueWriter.java +5 -8
- data/src/main/java/org/embulk/input/td/writer/BooleanValueWriter.java +4 -6
- data/src/main/java/org/embulk/input/td/writer/DoubleValueWriter.java +4 -6
- data/src/main/java/org/embulk/input/td/writer/JsonValueWriter.java +4 -6
- data/src/main/java/org/embulk/input/td/writer/LongValueWriter.java +4 -6
- data/src/main/java/org/embulk/input/td/writer/StringValueWriter.java +4 -6
- data/src/main/java/org/embulk/input/td/writer/ValueWriter.java +2 -2
- data/src/test/java/org/embulk/input/td/TestTdInputPlugin.java +1 -2
- metadata +7 -4
- data/config/checkstyle/default.xml +0 -108
@@ -5,24 +5,21 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public abstract class AbstractValueWriter
|
8
|
-
implements ValueWriter
|
9
|
-
|
8
|
+
implements ValueWriter {
|
9
|
+
|
10
10
|
protected final Column column;
|
11
11
|
protected final int index;
|
12
12
|
|
13
|
-
protected AbstractValueWriter(Column column)
|
14
|
-
{
|
13
|
+
protected AbstractValueWriter(Column column) {
|
15
14
|
this.column = column;
|
16
15
|
this.index = column.getIndex();
|
17
16
|
}
|
18
17
|
|
19
18
|
@Override
|
20
|
-
public void write(Value v, PageBuilder to)
|
21
|
-
{
|
19
|
+
public void write(final Value v, final PageBuilder to) {
|
22
20
|
if (v.isNilValue()) {
|
23
21
|
to.setNull(index);
|
24
|
-
}
|
25
|
-
else {
|
22
|
+
} else {
|
26
23
|
writeNotNull(v, to);
|
27
24
|
}
|
28
25
|
}
|
@@ -5,16 +5,14 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public class BooleanValueWriter
|
8
|
-
extends AbstractValueWriter
|
9
|
-
|
10
|
-
public BooleanValueWriter(Column column)
|
11
|
-
{
|
8
|
+
extends AbstractValueWriter {
|
9
|
+
|
10
|
+
public BooleanValueWriter(final Column column) {
|
12
11
|
super(column);
|
13
12
|
}
|
14
13
|
|
15
14
|
@Override
|
16
|
-
public void writeNotNull(Value v, PageBuilder to)
|
17
|
-
{
|
15
|
+
public void writeNotNull(final Value v, final PageBuilder to) {
|
18
16
|
to.setBoolean(index, v.asBooleanValue().getBoolean());
|
19
17
|
}
|
20
18
|
}
|
@@ -5,16 +5,14 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public class DoubleValueWriter
|
8
|
-
extends AbstractValueWriter
|
9
|
-
|
10
|
-
public DoubleValueWriter(Column column)
|
11
|
-
{
|
8
|
+
extends AbstractValueWriter {
|
9
|
+
|
10
|
+
public DoubleValueWriter(final Column column) {
|
12
11
|
super(column);
|
13
12
|
}
|
14
13
|
|
15
14
|
@Override
|
16
|
-
public void writeNotNull(Value v, PageBuilder to)
|
17
|
-
{
|
15
|
+
public void writeNotNull(final Value v, final PageBuilder to) {
|
18
16
|
to.setDouble(index, v.asFloatValue().toDouble());
|
19
17
|
}
|
20
18
|
}
|
@@ -5,16 +5,14 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public class JsonValueWriter
|
8
|
-
extends AbstractValueWriter
|
9
|
-
|
10
|
-
public JsonValueWriter(Column column)
|
11
|
-
{
|
8
|
+
extends AbstractValueWriter {
|
9
|
+
|
10
|
+
public JsonValueWriter(final Column column) {
|
12
11
|
super(column);
|
13
12
|
}
|
14
13
|
|
15
14
|
@Override
|
16
|
-
public void writeNotNull(Value v, PageBuilder to)
|
17
|
-
{
|
15
|
+
public void writeNotNull(final Value v, final PageBuilder to) {
|
18
16
|
to.setJson(index, v);
|
19
17
|
}
|
20
18
|
}
|
@@ -5,16 +5,14 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public class LongValueWriter
|
8
|
-
extends AbstractValueWriter
|
9
|
-
|
10
|
-
public LongValueWriter(Column column)
|
11
|
-
{
|
8
|
+
extends AbstractValueWriter {
|
9
|
+
|
10
|
+
public LongValueWriter(final Column column) {
|
12
11
|
super(column);
|
13
12
|
}
|
14
13
|
|
15
14
|
@Override
|
16
|
-
public void writeNotNull(Value v, PageBuilder to)
|
17
|
-
{
|
15
|
+
public void writeNotNull(final Value v, final PageBuilder to) {
|
18
16
|
to.setLong(index, v.asIntegerValue().toLong());
|
19
17
|
}
|
20
18
|
}
|
@@ -5,16 +5,14 @@ import org.embulk.spi.PageBuilder;
|
|
5
5
|
import org.msgpack.value.Value;
|
6
6
|
|
7
7
|
public class StringValueWriter
|
8
|
-
extends AbstractValueWriter
|
9
|
-
|
10
|
-
public StringValueWriter(Column column)
|
11
|
-
{
|
8
|
+
extends AbstractValueWriter {
|
9
|
+
|
10
|
+
public StringValueWriter(final Column column) {
|
12
11
|
super(column);
|
13
12
|
}
|
14
13
|
|
15
14
|
@Override
|
16
|
-
public void writeNotNull(Value v, PageBuilder to)
|
17
|
-
{
|
15
|
+
public void writeNotNull(final Value v, final PageBuilder to) {
|
18
16
|
to.setString(index, v.asStringValue().asString());
|
19
17
|
}
|
20
18
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muga Nishizawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,11 +46,14 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- .gitignore
|
49
|
+
- .travis.yml
|
49
50
|
- CHANGELOG.md
|
50
51
|
- README.md
|
51
52
|
- build.gradle
|
53
|
+
- config/checkstyle/README.md
|
54
|
+
- config/checkstyle/checkstyle-suppressions.xml
|
52
55
|
- config/checkstyle/checkstyle.xml
|
53
|
-
- config/checkstyle/
|
56
|
+
- config/checkstyle/google_checks.xml
|
54
57
|
- embulk-input-td.gemspec
|
55
58
|
- gradle/wrapper/gradle-wrapper.jar
|
56
59
|
- gradle/wrapper/gradle-wrapper.properties
|
@@ -66,7 +69,7 @@ files:
|
|
66
69
|
- src/main/java/org/embulk/input/td/writer/StringValueWriter.java
|
67
70
|
- src/main/java/org/embulk/input/td/writer/ValueWriter.java
|
68
71
|
- src/test/java/org/embulk/input/td/TestTdInputPlugin.java
|
69
|
-
- classpath/embulk-input-td-0.2.
|
72
|
+
- classpath/embulk-input-td-0.2.1.jar
|
70
73
|
- classpath/hamcrest-core-1.1.jar
|
71
74
|
- classpath/jackson-datatype-json-org-2.6.7.jar
|
72
75
|
- classpath/jetty-client-9.2.22.v20170606.jar
|
@@ -1,108 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE module PUBLIC
|
3
|
-
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
4
|
-
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
5
|
-
<!--
|
6
|
-
This is a subset of ./checkstyle.xml which allows some loose styles
|
7
|
-
-->
|
8
|
-
<module name="Checker">
|
9
|
-
<module name="FileTabCharacter"/>
|
10
|
-
<module name="NewlineAtEndOfFile">
|
11
|
-
<property name="lineSeparator" value="lf"/>
|
12
|
-
</module>
|
13
|
-
<module name="RegexpMultiline">
|
14
|
-
<property name="format" value="\r"/>
|
15
|
-
<property name="message" value="Line contains carriage return"/>
|
16
|
-
</module>
|
17
|
-
<module name="RegexpMultiline">
|
18
|
-
<property name="format" value=" \n"/>
|
19
|
-
<property name="message" value="Line has trailing whitespace"/>
|
20
|
-
</module>
|
21
|
-
<module name="RegexpMultiline">
|
22
|
-
<property name="format" value="\n\n\n"/>
|
23
|
-
<property name="message" value="Multiple consecutive blank lines"/>
|
24
|
-
</module>
|
25
|
-
<module name="RegexpMultiline">
|
26
|
-
<property name="format" value="\n\n\Z"/>
|
27
|
-
<property name="message" value="Blank line before end of file"/>
|
28
|
-
</module>
|
29
|
-
|
30
|
-
<module name="TreeWalker">
|
31
|
-
<module name="EmptyBlock">
|
32
|
-
<property name="option" value="text"/>
|
33
|
-
<property name="tokens" value="
|
34
|
-
LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF,
|
35
|
-
LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT, STATIC_INIT"/>
|
36
|
-
</module>
|
37
|
-
<module name="EmptyStatement"/>
|
38
|
-
<module name="EmptyForInitializerPad"/>
|
39
|
-
<module name="EmptyForIteratorPad">
|
40
|
-
<property name="option" value="space"/>
|
41
|
-
</module>
|
42
|
-
<module name="MethodParamPad">
|
43
|
-
<property name="allowLineBreaks" value="true"/>
|
44
|
-
<property name="option" value="nospace"/>
|
45
|
-
</module>
|
46
|
-
<module name="ParenPad"/>
|
47
|
-
<module name="TypecastParenPad"/>
|
48
|
-
<module name="NeedBraces"/>
|
49
|
-
<module name="LeftCurly">
|
50
|
-
<property name="option" value="nl"/>
|
51
|
-
<property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, METHOD_DEF"/>
|
52
|
-
</module>
|
53
|
-
<module name="LeftCurly">
|
54
|
-
<property name="option" value="eol"/>
|
55
|
-
<property name="tokens" value="
|
56
|
-
LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR,
|
57
|
-
LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE"/>
|
58
|
-
</module>
|
59
|
-
<module name="RightCurly">
|
60
|
-
<property name="option" value="alone"/>
|
61
|
-
</module>
|
62
|
-
<module name="GenericWhitespace"/>
|
63
|
-
<module name="WhitespaceAfter"/>
|
64
|
-
<module name="NoWhitespaceBefore"/>
|
65
|
-
|
66
|
-
<module name="UpperEll"/>
|
67
|
-
<module name="DefaultComesLast"/>
|
68
|
-
<module name="ArrayTypeStyle"/>
|
69
|
-
<module name="MultipleVariableDeclarations"/>
|
70
|
-
<module name="ModifierOrder"/>
|
71
|
-
<module name="OneStatementPerLine"/>
|
72
|
-
<module name="StringLiteralEquality"/>
|
73
|
-
<module name="MutableException"/>
|
74
|
-
<module name="EqualsHashCode"/>
|
75
|
-
<module name="InnerAssignment"/>
|
76
|
-
<module name="InterfaceIsType"/>
|
77
|
-
<module name="HideUtilityClassConstructor"/>
|
78
|
-
|
79
|
-
<module name="MemberName"/>
|
80
|
-
<module name="LocalVariableName"/>
|
81
|
-
<module name="LocalFinalVariableName"/>
|
82
|
-
<module name="TypeName"/>
|
83
|
-
<module name="PackageName"/>
|
84
|
-
<module name="ParameterName"/>
|
85
|
-
<module name="StaticVariableName"/>
|
86
|
-
<module name="ClassTypeParameterName">
|
87
|
-
<property name="format" value="^[A-Z][0-9]?$"/>
|
88
|
-
</module>
|
89
|
-
<module name="MethodTypeParameterName">
|
90
|
-
<property name="format" value="^[A-Z][0-9]?$"/>
|
91
|
-
</module>
|
92
|
-
|
93
|
-
<module name="WhitespaceAround">
|
94
|
-
<property name="allowEmptyConstructors" value="true"/>
|
95
|
-
<property name="allowEmptyMethods" value="true"/>
|
96
|
-
<property name="ignoreEnhancedForColon" value="false"/>
|
97
|
-
<property name="tokens" value="
|
98
|
-
ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
|
99
|
-
BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE,
|
100
|
-
LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
|
101
|
-
LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
|
102
|
-
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
|
103
|
-
LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL,
|
104
|
-
PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN,
|
105
|
-
STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
|
106
|
-
</module>
|
107
|
-
</module>
|
108
|
-
</module>
|