All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ywilkof.sparkrestclient.JobSubmitRequest Maven / Gradle / Ivy

Go to download

Fluent utility client for interacting with Spark Standalone Mode's Rest API for submitting, killing and monitoring the state of jobs.

There is a newer version: 1.3.9
Show newest version
package com.github.ywilkof.sparkrestclient;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Getter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by yonatan on 08.10.15.
 */
@Getter
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
class JobSubmitRequest {

    private Action action;

    private String appResource;

    private List appArgs;

    private String clientSparkVersion;

    private String mainClass;

    private Map environmentVariables;

    private SparkProperties sparkProperties;

    @Builder
    @JsonInclude(JsonInclude.Include.NON_NULL)
    static class SparkProperties {

        @JsonProperty(value = "spark.jars")
        private String jars;

        @JsonProperty(value = "spark.app.name")
        private String appName;

        @JsonProperty(value = "spark.master")
        private String master;

        private Map otherProperties = new HashMap<>();

        void setOtherProperties(String key, String value) {
            this.otherProperties.put(key,value);
        }

        @JsonAnyGetter
        Map getOtherProperties() {
            return this.otherProperties;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy