YARN-297. Improve hashCode implementations for PB records. Contributed by Xuan Gong.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1459054 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1bd345d6e3
commit
2703518240
@ -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 NumberFormat initialValue() {
|
||||
@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 String toString() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// Generated by eclipse.
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final int prime = 371237;
|
||||
int result = 6521;
|
||||
long clusterTimestamp = getClusterTimestamp();
|
||||
result = prime * result
|
||||
+ (int) (clusterTimestamp ^ (clusterTimestamp >>> 32));
|
||||
|
@ -86,8 +86,8 @@ public NumberFormat initialValue() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// Generated by eclipse.
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final int prime = 435569;
|
||||
int result = 7507;
|
||||
result = prime * result + getId();
|
||||
result = prime * result + getApplicationAttemptId().hashCode();
|
||||
return result;
|
||||
|
@ -65,8 +65,8 @@ public String toString() {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final int prime = 493217;
|
||||
int result = 8501;
|
||||
result = prime * result + this.getHost().hashCode();
|
||||
result = prime * result + this.getPort();
|
||||
return result;
|
||||
|
@ -39,8 +39,8 @@ public abstract class Priority implements Comparable<Priority> {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final int prime = 517861;
|
||||
int result = 9511;
|
||||
result = prime * result + getPriority();
|
||||
return result;
|
||||
}
|
||||
|
@ -124,8 +124,8 @@ public abstract class ResourceRequest implements Comparable<ResourceRequest> {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
final int prime = 2153;
|
||||
int result = 2459;
|
||||
Resource capability = getCapability();
|
||||
String hostName = getHostName();
|
||||
Priority priority = getPriority();
|
||||
|
Loading…
Reference in New Issue
Block a user