git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1459054 13f79535-47bb-0310-9956-ffa450edef68
@@ -78,6 +78,9 @@ Release 2.0.5-beta - UNRELEASED
YARN-481. Add AM Host and RPC Port to ApplicationCLI Status Output
(Chris Riccomini via bikas)
+ YARN-297. Improve hashCode implementations for PB records. (Xuan Gong via
+ hitesh)
+
OPTIMIZATIONS
BUG FIXES
@@ -76,8 +76,8 @@ public abstract class ApplicationAttemptId implements
@Override
public int hashCode() {
// Generated by eclipse.
- final int prime = 31;
- int result = 1;
+ final int prime = 347671;
+ int result = 5501;
ApplicationId appId = getApplicationId();
result = prime * result + appId.hashCode();
result = prime * result + getAttemptId();
@@ -97,8 +97,8 @@ public abstract class ApplicationId implements Comparable<ApplicationId> {
+ final int prime = 371237;
+ int result = 6521;
long clusterTimestamp = getClusterTimestamp();
result = prime * result
+ (int) (clusterTimestamp ^ (clusterTimestamp >>> 32));
@@ -86,8 +86,8 @@ public abstract class ContainerId implements Comparable<ContainerId>{
+ final int prime = 435569;
+ int result = 7507;
result = prime * result + getId();
result = prime * result + getApplicationAttemptId().hashCode();
return result;
@@ -65,8 +65,8 @@ public abstract class NodeId implements Comparable<NodeId> {
+ final int prime = 493217;
+ int result = 8501;
result = prime * result + this.getHost().hashCode();
result = prime * result + this.getPort();
@@ -39,8 +39,8 @@ public abstract class Priority implements Comparable<Priority> {
+ final int prime = 517861;
+ int result = 9511;
result = prime * result + getPriority();
}
@@ -124,8 +124,8 @@ public abstract class ResourceRequest implements Comparable<ResourceRequest> {
+ final int prime = 2153;
+ int result = 2459;
Resource capability = getCapability();
String hostName = getHostName();
Priority priority = getPriority();