Skip to content

Commit 146fc1d

Browse files
authored
Merge pull request #279 from spotify/up1
Beam 2.28 and other upgrades
2 parents cd1b4dd + 9540784 commit 146fc1d

4 files changed

Lines changed: 120 additions & 168 deletions

File tree

dbeam-core/src/main/java/com/spotify/dbeam/avro/JdbcAvroMetering.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class JdbcAvroMetering {
4141
private Gauge rowsPerMinute = Metrics.gauge(this.getClass().getCanonicalName(), "rowsPerMinute");
4242
private Counter bytesWritten =
4343
Metrics.counter(this.getClass().getCanonicalName(), "bytesWritten");
44-
private int rowCount = 0;
44+
private long rowCount = 0;
4545
private long writeIterateStartTime;
4646

4747
public JdbcAvroMetering(int countReportEvery, int logEvery) {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*-
2+
* -\-\-
3+
* DBeam Core
4+
* --
5+
* Copyright (C) 2016 - 2019 Spotify AB
6+
* --
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* -/-/-
19+
*/
20+
21+
package com.spotify.dbeam.beam;
22+
23+
import java.io.FileNotFoundException;
24+
import java.io.IOException;
25+
import org.apache.beam.sdk.io.FileSystems;
26+
import org.apache.beam.sdk.options.PipelineOptionsFactory;
27+
import org.junit.Test;
28+
29+
public class BeamHelperTest {
30+
31+
@Test(expected = FileNotFoundException.class)
32+
public void shouldWorkWithGcs() throws IOException {
33+
FileSystems.setDefaultPipelineOptions(PipelineOptionsFactory.create());
34+
// This test ensures that gcsio / GcsUtil work properly and have the right classes on classpath
35+
BeamHelper.readFromFile("gs://does-not-exist-1");
36+
}
37+
38+
}

dbeam-core/src/test/java/com/spotify/dbeam/options/PasswordReaderTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ public void shouldDecryptPasswordOnpasswordFileKmsEncryptedParameter() throws IO
8585

8686
Assert.assertEquals(Optional.of("something_decrypted"), actualPassword);
8787
}
88+
8889
}

0 commit comments

Comments
 (0)