From c6c736d94ea9f5bc6e9332316d115822740e1763 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 20 Dec 2024 21:30:20 +0000 Subject: [PATCH] debug info --- .../org/apache/beam/sdk/util/SerializableUtils.java | 7 ++++--- .../io/aws2/kinesis/KinesisTransformRegistrar.java | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java index 20dfcf75cc4..43c0b343c3b 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java @@ -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; @@ -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); } diff --git a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java index 0908071646a..b7e71fe18f4 100644 --- a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java +++ b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java @@ -108,10 +108,10 @@ public PTransform, 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 writeTransform = @@ -218,10 +218,10 @@ public PTransform> 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 =