File tree Expand file tree Collapse file tree
main/java/com/spotify/dbeam/avro
test/java/com/spotify/dbeam Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change @@ -85,4 +85,5 @@ public void shouldDecryptPasswordOnpasswordFileKmsEncryptedParameter() throws IO
8585
8686 Assert .assertEquals (Optional .of ("something_decrypted" ), actualPassword );
8787 }
88+
8889}
You can’t perform that action at this time.
0 commit comments