mynameborat commented on a change in pull request #1421:
URL: https://github.com/apache/samza/pull/1421#discussion_r477015346



##########
File path: samza-api/src/main/java/org/apache/samza/job/model/LocalityModel.java
##########
@@ -0,0 +1,82 @@
+/*
+ * 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.job.model;
+
+import java.util.Objects;
+import java.util.Map;
+
+/**
+ * A model to represent the locality information of an application. The 
locality information refers to the
+ * whereabouts of the physical execution of a samza container. With this 
information, samza achieves (best effort) affinity
+ * i.e. place the container on the host in which it was running before. By 
doing this, stateful applications can minimize
+ * the bootstrap time of their state by leveraging the local copy.
+ *
+ * It is suffice to have only {@link ProcessorLocality} model and use it 
within locality manager. However, this abstraction
+ * enables us extend locality beyond container. e.g. It is useful to track 
task locality to enable heterogeneous containers
+ * or fine grained execution model.
+ *
+ * In YARN deployment model, processors are interchangeably used for container 
and <i>processorId</i>refers to
+ * logical container id.
+ */
+public class LocalityModel {

Review comment:
       Are you referring to the data model version or the versioning of the 
actual data? 
   If it is former, our current only metadata store (Kafka) has a versioning of 
the format under `CoordinatorStreamMessage`. That should handle evolution in 
the event of adding fields; If it is latter, we don't have a universal 
versioning of metadata (job model, configuration, locality) yet. We will likely 
add versioning to all the metadata with the work on metadata abstraction.




----------------------------------------------------------------
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]


Reply via email to