Package io.openlineage.client
Class OpenLineageClientUtils
- java.lang.Object
-
- io.openlineage.client.OpenLineageClientUtils
-
public final class OpenLineageClientUtils extends java.lang.Object
Utilities class forOpenLineageClient
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
OpenLineageClientUtils.DisabledFacetsMixin
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
configureObjectMapper(java.lang.String[] disableFacets)
Configure object mapper to exclude specified facets from being serializedstatic <T> T
convertValue(java.lang.Object fromValue, java.lang.Class<T> toValueType)
static <T> T
fromJson(@NonNull java.lang.String json, @NonNull com.fasterxml.jackson.core.type.TypeReference<T> type)
Converts the provided Jsonstring
to the specifiedtype
.static OpenLineageYaml
loadOpenLineageYaml(ConfigPathProvider configPathProvider)
static OpenLineageYaml
loadOpenLineageYaml(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.ObjectMapper
newObjectMapper()
Returns a newObjectMapper
instance.static OpenLineage.RunEvent
runEventFromJson(@NonNull java.lang.String json)
Converts the provided Jsonstring
toOpenLineage.RunEvent
.static java.lang.String
toJson(@NonNull java.lang.Object value)
Converts the providedvalue
to a Jsonstring
.static java.net.URI
toUri(@NonNull java.lang.String urlString)
Converts the providedurlString
to anURI
object.
-
-
-
Method Detail
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
Returns a newObjectMapper
instance.
-
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 providedvalue
to 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 Jsonstring
to the specifiedtype
.
-
runEventFromJson
public static OpenLineage.RunEvent runEventFromJson(@NonNull @NonNull java.lang.String json)
Converts the provided Jsonstring
toOpenLineage.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 providedurlString
to anURI
object.
-
loadOpenLineageYaml
public static OpenLineageYaml loadOpenLineageYaml(ConfigPathProvider configPathProvider)
-
loadOpenLineageYaml
public static OpenLineageYaml loadOpenLineageYaml(java.io.InputStream inputStream)
-
-