Skip to content

Commit

Permalink
Drop need to provide marquez.yml for seed cmd (#2094)
Browse files Browse the repository at this point in the history
Signed-off-by: wslulciuc <willy@datakin.com>

Signed-off-by: wslulciuc <willy@datakin.com>
  • Loading branch information
wslulciuc authored Aug 30, 2022
1 parent 53460fa commit df8cc76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
13 changes: 4 additions & 9 deletions api/src/main/java/marquez/cli/SeedCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.ImmutableList;
import io.dropwizard.cli.ConfiguredCommand;
import io.dropwizard.cli.Command;
import io.dropwizard.setup.Bootstrap;
import io.openlineage.client.OpenLineage;
import io.openlineage.client.OpenLineageClient;
Expand All @@ -18,7 +18,6 @@
import lombok.NonNull;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import marquez.MarquezConfig;
import net.sourceforge.argparse4j.inf.Namespace;
import net.sourceforge.argparse4j.inf.Subparser;

Expand All @@ -37,7 +36,7 @@
* For example, to override the {@code url}:
*
* <pre>{@code
* java -jar marquez-api.jar seed --url http://localhost:5000 --metadata metadata.json marquez.yml
* java -jar marquez-api.jar seed --url http://localhost:5000 --metadata metadata.json
* }</pre>
*
* <p>where, {@code metadata.json} contains metadata for run {@code
Expand Down Expand Up @@ -93,7 +92,7 @@
* <p><b>Note:</b> The {@code seed} command requires a running instance of Marquez.
*/
@Slf4j
public final class SeedCommand extends ConfiguredCommand<MarquezConfig> {
public final class SeedCommand extends Command {
/* Default URL for HTTP backend. */
private static final String DEFAULT_OL_URL = "http://localhost:8080";

Expand All @@ -109,7 +108,6 @@ public SeedCommand() {
/* Configure seed command. */
@Override
public void configure(@NonNull final Subparser subparser) {
super.configure(subparser);
subparser
.addArgument("--url")
.dest("url")
Expand All @@ -126,10 +124,7 @@ public void configure(@NonNull final Subparser subparser) {
}

@Override
protected void run(
@NonNull Bootstrap<MarquezConfig> bootstrap,
@NonNull Namespace namespace,
@NonNull MarquezConfig config) {
public void run(@NonNull Bootstrap<?> bootstrap, @NonNull Namespace namespace) {
final String olUrl = namespace.getString(CMD_ARG_OL_URL);
final String olMetadata = namespace.getString(CMD_ARG_OL_METADATA);
// Use HTTP transport.
Expand Down
7 changes: 1 addition & 6 deletions docker/seed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@

set -e

if [[ -z "${MARQUEZ_CONFIG}" ]]; then
MARQUEZ_CONFIG='marquez.dev.yml'
echo "WARNING 'MARQUEZ_CONFIG' not set, using development configuration."
fi

java -jar marquez-api-*.jar seed --url "${MARQUEZ_URL:-http://localhost:5000}" --metadata metadata.json "${MARQUEZ_CONFIG}"
java -jar marquez-api-*.jar seed --url "${MARQUEZ_URL:-http://localhost:5000}" --metadata metadata.json

0 comments on commit df8cc76

Please sign in to comment.