mynameborat commented on a change in pull request #1421: URL: https://github.com/apache/samza/pull/1421#discussion_r477019652
########## File path: samza-core/src/main/java/org/apache/samza/coordinator/server/LocalityServlet.java ########## @@ -0,0 +1,66 @@ +/* + * 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.samza.coordinator.server; + +import java.io.IOException; +import java.util.Optional; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.samza.container.LocalityManager; +import org.apache.samza.job.model.ProcessorLocality; +import org.apache.samza.job.model.LocalityModel; +import org.apache.samza.serializers.model.SamzaObjectMapper; +import org.codehaus.jackson.map.ObjectMapper; + + +/** + * A servlet for locality information of a job. The servlet is hosted alongside of the {@link JobServlet} which hosts + * job model and configuration. Historically, locality information was part of job model but we extracted the locality + * as job model is static within the lifecycle of an application attempt while locality changes in the event of container + * movements. + * + * This separation enables us to achieve performance benefits by caching job model when it is served by the AM as it + * can incur significant penalty in the job start time for jobs with large number of containers. + */ Review comment: There isn't a direct URL per say. I added a general comment to identify the whereabouts of the server and port and the path of the actual servlet. ---------------------------------------------------------------- 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]
