Package io.openlineage.client
Class OpenLineageClientUtils
- java.lang.Object
-
- io.openlineage.client.OpenLineageClientUtils
-
public final class OpenLineageClientUtils extends java.lang.ObjectUtilities class forOpenLineageClient.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOpenLineageClientUtils.DisabledFacetsMixin
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigureObjectMapper(java.lang.String[] disableFacets)Configure object mapper to exclude specified facets from being serializedstatic <T> TconvertValue(java.lang.Object fromValue, java.lang.Class<T> toValueType)static <T> TfromJson(@NonNull java.lang.String json, @NonNull com.fasterxml.jackson.core.type.TypeReference<T> type)Converts the provided Jsonstringto the specifiedtype.static OpenLineageYamlloadOpenLineageYaml(ConfigPathProvider configPathProvider)static OpenLineageYamlloadOpenLineageYaml(java.io.InputStream inputStream)static <T,F>
TmergeFacets(java.util.Map<java.lang.String,F> facetsMap, T facetsContainer, java.lang.Class<T> klass)Create a new instance of the facets container with all values merged from the original facetsContainer and the given facets Map, with precedence given to the facets Map.static com.fasterxml.jackson.databind.ObjectMappernewObjectMapper()Returns a newObjectMapperinstance.static OpenLineage.RunEventrunEventFromJson(@NonNull java.lang.String json)Converts the provided JsonstringtoOpenLineage.RunEvent.static java.lang.StringtoJson(@NonNull java.lang.Object value)Converts the providedvalueto a Jsonstring.static java.net.URItoUri(@NonNull java.lang.String urlString)Converts the providedurlStringto anURIobject.
-
-
-
Method Detail
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
Returns a newObjectMapperinstance.
-
configureObjectMapper
public static void configureObjectMapper(java.lang.String[] disableFacets)
Configure object mapper to exclude specified facets from being serialized- Parameters:
disableFacets-
-
toJson
public static java.lang.String toJson(@NonNull @NonNull java.lang.Object value)Converts the providedvalueto a Jsonstring.
-
fromJson
public static <T> T fromJson(@NonNull @NonNull java.lang.String json, @NonNull @NonNull com.fasterxml.jackson.core.type.TypeReference<T> type)Converts the provided Jsonstringto the specifiedtype.
-
runEventFromJson
public static OpenLineage.RunEvent runEventFromJson(@NonNull @NonNull java.lang.String json)
Converts the provided JsonstringtoOpenLineage.RunEvent. Useful as other `fromJson` method gets shaded.
-
convertValue
public static <T> T convertValue(java.lang.Object fromValue, java.lang.Class<T> toValueType)
-
mergeFacets
public static <T,F> T mergeFacets(java.util.Map<java.lang.String,F> facetsMap, T facetsContainer, java.lang.Class<T> klass)Create a new instance of the facets container with all values merged from the original facetsContainer and the given facets Map, with precedence given to the facets Map.
-
toUri
public static java.net.URI toUri(@NonNull @NonNull java.lang.String urlString)Converts the providedurlStringto anURIobject.
-
loadOpenLineageYaml
public static OpenLineageYaml loadOpenLineageYaml(ConfigPathProvider configPathProvider)
-
loadOpenLineageYaml
public static OpenLineageYaml loadOpenLineageYaml(java.io.InputStream inputStream)
-
-