Package google.registry.beam
Class BeamUtils
- java.lang.Object
-
- google.registry.beam.BeamUtils
-
public class BeamUtils extends java.lang.Object
Static utilities forBeam
pipelines.
-
-
Constructor Summary
Constructors Constructor Description BeamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkFieldsNotNull(com.google.common.collect.ImmutableList<java.lang.String> fieldNames, org.apache.beam.sdk.io.gcp.bigquery.SchemaAndRecord schemaAndRecord)
Checks that no expected fields in the record are missing.static java.lang.String
createJobName(java.lang.String prefix, Clock clock)
Creates a beam job name and validates that it conforms to the requirements.static java.lang.String
extractField(org.apache.avro.generic.GenericRecord record, java.lang.String fieldName)
Extracts a string representation of a field in aGenericRecord
.
-
-
-
Method Detail
-
extractField
public static java.lang.String extractField(org.apache.avro.generic.GenericRecord record, java.lang.String fieldName)
Extracts a string representation of a field in aGenericRecord
.
-
checkFieldsNotNull
public static void checkFieldsNotNull(com.google.common.collect.ImmutableList<java.lang.String> fieldNames, org.apache.beam.sdk.io.gcp.bigquery.SchemaAndRecord schemaAndRecord)
Checks that no expected fields in the record are missing.Note that this simply makes sure the field is not null; it may still generate a parse error when interpreting the string representation of an object.
- Throws:
java.lang.IllegalStateException
- if the record returns null for any field infieldNames
-
createJobName
public static java.lang.String createJobName(java.lang.String prefix, Clock clock)
Creates a beam job name and validates that it conforms to the requirements.
-
-