embulk-input-randomj 0.1.4 → 0.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02171e37d576c90cc852682e1840fb7ffa99a2bb
|
4
|
+
data.tar.gz: 37cf924f4584b8457dd918291bcb23aae68ab13e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27123e79c34a9c01f950d984835d0777087d568f7e30c9fc32c6ede1434add8605ebe1f7daed7996884a432586fde29a39e105e112cf574221bc910ea258ed54
|
7
|
+
data.tar.gz: ac416c1b693ff0601b15dcf4ab009cf2fa92f7a8d68bbd07dc297ece7975c5a7fa7d5642472c7a3c0853957d494047b2fac7acd11b8f2cd17049423489216022
|
data/build.gradle
CHANGED
@@ -13,14 +13,14 @@ configurations {
|
|
13
13
|
provided
|
14
14
|
}
|
15
15
|
|
16
|
-
version = "0.1.
|
16
|
+
version = "0.1.5"
|
17
17
|
|
18
18
|
sourceCompatibility = 1.8
|
19
19
|
targetCompatibility = 1.8
|
20
20
|
|
21
21
|
dependencies {
|
22
|
-
compile "org.embulk:embulk-core:0.8.
|
23
|
-
provided "org.embulk:embulk-core:0.8.
|
22
|
+
compile "org.embulk:embulk-core:0.8.28"
|
23
|
+
provided "org.embulk:embulk-core:0.8.28"
|
24
24
|
// compile "YOUR_JAR_DEPENDENCY_GROUP:YOUR_JAR_DEPENDENCY_MODULE:YOUR_JAR_DEPENDENCY_VERSION"
|
25
25
|
|
26
26
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.4'
|
@@ -43,7 +43,7 @@ checkstyle {
|
|
43
43
|
}
|
44
44
|
checkstyleMain {
|
45
45
|
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
|
46
|
-
ignoreFailures =
|
46
|
+
ignoreFailures = false
|
47
47
|
}
|
48
48
|
checkstyleTest {
|
49
49
|
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
|
data/embulk-input-randomj.iml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module external.linked.project.id="embulk-input-randomj" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.1.
|
2
|
+
<module external.linked.project.id="embulk-input-randomj" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.1.5" type="JAVA_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
4
|
<exclude-output />
|
5
5
|
<content url="file://$MODULE_DIR$">
|
6
6
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/build" />
|
8
|
+
<excludeFolder url="file://$MODULE_DIR$/out" />
|
8
9
|
</content>
|
9
10
|
<orderEntry type="inheritedJdk" />
|
10
11
|
<orderEntry type="sourceFolder" forTests="false" />
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
#Sun Jan 08 00:35:58 PST 2017
|
2
2
|
distributionBase=GRADLE_USER_HOME
|
3
3
|
distributionPath=wrapper/dists
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
5
5
|
zipStorePath=wrapper/dists
|
6
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-
|
6
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
|
@@ -38,19 +38,19 @@ public class RandomjInputPlugin
|
|
38
38
|
{
|
39
39
|
// configuration row (required integer)
|
40
40
|
@Config("rows")
|
41
|
-
|
41
|
+
int getRows();
|
42
42
|
|
43
43
|
// ref: https://github.com/embulk/embulk-input-jdbc/blob/master/embulk-input-mysql/src/main/java/org/embulk/input/MySQLInputPlugin.java#L33-L35
|
44
44
|
@Config("threads")
|
45
45
|
@ConfigDefault("1")
|
46
|
-
|
46
|
+
Integer getThreads();
|
47
47
|
|
48
48
|
@Config("primary_key")
|
49
49
|
@ConfigDefault("")
|
50
50
|
String getPrimaryKey();
|
51
51
|
|
52
52
|
@Config("schema")
|
53
|
-
|
53
|
+
SchemaConfig getSchema();
|
54
54
|
}
|
55
55
|
|
56
56
|
@Override
|
@@ -87,7 +87,7 @@ public class RandomjInputPlugin
|
|
87
87
|
PageOutput output)
|
88
88
|
{
|
89
89
|
PluginTask task = taskSource.loadTask(PluginTask.class);
|
90
|
-
Integer rows =
|
90
|
+
Integer rows = task.getRows();
|
91
91
|
try (PageBuilder pagebuilder =
|
92
92
|
new PageBuilder(Exec.getBufferAllocator(), schema, output)) {
|
93
93
|
Random rnd = new Random();
|
@@ -95,10 +95,10 @@ public class RandomjInputPlugin
|
|
95
95
|
taskIndex * rows + 1,
|
96
96
|
taskIndex * rows + rows
|
97
97
|
).boxed().forEach(rowNumber -> {
|
98
|
-
for (
|
99
|
-
|
100
|
-
Type
|
101
|
-
switch (
|
98
|
+
for (Column column : schema.getColumns()) {
|
99
|
+
final Integer i = column.getIndex();
|
100
|
+
Type t = column.getType();
|
101
|
+
switch (t.getName()) {
|
102
102
|
case "long":
|
103
103
|
final String pk = task.getPrimaryKey();
|
104
104
|
if (column.getName().equals(pk)) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-randomj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yuokada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ files:
|
|
63
63
|
- src/test/java/org/embulk/input/randomj/TestRandomjInputPlugin.java
|
64
64
|
- classpath/commons-lang3-3.5.jar
|
65
65
|
- classpath/commons-text-1.1.jar
|
66
|
-
- classpath/embulk-input-randomj-0.1.
|
66
|
+
- classpath/embulk-input-randomj-0.1.5.jar
|
67
67
|
homepage: https://github.com/yuokada/embulk-input-randomj
|
68
68
|
licenses:
|
69
69
|
- MIT
|