embulk-filter-speedometer 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/build.gradle +1 -1
- data/classpath/{embulk-filter-speedometer-0.3.1.jar → embulk-filter-speedometer-0.3.2.jar} +0 -0
- data/src/integration-test/java/org/embulk/filter/TestSingleRun.java +14 -4
- data/src/main/java/org/embulk/filter/SpeedometerFilterPlugin.java +0 -3
- data/src/test/java/org/embulk/filter/TestSpeedometerFilterPlugin.java +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958b4d942aed7b7887b9e1ef551eff708fc6c772
|
4
|
+
data.tar.gz: 494333e5bdf90fe38a4b4cb2bfe51d3fd4243ae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a079f858ae03565450f89bfcb549da32cdc4ee0decbb132ae711a9a48e99b8a084f92ad22f02843d57324879ba17863ebb5db643acd681d626f610ebc9385716
|
7
|
+
data.tar.gz: 61c318a6d621d39f54a4493e7113d94dd273c7bb417a01bcd91e91945cdad10f54fddbdbe40fafaac1c3aece860fe6ecd7c7fdbe084fcf5be8dd335815dd6e7c
|
data/.travis.yml
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
language: java
|
2
|
-
script: ./gradlew -DenableIntegrationTest=true gem
|
3
|
-
|
2
|
+
script: ./gradlew --info -DenableIntegrationTest=true gem
|
3
|
+
after_failure: "ls -al /home/travis/build/hata/embulk-filter-speedometer/build/tmp/integrationTest/embulk/; cat /home/travis/build/hata/embulk-filter-speedometer/build/tmp/integrationTest/embulk/config_big.yml.run.log"
|
data/build.gradle
CHANGED
Binary file
|
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertTrue;
|
|
5
5
|
|
6
6
|
import java.io.BufferedReader;
|
7
7
|
import java.io.File;
|
8
|
+
import java.io.FilenameFilter;
|
8
9
|
import java.io.FileInputStream;
|
9
10
|
import java.io.FileReader;
|
10
11
|
import java.io.InputStreamReader;
|
@@ -29,12 +30,12 @@ public class TestSingleRun {
|
|
29
30
|
|
30
31
|
@Test
|
31
32
|
public void testValidateMinOutputFile() throws Exception {
|
32
|
-
validateResultFiles("min_01.csv.gz", "
|
33
|
+
validateResultFiles("min_01.csv.gz", "result_min_");
|
33
34
|
}
|
34
35
|
|
35
36
|
@Test
|
36
37
|
public void testValidateBigOutputFile() throws Exception {
|
37
|
-
validateResultFiles("big_01.csv.gz", "
|
38
|
+
validateResultFiles("big_01.csv.gz", "result_big_");
|
38
39
|
}
|
39
40
|
|
40
41
|
@Test
|
@@ -62,7 +63,7 @@ public class TestSingleRun {
|
|
62
63
|
assertTrue("Verify there are speedometer log lines.", found);
|
63
64
|
}
|
64
65
|
|
65
|
-
private void validateResultFiles(String gzipSrcFile, String
|
66
|
+
private void validateResultFiles(String gzipSrcFile, final String prefix) throws Exception {
|
66
67
|
ArrayList inList = new ArrayList();
|
67
68
|
ArrayList outList = new ArrayList();
|
68
69
|
|
@@ -76,6 +77,14 @@ public class TestSingleRun {
|
|
76
77
|
}
|
77
78
|
}
|
78
79
|
|
80
|
+
// In travis env, there are many cpus and it may be different from
|
81
|
+
// my local environment. From this, list all files using File.list method.
|
82
|
+
String[] resultFiles = new File(TEST_DIR).list(new FilenameFilter() {
|
83
|
+
public boolean accept(File dir, String name) {
|
84
|
+
return name.startsWith(prefix) && name.endsWith(".csv");
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
79
88
|
for (String resultFile : resultFiles) {
|
80
89
|
try (BufferedReader reader = new BufferedReader(new FileReader(getTestFile(resultFile)))) {
|
81
90
|
String line = reader.readLine(); // Discard a header line
|
@@ -90,6 +99,7 @@ public class TestSingleRun {
|
|
90
99
|
Collections.sort(inList);
|
91
100
|
Collections.sort(outList);
|
92
101
|
|
93
|
-
assertEquals("Verify input and output lines are identical."
|
102
|
+
assertEquals("Verify input and output lines are identical. in:" +
|
103
|
+
inList.size() + ", out:" + outList.size(), inList.toString(), outList.toString());
|
94
104
|
}
|
95
105
|
}
|
@@ -89,7 +89,6 @@ public class SpeedometerFilterPlugin
|
|
89
89
|
private final SpeedometerSpeedController controller;
|
90
90
|
private final Schema schema;
|
91
91
|
private final TimestampFormatter[] timestampFormatters;
|
92
|
-
private final PageOutput pageOutput;
|
93
92
|
private final PageReader pageReader;
|
94
93
|
private final BufferAllocator allocator;
|
95
94
|
private final int delimiterLength;
|
@@ -99,7 +98,6 @@ public class SpeedometerFilterPlugin
|
|
99
98
|
SpeedControlPageOutput(PluginTask task, Schema schema, PageOutput pageOutput) {
|
100
99
|
this.controller = new SpeedometerSpeedController(task, SpeedometerSpeedAggregator.getInstance());
|
101
100
|
this.schema = schema;
|
102
|
-
this.pageOutput = pageOutput;
|
103
101
|
this.allocator = task.getBufferAllocator();
|
104
102
|
this.delimiterLength = task.getDelimiter().length();
|
105
103
|
this.recordPaddingSize = task.getRecordPaddingSize();
|
@@ -130,7 +128,6 @@ public class SpeedometerFilterPlugin
|
|
130
128
|
controller.stop();
|
131
129
|
pageBuilder.close();
|
132
130
|
pageReader.close();
|
133
|
-
pageOutput.close();
|
134
131
|
}
|
135
132
|
|
136
133
|
class ColumnVisitorImpl implements ColumnVisitor {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-filter-speedometer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hata
|
@@ -68,7 +68,7 @@ files:
|
|
68
68
|
- src/test/java/org/embulk/filter/TestSpeedometerSpeedAggregator.java
|
69
69
|
- src/test/java/org/embulk/filter/TestSpeedometerSpeedController.java
|
70
70
|
- src/test/java/org/embulk/filter/TestSpeedometerUtil.java
|
71
|
-
- classpath/embulk-filter-speedometer-0.3.
|
71
|
+
- classpath/embulk-filter-speedometer-0.3.2.jar
|
72
72
|
homepage: https://github.com/hata/embulk-filter-speedometer
|
73
73
|
licenses:
|
74
74
|
- MIT
|