1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.hadoop.hbase;
19
20 import org.apache.hadoop.hbase.HealthChecker.HealthCheckerExitStatus;
21
22
23
24
25
26 class HealthReport {
27
28 private HealthCheckerExitStatus status;
29 private String healthReport;
30
31 HealthReport(HealthCheckerExitStatus status, String healthReport) {
32 super();
33 this.status = status;
34 this.healthReport = healthReport;
35 }
36
37
38
39
40
41
42 HealthCheckerExitStatus getStatus() {
43 return status;
44 }
45
46
47
48
49
50
51 String getHealthReport() {
52 return healthReport;
53 }
54
55 @Override
56 public int hashCode() {
57 final int prime = 31;
58 int result = 1;
59 result = prime * result + ((healthReport == null) ? 0 : healthReport.hashCode());
60 result = prime * result + ((status == null) ? 0 : status.hashCode());
61 return result;
62 }
63
64 @Override
65 public boolean equals(Object obj) {
66 if (this == obj) {
67 return true;
68 }
69 if (obj == null) {
70 return false;
71 }
72 if (!(obj instanceof HealthReport)) {
73 return false;
74 }
75 HealthReport other = (HealthReport) obj;
76 if (healthReport == null) {
77 if (other.healthReport != null) {
78 return false;
79 }
80 } else if (!healthReport.equals(other.healthReport)) {
81 return false;
82 }
83 if (status != other.status) {
84 return false;
85 }
86 return true;
87 }
88
89 }