Class NodeUrlUtils


  • public class NodeUrlUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeUrlUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertTConfigNodeUrl​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation configNodeLocation)
      Convert TConfigNodeLocation to TConfigNodeUrl
      static java.lang.String convertTConfigNodeUrls​(java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> configNodeLocations)
      Convert TConfigNodeLocations to TConfigNodeUrls
      static java.lang.String convertTEndPointUrl​(org.apache.iotdb.common.rpc.thrift.TEndPoint endPoint)
      Convert TEndPoint to TEndPointUrl
      static java.lang.String convertTEndPointUrls​(java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> endPoints)
      Convert TEndPoints to TEndPointUrls
      static boolean isLocalAddress​(java.lang.String ip)  
      static org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation parseTConfigNodeUrl​(java.lang.String configNodeUrl)
      Parse TConfigNodeLocation from given TConfigNodeUrl
      static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> parseTConfigNodeUrls​(java.lang.String configNodeUrls)
      Parse TConfigNodeLocations from given TConfigNodeUrls
      static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> parseTConfigNodeUrls​(java.util.List<java.lang.String> configNodeUrls)
      Parse TConfigNodeLocations from given TConfigNodeUrls
      static org.apache.iotdb.common.rpc.thrift.TEndPoint parseTEndPointUrl​(java.lang.String endPointUrl)
      Parse TEndPoint from a given TEndPointUrl
      static java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> parseTEndPointUrls​(java.lang.String endPointUrls)
      Parse TEndPoints from given TEndPointUrls
      static java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> parseTEndPointUrls​(java.util.List<java.lang.String> endPointUrls)
      Parse TEndPoints from given TEndPointUrls
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeUrlUtils

        public NodeUrlUtils()
    • Method Detail

      • convertTEndPointUrl

        public static java.lang.String convertTEndPointUrl​(org.apache.iotdb.common.rpc.thrift.TEndPoint endPoint)
        Convert TEndPoint to TEndPointUrl
        Parameters:
        endPoint - TEndPoint
        Returns:
        TEndPointUrl with format ip:port
      • convertTEndPointUrls

        public static java.lang.String convertTEndPointUrls​(java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> endPoints)
        Convert TEndPoints to TEndPointUrls
        Parameters:
        endPoints - List
        Returns:
        TEndPointUrls with format TEndPointUrl_0,TEndPointUrl_1,...,TEndPointUrl_n
      • parseTEndPointUrl

        public static org.apache.iotdb.common.rpc.thrift.TEndPoint parseTEndPointUrl​(java.lang.String endPointUrl)
                                                                              throws BadNodeUrlException
        Parse TEndPoint from a given TEndPointUrl
        Parameters:
        endPointUrl - ip:port
        Returns:
        TEndPoint
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • parseTEndPointUrls

        public static java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> parseTEndPointUrls​(java.util.List<java.lang.String> endPointUrls)
                                                                                               throws BadNodeUrlException
        Parse TEndPoints from given TEndPointUrls
        Parameters:
        endPointUrls - List
        Returns:
        List
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • parseTEndPointUrls

        public static java.util.List<org.apache.iotdb.common.rpc.thrift.TEndPoint> parseTEndPointUrls​(java.lang.String endPointUrls)
                                                                                               throws BadNodeUrlException
        Parse TEndPoints from given TEndPointUrls
        Parameters:
        endPointUrls - TEndPointUrls
        Returns:
        List
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • convertTConfigNodeUrl

        public static java.lang.String convertTConfigNodeUrl​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation configNodeLocation)
        Convert TConfigNodeLocation to TConfigNodeUrl
        Parameters:
        configNodeLocation - TConfigNodeLocation
        Returns:
        TConfigNodeUrl with format InternalEndPointUrl,ConsensusEndPointUrl
      • convertTConfigNodeUrls

        public static java.lang.String convertTConfigNodeUrls​(java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> configNodeLocations)
        Convert TConfigNodeLocations to TConfigNodeUrls
        Parameters:
        configNodeLocations - List
        Returns:
        TConfigNodeUrls with format TConfigNodeUrl_0,TConfigNodeUrl_1,...,TConfigNodeUrl_n
      • parseTConfigNodeUrl

        public static org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation parseTConfigNodeUrl​(java.lang.String configNodeUrl)
                                                                                          throws BadNodeUrlException
        Parse TConfigNodeLocation from given TConfigNodeUrl
        Parameters:
        configNodeUrl - InternalEndPointUrl,ConsensusEndPointUrl
        Returns:
        TConfigNodeLocation
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • parseTConfigNodeUrls

        public static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> parseTConfigNodeUrls​(java.util.List<java.lang.String> configNodeUrls)
                                                                                                           throws BadNodeUrlException
        Parse TConfigNodeLocations from given TConfigNodeUrls
        Parameters:
        configNodeUrls - List
        Returns:
        List
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • parseTConfigNodeUrls

        public static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> parseTConfigNodeUrls​(java.lang.String configNodeUrls)
                                                                                                           throws BadNodeUrlException
        Parse TConfigNodeLocations from given TConfigNodeUrls
        Parameters:
        configNodeUrls - TConfigNodeUrls
        Returns:
        List
        Throws:
        BadNodeUrlException - Throw when unable to parse
      • isLocalAddress

        public static boolean isLocalAddress​(java.lang.String ip)