Skip to content

Commit

Permalink
Fix backend for external logs url
Browse files Browse the repository at this point in the history
  • Loading branch information
pdambrauskas committed Feb 11, 2022
1 parent 4548788 commit 6637035
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Lighter can be configured by using environment variables. Currently, Lighter sup
| -------------------------------------- | ------------------------------------------------------ | -------------------------------- |
| LIGHTER_MAX_RUNNING_JOBS | Max running Batch jobs in parallel | 5 |
| LIGHTER_SPARK_HISTORY_SERVER_URL | Spark history server URL used on frontend | http://localhost/spark-history/ |
| LIGHTER_EXTERNAL_LOGS_URL_TEMPLATE | Template for link to external logs | |
| LIGHTER_PY_GATEWAY_PORT | Port for live Spark session communication | 25333 |
| LIGHETR_URL | URL which can be used to access Lighter form Spark Job | http://lighter.spark:8080 |
| LIGHTER_SESSION_TIMEOUT_MINUTES | Session lifetime in minutes | 90 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.Nullable;
import java.util.StringJoiner;
import javax.validation.constraints.Null;

@ConfigurationProperties("lighter")
@Introspected
public class AppConfiguration {
@JsonProperty(access = Access.WRITE_ONLY)
private final Integer maxRunningJobs;
private final String sparkHistoryServerUrl;
private final String externalLogsUrlTemplate;
@JsonProperty(access = Access.WRITE_ONLY)
private final Integer pyGatewayPort;
@JsonProperty(access = Access.WRITE_ONLY)
Expand All @@ -24,9 +26,11 @@ public class AppConfiguration {

@ConfigurationInject
public AppConfiguration(Integer maxRunningJobs, @Nullable String sparkHistoryServerUrl,
@Nullable String externalLogsUrlTemplate,
Integer pyGatewayPort, String url, SessionConfiguration sessionConfiguration){
this.maxRunningJobs = maxRunningJobs;
this.sparkHistoryServerUrl = sparkHistoryServerUrl;
this.externalLogsUrlTemplate = externalLogsUrlTemplate;
this.pyGatewayPort = pyGatewayPort;
this.url = url;
this.sessionConfiguration = sessionConfiguration;
Expand All @@ -40,6 +44,10 @@ public String getSparkHistoryServerUrl() {
return sparkHistoryServerUrl;
}

public String getExternalLogsUrlTemplate() {
return externalLogsUrlTemplate;
}

public Integer getPyGatewayPort() {
return pyGatewayPort;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ class Factories {
}

static appConfiguration() {
new AppConfiguration(10, "http://history", 5432, "http://lighter:8080", new AppConfiguration.SessionConfiguration(20, "permanentSessionId", submitParams()))
new AppConfiguration(10, "http://history", null, 5432, "http://lighter:8080", new AppConfiguration.SessionConfiguration(20, "permanentSessionId", submitParams()))
}
}

0 comments on commit 6637035

Please sign in to comment.