Sanil15 commented on a change in pull request #1219: SAMZA-2373: Container Placement Service (core functionality) for container move and restart URL: https://github.com/apache/samza/pull/1219#discussion_r348872353
########## File path: samza-core/src/main/java/org/apache/samza/clustermanager/container/placements/ContainerPlacementMetadata.java ########## @@ -0,0 +1,89 @@ +/* + * 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.clustermanager.container.placements; + +import java.util.HashSet; +import java.util.Set; +import org.apache.samza.clustermanager.SamzaResourceRequest; + +/** + * Maintains the state for any control action like move or restart container issued externally + */ +public class ContainerPlacementMetadata { + // Logical container id 0,1,2,3, + private final String processorId; + // Last known deployment id of the container + private final String containerId; + private final String sourceHost; + private final String destinationHost; + // Expiry timeout for current request + private final Long requestExpiryTimeout; Review comment: 1. Can we not have a single request timeout for all container placement actions? It defaults to the config `cluster-manager.request.timeout.ms` 2. What do you think about renaming this to requestTimeout? The fact that this timeout will expire the request is implicit and doesn't have to be called out. As explicit as I can be 3. Can we use duration instead of Long? Done ---------------------------------------------------------------- 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] With regards, Apache Git Services
