diaohancai opened a new issue, #267:
URL: https://github.com/apache/incubator-hugegraph-computer/issues/267

   ### Bug Type (问题类型)
   
   None
   
   ### Before submit
   
   - [X] 我已经确认现有的 
[Server-Issues](https://github.com/apache/hugegraph-computer/issues) 与 
[Computer-Issues](https://github.com/apache/hugegraph-computer/issues) 中没有相同 / 
重复问题
   
   ### Environment (环境信息)
   
   - Server Version: v1.0.x
   - Computer Version: v1.0.x
   - Scheduler: K8s V1.xx
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   
[org.apache.hugegraph.computer.core.common.ContainerInfo](https://github.com/apache/incubator-hugegraph-computer/blob/fdb4621330d76d2d74f5162864fff28365fa735f/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfo.java#L39)
 found incorrect comment.
   
   ### Incorrect comment:
   ```java
   /*
    * There is only 1 master, and the id of master is -1.
    * The id of workers start from 0. The id is used to identify a worker.
    */
   private int id;
   ```
   ### Actually code:
   ``` java
   this.masterInfo = new ContainerInfo(ContainerInfo.MASTER_ID,
                                           TransportUtil.host(rpcAddress),
                                           rpcAddress.getPort());
   int ContainerInfo.MASTER_ID = 0;
   ```
   ```java
   private void assignIdForWorkers(List<ContainerInfo> containers) {
       // Assign worker id from 1.
       for (int i = 0; i < containers.size(); i++) {
           containers.get(i).id(i + 1);
       }
   }
   ```
   
   So:
   
   - The id of master is 0.
   - The id of workers start from 1.
   
   
   


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

Reply via email to