Class AdminSparkServer
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.controller.server.AdminSparkServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
Controller admin API leveraging sparkjava: http://sparkjava.com/documentation.html
AdminSparkServer 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
Modifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapper
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState
-
Constructor Summary
ConstructorDescriptionAdminSparkServer
(int port, Admin admin, io.tehuti.metrics.MetricsRepository metricsRepository, Set<String> clusters, boolean enforceSSL, Optional<SSLConfig> sslConfig, boolean checkReadMethodForKafka, Optional<DynamicAccessController> accessController, List<ControllerRoute> disabledRoutes, VeniceProperties jettyConfigOverrides, boolean disableParentRequestTopicForStreamPushes, PubSubTopicRepository pubSubTopicRepository, VeniceControllerRequestHandler requestHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
getOptionalParameterValue
(spark.Request request, String parameter) protected static String
getOptionalParameterValue
(spark.Request request, String parameter, String defaultValue) protected static void
handleError
(Throwable e, spark.Request request, spark.Response response) protected static void
handleError
(Throwable e, spark.Request request, spark.Response response, boolean logErrorMessage) boolean
void
protected static void
validateParams
(spark.Request request, List<String> requiredParams, Admin admin)
-
Field Details
-
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
-
Constructor Details
-
AdminSparkServer
public AdminSparkServer(int port, Admin admin, io.tehuti.metrics.MetricsRepository metricsRepository, Set<String> clusters, boolean enforceSSL, Optional<SSLConfig> sslConfig, boolean checkReadMethodForKafka, Optional<DynamicAccessController> accessController, List<ControllerRoute> disabledRoutes, VeniceProperties jettyConfigOverrides, boolean disableParentRequestTopicForStreamPushes, PubSubTopicRepository pubSubTopicRepository, VeniceControllerRequestHandler requestHandler)
-
-
Method Details
-
startInner
- 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:
Exception
-
stopInner
public void stopInner()- Specified by:
stopInner
in classAbstractVeniceService
-
validateParams
-
getOptionalParameterValue
-
getOptionalParameterValue
-
handleError
-
handleError
protected static void handleError(Throwable e, spark.Request request, spark.Response response, boolean logErrorMessage)
-