Class AdminSparkServer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class AdminSparkServer
    extends AbstractVeniceService
    Controller admin API leveraging sparkjava: http://sparkjava.com/documentation.html

    AdminSparkServer is shared by multiple clusters' controllers running in one physical Venice controller instance.

    • Field Detail

      • OBJECT_MAPPER

        protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
    • 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

      • 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)