Skip to content

Commit

Permalink
debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm committed Dec 20, 2024
1 parent d137832 commit c6c736d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import static org.apache.beam.sdk.util.CoderUtils.encodeToByteArray;
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.JsonMappingException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -61,7 +61,8 @@ public static byte[] serializeToByteArray(Serializable value) {
} catch (IOException exn) {
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
try {
throw new IllegalArgumentException("unable to serialize " + ow.writeValueAsString(value), exn);
throw new IllegalArgumentException(
"unable to serialize " + ow.writeValueAsString(value), exn);
} catch (JsonProcessingException ex) {
throw new IllegalArgumentException("unable to jsonify " + value, exn);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ public PTransform<PCollection<byte[]>, KinesisIO.Write.Result> buildExternal(
if (configuration.serviceEndpoint != null) {
try {
endpoint = new URI(configuration.serviceEndpoint);
}
catch (URISyntaxException ex) {
} catch (URISyntaxException ex) {
throw new RuntimeException(
String.format("Service endpoint must be URI format, got: %s", configuration.serviceEndpoint));
String.format(
"Service endpoint must be URI format, got: %s", configuration.serviceEndpoint));
}
}
KinesisIO.Write<byte[]> writeTransform =
Expand Down Expand Up @@ -218,10 +218,10 @@ public PTransform<PBegin, PCollection<byte[]>> buildExternal(
if (configuration.serviceEndpoint != null) {
try {
endpoint = new URI(configuration.serviceEndpoint);
}
catch (URISyntaxException ex) {
} catch (URISyntaxException ex) {
throw new RuntimeException(
String.format("Service endpoint must be URI format, got: %s", configuration.serviceEndpoint));
String.format(
"Service endpoint must be URI format, got: %s", configuration.serviceEndpoint));
}
}
KinesisIO.Read readTransform =
Expand Down

0 comments on commit c6c736d

Please sign in to comment.