public class SslConsumerFactoryFn
extends java.lang.Object
implements org.apache.beam.sdk.transforms.SerializableFunction<java.util.Map<java.lang.String,java.lang.Object>,org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>>
| Constructor and Description |
|---|
SslConsumerFactoryFn(java.util.Map<java.lang.String,java.lang.String> sslConfig) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> |
apply(java.util.Map<java.lang.String,java.lang.Object> config) |
static void |
getGcsFileAsLocal(java.lang.String gcsFilePath,
java.lang.String outputFilePath)
Reads a file from GCS and writes it locally.
|
public SslConsumerFactoryFn(java.util.Map<java.lang.String,java.lang.String> sslConfig)
public org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> apply(java.util.Map<java.lang.String,java.lang.Object> config)
apply in interface org.apache.beam.sdk.transforms.ProcessFunction<java.util.Map<java.lang.String,java.lang.Object>,org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>>apply in interface org.apache.beam.sdk.transforms.SerializableFunction<java.util.Map<java.lang.String,java.lang.Object>,org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>>public static void getGcsFileAsLocal(java.lang.String gcsFilePath,
java.lang.String outputFilePath)
throws java.io.IOException
gcsFilePath - path to file in GCS in format "gs://your-bucket/path/to/file"outputFilePath - path where to save file locallyjava.io.IOException - thrown if not able to read or write file