Jackie-Jiang commented on a change in pull request #4817: Replace
ServerInstance with ServerRoutingInstance for Broker scatter-gather
URL: https://github.com/apache/incubator-pinot/pull/4817#discussion_r346546348
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java
##########
@@ -19,42 +19,48 @@
package org.apache.pinot.core.transport;
import com.google.common.net.InternetDomainName;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.concurrent.ThreadSafe;
-
-import static
org.apache.pinot.common.utils.CommonConstants.Helix.PREFIX_OF_SERVER_INSTANCE;
-import static org.apache.pinot.common.utils.CommonConstants.Helix.TableType;
+import org.apache.pinot.common.utils.CommonConstants.Helix;
+import org.apache.pinot.common.utils.CommonConstants.Helix.TableType;
/**
- * The {@code Server} class represents the routing target instance which
contains the information of host name, port,
- * and table type it serves.
+ * The {@code ServerRoutingInstance} class represents the routing target
instance which contains the information of
+ * hostname, port, and table type it serves.
* <p>Different table types on same host and port are counted as different
instances. Therefore, one single Pinot Server
* might be treated as two different routing target instances based on the
types of table it serves.
*/
@ThreadSafe
-public class Server {
- private static final String NAME_PORT_DELIMITER = "_";
+public class ServerRoutingInstance {
+ private static final String HOSTNAME_PORT_DELIMITER = "_";
private static final String SHORT_OFFLINE_SUFFIX = "_O";
private static final String SHORT_REALTIME_SUFFIX = "_R";
+ private static final Map<String, String> SHORT_HOSTNAME_MAP = new
ConcurrentHashMap<>();
- private final String _hostName;
+ private final String _hostname;
private final int _port;
private final TableType _tableType;
- private transient String _shortName;
-
/**
- * NOTE: server instance name is of format: {@code
Server_<hostName>_<port>}, e.g. {@code Server_localhost_12345}.
+ * NOTE: server instance name is of format: {@code
Server_<hostname>_<port>}, e.g. {@code Server_localhost_12345}.
Review comment:
Same here
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]