jihoonson commented on a change in pull request #10543: URL: https://github.com/apache/druid/pull/10543#discussion_r535741400
########## File path: sql/src/main/java/org/apache/druid/sql/avatica/DruidAvaticaProtobufHandler.java ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.druid.sql.avatica; + +import com.google.inject.Inject; +import org.apache.calcite.avatica.remote.LocalService; +import org.apache.calcite.avatica.remote.Service; +import org.apache.calcite.avatica.server.AvaticaProtobufHandler; +import org.apache.druid.guice.annotations.Self; +import org.apache.druid.server.DruidNode; +import org.eclipse.jetty.server.Request; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class DruidAvaticaProtobufHandler extends AvaticaProtobufHandler +{ + public static final String AVATICA_PATH = "/druid/v2/sql/avatica-pb/"; Review comment: I see. It sounds reasonable to me. ########## File path: server/src/main/java/org/apache/druid/server/AsyncQueryForwardingServlet.java ########## @@ -119,6 +124,7 @@ private static void handleException(HttpServletResponse response, ObjectMapper o private final RequestLogger requestLogger; private final GenericQueryMetricsFactory queryMetricsFactory; private final AuthenticatorMapper authenticatorMapper; + private final transient ProtobufTranslation protobufTranslation; Review comment: Hmm, I didn't know that the servlet is serializable. However, [it seems that Jetty doesn't support serializing servlets anyway](https://github.com/eclipse/jetty.project/issues/5169). I would suggest to not add it since it can be misleading as other variables are not transient. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
