We’re rewarding the question askers & reputations are being recalculated! Read more.
4 edited tags
| link
3 added 7 characters in body
source | link
  • If a line that follows fourth category condition above, I will split the line on "," and get 0 index which is "ip address" and second index which is "appId" and populate it in a "ipAddressToAppidMapping" map. For example in below line:

    If a line that follows fourth category condition above, I will split the line on "," and get 0 index which is "ip address" and second index which is "appId" and populate it in a "ipAddressToAppidMapping" map. For example in below line:

    13.451.453.1136,3,625,20002,2,tr_old_dev

    ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

13.451.453.1136,3,625,20002,2,tr_old_dev

ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index which is "datacenter number" and third index which is "portNumber" and fourth index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my ipAddressToTcpAddress map key. Now I have to make a List<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

    If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index which is "datacenter number" and third index which is "portNumber" and fourth index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my ipAddressToTcpAddress map key. Now I have to make a List<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

    11.111.101.203,1,2,9096,4,process_1234

    My list will look like this after using "numberOfPorts as 4":

    [tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]
    

    As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

11.111.101.203,1,2,9096,4,process_1234

My list will look like this after using "numberOfPorts as 4":

[tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]

As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

  • If a line that follows fourth category condition above, I will split the line on "," and get 0 index which is "ip address" and second index which is "appId" and populate it in a "ipAddressToAppidMapping" map. For example in below line:

13.451.453.1136,3,625,20002,2,tr_old_dev

ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index which is "datacenter number" and third index which is "portNumber" and fourth index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my ipAddressToTcpAddress map key. Now I have to make a List<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

11.111.101.203,1,2,9096,4,process_1234

My list will look like this after using "numberOfPorts as 4":

[tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]

As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

  • If a line that follows fourth category condition above, I will split the line on "," and get 0 index which is "ip address" and second index which is "appId" and populate it in a "ipAddressToAppidMapping" map. For example in below line:

    13.451.453.1136,3,625,20002,2,tr_old_dev

    ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index which is "datacenter number" and third index which is "portNumber" and fourth index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my ipAddressToTcpAddress map key. Now I have to make a List<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

    11.111.101.203,1,2,9096,4,process_1234

    My list will look like this after using "numberOfPorts as 4":

    [tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]
    

    As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

2 deleted 1 character in body
source | link

"ipAddressToAppidMapping"ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index is which is "datacenter number" and third index which is "portNumber""portNumber" and fourth index index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my "ipAddressToTcpAddress"ipAddressToTcpAddress map key. Now I have to make a ListList<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

My list will belook like this after using "numberOfPorts as 4": [tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097] As

[tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]

As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

"ipAddressToAppidMapping" map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index is which is "datacenter number" and third index which is "portNumber" and fourth index index is "numberOfPorts". Now basis on "datacenter number" I will locate actual enum for that from Datacenter enum class which will be my "ipAddressToTcpAddress" map key. Now I have to make a List which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

My list will be like this after using "numberOfPorts as 4": [tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097] As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

ipAddressToAppidMapping map will have 13.451.453.1136 as key and value as 625 and I will do same things for other lines which follows same pattern.

  • If a line that follows first category condition, I will again split the line on "," and and get 0 index which is "ip address" and first index which is "datacenter number" and third index which is "portNumber" and fourth index which is "numberOfPorts". Now basis on "datacenter number", I will locate actual enum for that from Datacenter enum class which will be my ipAddressToTcpAddress map key. Now I have to make a List<String> which will be value for my map given a "numberOfPorts", "portNumber" and "ip address". For example for below line:

My list will look like this after using "numberOfPorts as 4":

[tcp://11.111.101.203:9099, tcp://11.111.101.203:9098, tcp://11.111.101.203:9097]

As you can see it will not contain first port number which is 9096 so it will have 9097,9098,9099 and it will skip first port whatever is there on the line and use remaining "numberOfPorts -1" always.

1
source | link