File tree Expand file tree Collapse file tree 11 files changed +15
-18
lines changed
src/main/java/org/apache/beam/samples
src/main/java/org/apache/beam/samples
main/java/com/example/dataflow
test/java/com/example/dataflow Expand file tree Collapse file tree 11 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 40
40
<maven-exec-plugin .version>3.0.0</maven-exec-plugin .version>
41
41
<maven-jar-plugin .version>3.2.0</maven-jar-plugin .version>
42
42
<maven-shade-plugin .version>3.2.4</maven-shade-plugin .version>
43
- <log4j2 .version>2.15 .0</log4j2 .version>
43
+ <log4j2 .version>2.16 .0</log4j2 .version>
44
44
</properties >
45
45
46
46
<repositories >
Original file line number Diff line number Diff line change 41
41
<maven-compiler-plugin .version>3.8.1</maven-compiler-plugin .version>
42
42
<maven-shade-plugin .version>3.2.4</maven-shade-plugin .version>
43
43
<maven-exec-plugin .version>3.0.0</maven-exec-plugin .version>
44
- <log4j2 .version>2.15 .0</log4j2 .version>
44
+ <log4j2 .version>2.16 .0</log4j2 .version>
45
45
</properties >
46
46
47
47
<repositories >
Original file line number Diff line number Diff line change 39
39
import org .apache .beam .sdk .transforms .windowing .Window ;
40
40
import org .apache .beam .sdk .values .TypeDescriptor ;
41
41
import org .apache .kafka .common .serialization .StringDeserializer ;
42
+ import org .apache .logging .log4j .LogManager ;
43
+ import org .apache .logging .log4j .Logger ;
42
44
import org .joda .time .Duration ;
43
45
import org .joda .time .Instant ;
44
- import org .slf4j .Logger ;
45
- import org .slf4j .LoggerFactory ;
46
46
47
47
/**
48
48
* An Apache Beam pipeline that reads JSON encoded messages from Kafka and
49
49
* writes them to a BigQuery table.
50
50
*/
51
51
public class KafkaToBigQuery {
52
- private static final Logger LOG = LoggerFactory .getLogger (KafkaToBigQuery .class );
52
+ private static final Logger LOG = LogManager .getLogger (KafkaToBigQuery .class );
53
53
private static final Gson GSON = new Gson ();
54
54
55
55
public interface Options extends StreamingOptions {
Original file line number Diff line number Diff line change 40
40
<maven-compiler-plugin .version>3.8.1</maven-compiler-plugin .version>
41
41
<maven-shade-plugin .version>3.2.4</maven-shade-plugin .version>
42
42
<maven-exec-plugin .version>3.0.0</maven-exec-plugin .version>
43
- <log4j2 .version>2.15 .0</log4j2 .version>
43
+ <log4j2 .version>2.16 .0</log4j2 .version>
44
44
</properties >
45
45
46
46
<repositories >
Original file line number Diff line number Diff line change 42
42
import org .apache .beam .sdk .transforms .windowing .Window ;
43
43
import org .apache .beam .sdk .values .Row ;
44
44
import org .apache .beam .sdk .values .TypeDescriptor ;
45
+ import org .apache .logging .log4j .LogManager ;
46
+ import org .apache .logging .log4j .Logger ;
45
47
import org .joda .time .Duration ;
46
48
import org .joda .time .Instant ;
47
- import org .slf4j .Logger ;
48
- import org .slf4j .LoggerFactory ;
49
49
50
50
/**
51
51
* An Apache Beam streaming pipeline that reads JSON encoded messages fromPub/Sub,
52
52
* uses Beam SQL to transform the message data, and writes the results to a BigQuery.
53
53
*/
54
54
public class StreamingBeamSql {
55
- private static final Logger LOG = LoggerFactory .getLogger (StreamingBeamSql .class );
55
+ private static final Logger LOG = LogManager .getLogger (StreamingBeamSql .class );
56
56
private static final Gson GSON = new Gson ();
57
57
58
58
public interface Options extends StreamingOptions {
Original file line number Diff line number Diff line change 39
39
<maven .compiler.source>1.8</maven .compiler.source>
40
40
<maven .compiler.target>1.8</maven .compiler.target>
41
41
<apache_beam .version>2.31.0</apache_beam .version>
42
- <log4j2 .version>2.15 .0</log4j2 .version>
42
+ <log4j2 .version>2.16 .0</log4j2 .version>
43
43
</properties >
44
44
45
45
<build >
Original file line number Diff line number Diff line change 29
29
import org .apache .beam .sdk .transforms .DoFn ;
30
30
import org .apache .beam .sdk .transforms .ParDo ;
31
31
import org .apache .beam .sdk .values .PCollection ;
32
- import org .slf4j . Logger ;
33
- import org .slf4j . LoggerFactory ;
32
+ import org .apache . logging . log4j . LogManager ;
33
+ import org .apache . logging . log4j . Logger ;
34
34
35
35
/*
36
36
This sample demonstrates how to write to a Spanner table.
@@ -128,7 +128,7 @@ static class Album {
128
128
* singer_id\tfirstName\tlastName
129
129
*/
130
130
static class ParseSinger extends DoFn <String , Singer > {
131
- private static final Logger LOG = LoggerFactory .getLogger (ParseSinger .class );
131
+ private static final Logger LOG = LogManager .getLogger (ParseSinger .class );
132
132
133
133
@ ProcessElement
134
134
public void processElement (ProcessContext c ) {
@@ -149,7 +149,7 @@ public void processElement(ProcessContext c) {
149
149
* singer_id\talbumId\talbumTitle
150
150
*/
151
151
static class ParseAlbum extends DoFn <String , Album > {
152
- private static final Logger LOG = LoggerFactory .getLogger (ParseAlbum .class );
152
+ private static final Logger LOG = LogManager .getLogger (ParseAlbum .class );
153
153
154
154
@ ProcessElement
155
155
public void processElement (ProcessContext c ) {
Original file line number Diff line number Diff line change 40
40
import java .util .Arrays ;
41
41
import java .util .List ;
42
42
import java .util .Random ;
43
- import java .util .UUID ;
44
43
import java .util .stream .Collectors ;
45
44
import java .util .stream .IntStream ;
46
45
import javax .annotation .Nullable ;
Original file line number Diff line number Diff line change 35
35
import java .util .Arrays ;
36
36
import java .util .List ;
37
37
import java .util .Random ;
38
- import java .util .UUID ;
39
38
import java .util .concurrent .ExecutionException ;
40
39
import java .util .stream .Collectors ;
41
40
import javax .annotation .Nullable ;
Original file line number Diff line number Diff line change 35
35
import java .nio .file .Path ;
36
36
import java .util .Arrays ;
37
37
import java .util .Random ;
38
- import java .util .UUID ;
39
38
import java .util .stream .Collectors ;
40
39
import java .util .stream .Stream ;
41
40
import org .junit .After ;
Original file line number Diff line number Diff line change 40
40
<maven-exec-plugin .version>3.0.0</maven-exec-plugin .version>
41
41
<maven-jar-plugin .version>3.2.0</maven-jar-plugin .version>
42
42
<maven-shade-plugin .version>3.2.4</maven-shade-plugin .version>
43
- <log4j2 .version>2.15 .0</log4j2 .version>
43
+ <log4j2 .version>2.16 .0</log4j2 .version>
44
44
</properties >
45
45
46
46
<repositories >
You can’t perform that action at this time.
0 commit comments