Class AdminSparkServer
- java.lang.Object
-
- com.linkedin.venice.service.AbstractVeniceService
-
- com.linkedin.venice.controller.server.AdminSparkServer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class AdminSparkServer extends AbstractVeniceService
Controller admin API leveraging sparkjava: http://sparkjava.com/documentation.htmlAdminSparkServer is shared by multiple clusters' controllers running in one physical Venice controller instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
-
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState
-
-
Constructor Summary
Constructors Constructor Description AdminSparkServer(int port, Admin admin, io.tehuti.metrics.MetricsRepository metricsRepository, java.util.Set<java.lang.String> clusters, boolean enforceSSL, java.util.Optional<SSLConfig> sslConfig, boolean checkReadMethodForKafka, java.util.Optional<DynamicAccessController> accessController, java.util.List<ControllerRoute> disabledRoutes, VeniceProperties jettyConfigOverrides, boolean disableParentRequestTopicForStreamPushes, PubSubTopicRepository pubSubTopicRepository)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
getOptionalParameterValue(spark.Request request, java.lang.String parameter)
protected static java.lang.String
getOptionalParameterValue(spark.Request request, java.lang.String parameter, java.lang.String defaultValue)
protected static void
handleError(java.lang.Throwable e, spark.Request request, spark.Response response)
protected static void
handleError(java.lang.Throwable e, spark.Request request, spark.Response response, boolean logErrorMessage)
boolean
startInner()
void
stopInner()
protected static void
validateParams(spark.Request request, java.util.List<java.lang.String> requiredParams, Admin admin)
-
-
-
Constructor Detail
-
AdminSparkServer
public AdminSparkServer(int port, Admin admin, io.tehuti.metrics.MetricsRepository metricsRepository, java.util.Set<java.lang.String> clusters, boolean enforceSSL, java.util.Optional<SSLConfig> sslConfig, boolean checkReadMethodForKafka, java.util.Optional<DynamicAccessController> accessController, java.util.List<ControllerRoute> disabledRoutes, VeniceProperties jettyConfigOverrides, boolean disableParentRequestTopicForStreamPushes, PubSubTopicRepository pubSubTopicRepository)
-
-
Method Detail
-
startInner
public boolean startInner() throws java.lang.Exception
- Specified by:
startInner
in classAbstractVeniceService
- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
AbstractVeniceService.serviceState
toAbstractVeniceService.ServiceState.STARTED
upon completion of the async work). - Throws:
java.lang.Exception
-
stopInner
public void stopInner()
- Specified by:
stopInner
in classAbstractVeniceService
-
validateParams
protected static void validateParams(spark.Request request, java.util.List<java.lang.String> requiredParams, Admin admin)
-
getOptionalParameterValue
protected static java.lang.String getOptionalParameterValue(spark.Request request, java.lang.String parameter)
-
getOptionalParameterValue
protected static java.lang.String getOptionalParameterValue(spark.Request request, java.lang.String parameter, java.lang.String defaultValue)
-
handleError
protected static void handleError(java.lang.Throwable e, spark.Request request, spark.Response response)
-
handleError
protected static void handleError(java.lang.Throwable e, spark.Request request, spark.Response response, boolean logErrorMessage)
-
-