Skip to content

Latest commit

 

History

History
 
 

java

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Marquez Java Client

Java client for Marquez.

Installation

Maven:

<dependency>
    <groupId>io.github.marquezproject</groupId>
    <artifactId>marquez-java</artifactId>
    <version>0.16.1</version>
</dependency>

or Gradle:

implementation 'io.github.marquezproject:marquez-java:0.16.1

Usage

MarquezClient client = MarquezClient().builder()
    .baseUrl("http://localhost:5000")
    .build()

// Metadata
NamespaceMeta meta = NamespaceMeta().builder()
    .ownerName("me")
    .description("My first namespace!")
    .build()

// Create namespace
Namespace namespace = client.createNamespace("my-namespace", meta);

Supply an SSLContext to enable TLS

import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import marquez.client.MarquezClient;
...
KeyManager[] keyManager = setUpKeyManagers();
TrustManager[] trustManager = setUpTrustManagers();
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManager, trustManager, null);
MarquezClient client = MarquezClient.builder()
        .sslContext(sslContext)
        .baseUrl("https://localhost:5000")
        .build();