embulk-input-randomj 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80940df748778e63b5d6019491a77f3384edfaef
4
- data.tar.gz: 2b1c36d3d2f6199c891237dd91319d3cba0ebb41
3
+ metadata.gz: 02171e37d576c90cc852682e1840fb7ffa99a2bb
4
+ data.tar.gz: 37cf924f4584b8457dd918291bcb23aae68ab13e
5
5
  SHA512:
6
- metadata.gz: 0674991a91411e6f0e7193c584a55422ad302567d0ae7c48f1ff6467af0bfff7a775e140b7a41afea6121a56c87e99b5df39ac4f3c8b21640bc00caa38e00b35
7
- data.tar.gz: a72e7980a5ac26160917003444249714762d7e8e6221adf936b93bfb8131c3c58c50f443e136de6202a40a9f2983dbf4a06e98189b027f68c9f872a028af1b24
6
+ metadata.gz: 27123e79c34a9c01f950d984835d0777087d568f7e30c9fc32c6ede1434add8605ebe1f7daed7996884a432586fde29a39e105e112cf574221bc910ea258ed54
7
+ data.tar.gz: ac416c1b693ff0601b15dcf4ab009cf2fa92f7a8d68bbd07dc297ece7975c5a7fa7d5642472c7a3c0853957d494047b2fac7acd11b8f2cd17049423489216022
@@ -13,14 +13,14 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.1.4"
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.25"
23
- provided "org.embulk:embulk-core:0.8.25"
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 = true
46
+ ignoreFailures = false
47
47
  }
48
48
  checkstyleTest {
49
49
  configFile = file("${project.rootDir}/config/checkstyle/default.xml")
@@ -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.0" type="JAVA_MODULE" version="4">
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
- #Sat Jul 01 14:55:34 JST 2017
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-all.zip
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
- public int getRows();
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
- public int getThreads();
46
+ Integer getThreads();
47
47
 
48
48
  @Config("primary_key")
49
49
  @ConfigDefault("")
50
50
  String getPrimaryKey();
51
51
 
52
52
  @Config("schema")
53
- public SchemaConfig getSchema();
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 = (Integer) task.getRows();
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 (int i = 0; i < schema.size(); i++) {
99
- Column column = schema.getColumn(i);
100
- Type type = column.getType();
101
- switch (type.getName()) {
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
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-07-15 00:00:00.000000000 Z
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.4.jar
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