forked from apache/rocketmq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ROCKETMQ-200]-Cluster name is always missing when fetch ClusterInfo …
…from name server closes apache#105
- Loading branch information
1 parent
8c8610f
commit c796140
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,7 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* $Id: BrokerData.java 1835 2013-05-16 02:00:50Z [email protected] $ | ||
*/ | ||
|
||
package org.apache.rocketmq.common.protocol.route; | ||
|
||
import java.util.HashMap; | ||
|
@@ -29,6 +27,16 @@ public class BrokerData implements Comparable<BrokerData> { | |
private String brokerName; | ||
private HashMap<Long/* brokerId */, String/* broker address */> brokerAddrs; | ||
|
||
public BrokerData() { | ||
|
||
} | ||
|
||
public BrokerData(String cluster, String brokerName, HashMap<Long, String> brokerAddrs) { | ||
this.cluster = cluster; | ||
this.brokerName = brokerName; | ||
this.brokerAddrs = brokerAddrs; | ||
} | ||
|
||
public String selectBrokerAddr() { | ||
String value = this.brokerAddrs.get(MixAll.MASTER_ID); | ||
if (null == value) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters