Jackie-Jiang commented on code in PR #17358: URL: https://github.com/apache/pinot/pull/17358#discussion_r2688530348
########## pinot-common/src/main/java/org/apache/pinot/context/BrokerContext.java: ########## @@ -0,0 +1,97 @@ +/** + * 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.pinot.context; Review Comment: Should it be under `org.apache.pinot.common` if it is put within `pinot-common`? I feel it is easier to use if put in `pinot-core`. We are going to break `pinot-common` into spi and `pinot-core` long term wise. Consider putting it under `pinot.core.instance.context` ########## pinot-controller/pom.xml: ########## @@ -38,6 +38,10 @@ <groupId>org.apache.pinot</groupId> <artifactId>pinot-query-planner</artifactId> </dependency> + <dependency> Review Comment: Is this needed? ########## pinot-common/src/main/java/org/apache/pinot/context/BrokerContext.java: ########## @@ -0,0 +1,97 @@ +/** + * 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.pinot.context; + +import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; +import java.util.Objects; +import javax.annotation.Nullable; +import javax.net.ssl.SSLContext; + + +/** + * The <code>BrokerContext</code> class is a singleton class which contains all broker related context. + */ +public class BrokerContext { + private static final BrokerContext INSTANCE = new BrokerContext(); + + private BrokerContext() { + } + + public static BrokerContext getInstance() { + return INSTANCE; + } + + @Nullable + // Stored as Object to avoid a pinot-common dependency on query-runtime types. + private Object _queryOperatorFactoryProvider; Review Comment: Put a comment of the object type, i.e. `org.apache.pinot.query.runtime.operator.factory.QueryOperatorFactoryProvider` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
