| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
package org.apache.hadoop.hive.service; |
| 7 |
|
|
| 8 |
|
import java.util.List; |
| 9 |
|
import java.util.ArrayList; |
| 10 |
|
import java.util.Map; |
| 11 |
|
import java.util.HashMap; |
| 12 |
|
import java.util.EnumMap; |
| 13 |
|
import java.util.Set; |
| 14 |
|
import java.util.HashSet; |
| 15 |
|
import java.util.EnumSet; |
| 16 |
|
import java.util.Collections; |
| 17 |
|
import java.util.BitSet; |
| 18 |
|
import java.nio.ByteBuffer; |
| 19 |
|
import java.util.Arrays; |
| 20 |
|
import org.slf4j.Logger; |
| 21 |
|
import org.slf4j.LoggerFactory; |
| 22 |
|
|
|
|
|
| 0% |
Uncovered Elements: 525 (525) |
Complexity: 151 |
Complexity Density: 0.43 |
|
| 23 |
|
public class HiveClusterStatus implements org.apache.thrift.TBase<HiveClusterStatus, HiveClusterStatus._Fields>, java.io.Serializable, Cloneable { |
| 24 |
|
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveClusterStatus"); |
| 25 |
|
|
| 26 |
|
private static final org.apache.thrift.protocol.TField TASK_TRACKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskTrackers", org.apache.thrift.protocol.TType.I32, (short)1); |
| 27 |
|
private static final org.apache.thrift.protocol.TField MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("mapTasks", org.apache.thrift.protocol.TType.I32, (short)2); |
| 28 |
|
private static final org.apache.thrift.protocol.TField REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("reduceTasks", org.apache.thrift.protocol.TType.I32, (short)3); |
| 29 |
|
private static final org.apache.thrift.protocol.TField MAX_MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMapTasks", org.apache.thrift.protocol.TType.I32, (short)4); |
| 30 |
|
private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)5); |
| 31 |
|
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6); |
| 32 |
|
|
| 33 |
|
private int taskTrackers; |
| 34 |
|
private int mapTasks; |
| 35 |
|
private int reduceTasks; |
| 36 |
|
private int maxMapTasks; |
| 37 |
|
private int maxReduceTasks; |
| 38 |
|
private JobTrackerState state; |
| 39 |
|
|
| 40 |
|
|
|
|
|
| 0% |
Uncovered Elements: 35 (35) |
Complexity: 14 |
Complexity Density: 0.54 |
|
| 41 |
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| 42 |
|
TASK_TRACKERS((short)1, "taskTrackers"), |
| 43 |
|
MAP_TASKS((short)2, "mapTasks"), |
| 44 |
|
REDUCE_TASKS((short)3, "reduceTasks"), |
| 45 |
|
MAX_MAP_TASKS((short)4, "maxMapTasks"), |
| 46 |
|
MAX_REDUCE_TASKS((short)5, "maxReduceTasks"), |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
@see |
| 50 |
|
|
| 51 |
|
STATE((short)6, "state"); |
| 52 |
|
|
| 53 |
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| 54 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 55 |
0
|
static {... |
| 56 |
0
|
for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| 57 |
0
|
byName.put(field.getFieldName(), field); |
| 58 |
|
} |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 7 |
Complexity Density: 0.47 |
|
| 64 |
0
|
public static _Fields findByThriftId(int fieldId) {... |
| 65 |
0
|
switch(fieldId) { |
| 66 |
0
|
case 1: |
| 67 |
0
|
return TASK_TRACKERS; |
| 68 |
0
|
case 2: |
| 69 |
0
|
return MAP_TASKS; |
| 70 |
0
|
case 3: |
| 71 |
0
|
return REDUCE_TASKS; |
| 72 |
0
|
case 4: |
| 73 |
0
|
return MAX_MAP_TASKS; |
| 74 |
0
|
case 5: |
| 75 |
0
|
return MAX_REDUCE_TASKS; |
| 76 |
0
|
case 6: |
| 77 |
0
|
return STATE; |
| 78 |
0
|
default: |
| 79 |
0
|
return null; |
| 80 |
|
} |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 87 |
0
|
public static _Fields findByThriftIdOrThrow(int fieldId) {... |
| 88 |
0
|
_Fields fields = findByThriftId(fieldId); |
| 89 |
0
|
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| 90 |
0
|
return fields; |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 96 |
0
|
public static _Fields findByName(String name) {... |
| 97 |
0
|
return byName.get(name); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
private final short _thriftId; |
| 101 |
|
private final String _fieldName; |
| 102 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 103 |
0
|
_Fields(short thriftId, String fieldName) {... |
| 104 |
0
|
_thriftId = thriftId; |
| 105 |
0
|
_fieldName = fieldName; |
| 106 |
|
} |
| 107 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 108 |
0
|
public short getThriftFieldId() {... |
| 109 |
0
|
return _thriftId; |
| 110 |
|
} |
| 111 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 112 |
0
|
public String getFieldName() {... |
| 113 |
0
|
return _fieldName; |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
private static final int __TASKTRACKERS_ISSET_ID = 0; |
| 119 |
|
private static final int __MAPTASKS_ISSET_ID = 1; |
| 120 |
|
private static final int __REDUCETASKS_ISSET_ID = 2; |
| 121 |
|
private static final int __MAXMAPTASKS_ISSET_ID = 3; |
| 122 |
|
private static final int __MAXREDUCETASKS_ISSET_ID = 4; |
| 123 |
|
private BitSet __isset_bit_vector = new BitSet(5); |
| 124 |
|
|
| 125 |
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
|
| 126 |
0
|
static {... |
| 127 |
0
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| 128 |
0
|
tmpMap.put(_Fields.TASK_TRACKERS, new org.apache.thrift.meta_data.FieldMetaData("taskTrackers", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 129 |
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| 130 |
0
|
tmpMap.put(_Fields.MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("mapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 131 |
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| 132 |
0
|
tmpMap.put(_Fields.REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("reduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 133 |
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| 134 |
0
|
tmpMap.put(_Fields.MAX_MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxMapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 135 |
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| 136 |
0
|
tmpMap.put(_Fields.MAX_REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxReduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 137 |
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| 138 |
0
|
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| 139 |
|
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobTrackerState.class))); |
| 140 |
0
|
metaDataMap = Collections.unmodifiableMap(tmpMap); |
| 141 |
0
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap); |
| 142 |
|
} |
| 143 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 144 |
0
|
public HiveClusterStatus() {... |
| 145 |
|
} |
| 146 |
|
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
|
| 147 |
0
|
public HiveClusterStatus(... |
| 148 |
|
int taskTrackers, |
| 149 |
|
int mapTasks, |
| 150 |
|
int reduceTasks, |
| 151 |
|
int maxMapTasks, |
| 152 |
|
int maxReduceTasks, |
| 153 |
|
JobTrackerState state) |
| 154 |
|
{ |
| 155 |
0
|
this(); |
| 156 |
0
|
this.taskTrackers = taskTrackers; |
| 157 |
0
|
setTaskTrackersIsSet(true); |
| 158 |
0
|
this.mapTasks = mapTasks; |
| 159 |
0
|
setMapTasksIsSet(true); |
| 160 |
0
|
this.reduceTasks = reduceTasks; |
| 161 |
0
|
setReduceTasksIsSet(true); |
| 162 |
0
|
this.maxMapTasks = maxMapTasks; |
| 163 |
0
|
setMaxMapTasksIsSet(true); |
| 164 |
0
|
this.maxReduceTasks = maxReduceTasks; |
| 165 |
0
|
setMaxReduceTasksIsSet(true); |
| 166 |
0
|
this.state = state; |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 2 |
Complexity Density: 0.22 |
|
| 172 |
0
|
public HiveClusterStatus(HiveClusterStatus other) {... |
| 173 |
0
|
__isset_bit_vector.clear(); |
| 174 |
0
|
__isset_bit_vector.or(other.__isset_bit_vector); |
| 175 |
0
|
this.taskTrackers = other.taskTrackers; |
| 176 |
0
|
this.mapTasks = other.mapTasks; |
| 177 |
0
|
this.reduceTasks = other.reduceTasks; |
| 178 |
0
|
this.maxMapTasks = other.maxMapTasks; |
| 179 |
0
|
this.maxReduceTasks = other.maxReduceTasks; |
| 180 |
0
|
if (other.isSetState()) { |
| 181 |
0
|
this.state = other.state; |
| 182 |
|
} |
| 183 |
|
} |
| 184 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 185 |
0
|
public HiveClusterStatus deepCopy() {... |
| 186 |
0
|
return new HiveClusterStatus(this); |
| 187 |
|
} |
| 188 |
|
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
| 189 |
0
|
@Override... |
| 190 |
|
public void clear() { |
| 191 |
0
|
setTaskTrackersIsSet(false); |
| 192 |
0
|
this.taskTrackers = 0; |
| 193 |
0
|
setMapTasksIsSet(false); |
| 194 |
0
|
this.mapTasks = 0; |
| 195 |
0
|
setReduceTasksIsSet(false); |
| 196 |
0
|
this.reduceTasks = 0; |
| 197 |
0
|
setMaxMapTasksIsSet(false); |
| 198 |
0
|
this.maxMapTasks = 0; |
| 199 |
0
|
setMaxReduceTasksIsSet(false); |
| 200 |
0
|
this.maxReduceTasks = 0; |
| 201 |
0
|
this.state = null; |
| 202 |
|
} |
| 203 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 204 |
0
|
public int getTaskTrackers() {... |
| 205 |
0
|
return this.taskTrackers; |
| 206 |
|
} |
| 207 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 208 |
0
|
public void setTaskTrackers(int taskTrackers) {... |
| 209 |
0
|
this.taskTrackers = taskTrackers; |
| 210 |
0
|
setTaskTrackersIsSet(true); |
| 211 |
|
} |
| 212 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 213 |
0
|
public void unsetTaskTrackers() {... |
| 214 |
0
|
__isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID); |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 218 |
0
|
public boolean isSetTaskTrackers() {... |
| 219 |
0
|
return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID); |
| 220 |
|
} |
| 221 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 222 |
0
|
public void setTaskTrackersIsSet(boolean value) {... |
| 223 |
0
|
__isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value); |
| 224 |
|
} |
| 225 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 226 |
0
|
public int getMapTasks() {... |
| 227 |
0
|
return this.mapTasks; |
| 228 |
|
} |
| 229 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 230 |
0
|
public void setMapTasks(int mapTasks) {... |
| 231 |
0
|
this.mapTasks = mapTasks; |
| 232 |
0
|
setMapTasksIsSet(true); |
| 233 |
|
} |
| 234 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 235 |
0
|
public void unsetMapTasks() {... |
| 236 |
0
|
__isset_bit_vector.clear(__MAPTASKS_ISSET_ID); |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 240 |
0
|
public boolean isSetMapTasks() {... |
| 241 |
0
|
return __isset_bit_vector.get(__MAPTASKS_ISSET_ID); |
| 242 |
|
} |
| 243 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 244 |
0
|
public void setMapTasksIsSet(boolean value) {... |
| 245 |
0
|
__isset_bit_vector.set(__MAPTASKS_ISSET_ID, value); |
| 246 |
|
} |
| 247 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 248 |
0
|
public int getReduceTasks() {... |
| 249 |
0
|
return this.reduceTasks; |
| 250 |
|
} |
| 251 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 252 |
0
|
public void setReduceTasks(int reduceTasks) {... |
| 253 |
0
|
this.reduceTasks = reduceTasks; |
| 254 |
0
|
setReduceTasksIsSet(true); |
| 255 |
|
} |
| 256 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 257 |
0
|
public void unsetReduceTasks() {... |
| 258 |
0
|
__isset_bit_vector.clear(__REDUCETASKS_ISSET_ID); |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 262 |
0
|
public boolean isSetReduceTasks() {... |
| 263 |
0
|
return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID); |
| 264 |
|
} |
| 265 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 266 |
0
|
public void setReduceTasksIsSet(boolean value) {... |
| 267 |
0
|
__isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value); |
| 268 |
|
} |
| 269 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 270 |
0
|
public int getMaxMapTasks() {... |
| 271 |
0
|
return this.maxMapTasks; |
| 272 |
|
} |
| 273 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 274 |
0
|
public void setMaxMapTasks(int maxMapTasks) {... |
| 275 |
0
|
this.maxMapTasks = maxMapTasks; |
| 276 |
0
|
setMaxMapTasksIsSet(true); |
| 277 |
|
} |
| 278 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 279 |
0
|
public void unsetMaxMapTasks() {... |
| 280 |
0
|
__isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID); |
| 281 |
|
} |
| 282 |
|
|
| 283 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 284 |
0
|
public boolean isSetMaxMapTasks() {... |
| 285 |
0
|
return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID); |
| 286 |
|
} |
| 287 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 288 |
0
|
public void setMaxMapTasksIsSet(boolean value) {... |
| 289 |
0
|
__isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value); |
| 290 |
|
} |
| 291 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 292 |
0
|
public int getMaxReduceTasks() {... |
| 293 |
0
|
return this.maxReduceTasks; |
| 294 |
|
} |
| 295 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 296 |
0
|
public void setMaxReduceTasks(int maxReduceTasks) {... |
| 297 |
0
|
this.maxReduceTasks = maxReduceTasks; |
| 298 |
0
|
setMaxReduceTasksIsSet(true); |
| 299 |
|
} |
| 300 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 301 |
0
|
public void unsetMaxReduceTasks() {... |
| 302 |
0
|
__isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID); |
| 303 |
|
} |
| 304 |
|
|
| 305 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 306 |
0
|
public boolean isSetMaxReduceTasks() {... |
| 307 |
0
|
return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID); |
| 308 |
|
} |
| 309 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 310 |
0
|
public void setMaxReduceTasksIsSet(boolean value) {... |
| 311 |
0
|
__isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); |
| 312 |
|
} |
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
@see |
| 317 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 318 |
0
|
public JobTrackerState getState() {... |
| 319 |
0
|
return this.state; |
| 320 |
|
} |
| 321 |
|
|
| 322 |
|
|
| 323 |
|
|
| 324 |
|
@see |
| 325 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 326 |
0
|
public void setState(JobTrackerState state) {... |
| 327 |
0
|
this.state = state; |
| 328 |
|
} |
| 329 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 330 |
0
|
public void unsetState() {... |
| 331 |
0
|
this.state = null; |
| 332 |
|
} |
| 333 |
|
|
| 334 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 335 |
0
|
public boolean isSetState() {... |
| 336 |
0
|
return this.state != null; |
| 337 |
|
} |
| 338 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 339 |
0
|
public void setStateIsSet(boolean value) {... |
| 340 |
0
|
if (!value) { |
| 341 |
0
|
this.state = null; |
| 342 |
|
} |
| 343 |
|
} |
| 344 |
|
|
|
|
|
| 0% |
Uncovered Elements: 43 (43) |
Complexity: 13 |
Complexity Density: 0.42 |
|
| 345 |
0
|
public void setFieldValue(_Fields field, Object value) {... |
| 346 |
0
|
switch (field) { |
| 347 |
0
|
case TASK_TRACKERS: |
| 348 |
0
|
if (value == null) { |
| 349 |
0
|
unsetTaskTrackers(); |
| 350 |
|
} else { |
| 351 |
0
|
setTaskTrackers((Integer)value); |
| 352 |
|
} |
| 353 |
0
|
break; |
| 354 |
|
|
| 355 |
0
|
case MAP_TASKS: |
| 356 |
0
|
if (value == null) { |
| 357 |
0
|
unsetMapTasks(); |
| 358 |
|
} else { |
| 359 |
0
|
setMapTasks((Integer)value); |
| 360 |
|
} |
| 361 |
0
|
break; |
| 362 |
|
|
| 363 |
0
|
case REDUCE_TASKS: |
| 364 |
0
|
if (value == null) { |
| 365 |
0
|
unsetReduceTasks(); |
| 366 |
|
} else { |
| 367 |
0
|
setReduceTasks((Integer)value); |
| 368 |
|
} |
| 369 |
0
|
break; |
| 370 |
|
|
| 371 |
0
|
case MAX_MAP_TASKS: |
| 372 |
0
|
if (value == null) { |
| 373 |
0
|
unsetMaxMapTasks(); |
| 374 |
|
} else { |
| 375 |
0
|
setMaxMapTasks((Integer)value); |
| 376 |
|
} |
| 377 |
0
|
break; |
| 378 |
|
|
| 379 |
0
|
case MAX_REDUCE_TASKS: |
| 380 |
0
|
if (value == null) { |
| 381 |
0
|
unsetMaxReduceTasks(); |
| 382 |
|
} else { |
| 383 |
0
|
setMaxReduceTasks((Integer)value); |
| 384 |
|
} |
| 385 |
0
|
break; |
| 386 |
|
|
| 387 |
0
|
case STATE: |
| 388 |
0
|
if (value == null) { |
| 389 |
0
|
unsetState(); |
| 390 |
|
} else { |
| 391 |
0
|
setState((JobTrackerState)value); |
| 392 |
|
} |
| 393 |
0
|
break; |
| 394 |
|
|
| 395 |
|
} |
| 396 |
|
} |
| 397 |
|
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 7 |
Complexity Density: 0.5 |
|
| 398 |
0
|
public Object getFieldValue(_Fields field) {... |
| 399 |
0
|
switch (field) { |
| 400 |
0
|
case TASK_TRACKERS: |
| 401 |
0
|
return Integer.valueOf(getTaskTrackers()); |
| 402 |
|
|
| 403 |
0
|
case MAP_TASKS: |
| 404 |
0
|
return Integer.valueOf(getMapTasks()); |
| 405 |
|
|
| 406 |
0
|
case REDUCE_TASKS: |
| 407 |
0
|
return Integer.valueOf(getReduceTasks()); |
| 408 |
|
|
| 409 |
0
|
case MAX_MAP_TASKS: |
| 410 |
0
|
return Integer.valueOf(getMaxMapTasks()); |
| 411 |
|
|
| 412 |
0
|
case MAX_REDUCE_TASKS: |
| 413 |
0
|
return Integer.valueOf(getMaxReduceTasks()); |
| 414 |
|
|
| 415 |
0
|
case STATE: |
| 416 |
0
|
return getState(); |
| 417 |
|
|
| 418 |
|
} |
| 419 |
0
|
throw new IllegalStateException(); |
| 420 |
|
} |
| 421 |
|
|
| 422 |
|
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 8 |
Complexity Density: 0.5 |
|
| 423 |
0
|
public boolean isSet(_Fields field) {... |
| 424 |
0
|
if (field == null) { |
| 425 |
0
|
throw new IllegalArgumentException(); |
| 426 |
|
} |
| 427 |
|
|
| 428 |
0
|
switch (field) { |
| 429 |
0
|
case TASK_TRACKERS: |
| 430 |
0
|
return isSetTaskTrackers(); |
| 431 |
0
|
case MAP_TASKS: |
| 432 |
0
|
return isSetMapTasks(); |
| 433 |
0
|
case REDUCE_TASKS: |
| 434 |
0
|
return isSetReduceTasks(); |
| 435 |
0
|
case MAX_MAP_TASKS: |
| 436 |
0
|
return isSetMaxMapTasks(); |
| 437 |
0
|
case MAX_REDUCE_TASKS: |
| 438 |
0
|
return isSetMaxReduceTasks(); |
| 439 |
0
|
case STATE: |
| 440 |
0
|
return isSetState(); |
| 441 |
|
} |
| 442 |
0
|
throw new IllegalStateException(); |
| 443 |
|
} |
| 444 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 445 |
0
|
@Override... |
| 446 |
|
public boolean equals(Object that) { |
| 447 |
0
|
if (that == null) |
| 448 |
0
|
return false; |
| 449 |
0
|
if (that instanceof HiveClusterStatus) |
| 450 |
0
|
return this.equals((HiveClusterStatus)that); |
| 451 |
0
|
return false; |
| 452 |
|
} |
| 453 |
|
|
|
|
|
| 0% |
Uncovered Elements: 83 (83) |
Complexity: 32 |
Complexity Density: 0.71 |
|
| 454 |
0
|
public boolean equals(HiveClusterStatus that) {... |
| 455 |
0
|
if (that == null) |
| 456 |
0
|
return false; |
| 457 |
|
|
| 458 |
0
|
boolean this_present_taskTrackers = true; |
| 459 |
0
|
boolean that_present_taskTrackers = true; |
| 460 |
0
|
if (this_present_taskTrackers || that_present_taskTrackers) { |
| 461 |
0
|
if (!(this_present_taskTrackers && that_present_taskTrackers)) |
| 462 |
0
|
return false; |
| 463 |
0
|
if (this.taskTrackers != that.taskTrackers) |
| 464 |
0
|
return false; |
| 465 |
|
} |
| 466 |
|
|
| 467 |
0
|
boolean this_present_mapTasks = true; |
| 468 |
0
|
boolean that_present_mapTasks = true; |
| 469 |
0
|
if (this_present_mapTasks || that_present_mapTasks) { |
| 470 |
0
|
if (!(this_present_mapTasks && that_present_mapTasks)) |
| 471 |
0
|
return false; |
| 472 |
0
|
if (this.mapTasks != that.mapTasks) |
| 473 |
0
|
return false; |
| 474 |
|
} |
| 475 |
|
|
| 476 |
0
|
boolean this_present_reduceTasks = true; |
| 477 |
0
|
boolean that_present_reduceTasks = true; |
| 478 |
0
|
if (this_present_reduceTasks || that_present_reduceTasks) { |
| 479 |
0
|
if (!(this_present_reduceTasks && that_present_reduceTasks)) |
| 480 |
0
|
return false; |
| 481 |
0
|
if (this.reduceTasks != that.reduceTasks) |
| 482 |
0
|
return false; |
| 483 |
|
} |
| 484 |
|
|
| 485 |
0
|
boolean this_present_maxMapTasks = true; |
| 486 |
0
|
boolean that_present_maxMapTasks = true; |
| 487 |
0
|
if (this_present_maxMapTasks || that_present_maxMapTasks) { |
| 488 |
0
|
if (!(this_present_maxMapTasks && that_present_maxMapTasks)) |
| 489 |
0
|
return false; |
| 490 |
0
|
if (this.maxMapTasks != that.maxMapTasks) |
| 491 |
0
|
return false; |
| 492 |
|
} |
| 493 |
|
|
| 494 |
0
|
boolean this_present_maxReduceTasks = true; |
| 495 |
0
|
boolean that_present_maxReduceTasks = true; |
| 496 |
0
|
if (this_present_maxReduceTasks || that_present_maxReduceTasks) { |
| 497 |
0
|
if (!(this_present_maxReduceTasks && that_present_maxReduceTasks)) |
| 498 |
0
|
return false; |
| 499 |
0
|
if (this.maxReduceTasks != that.maxReduceTasks) |
| 500 |
0
|
return false; |
| 501 |
|
} |
| 502 |
|
|
| 503 |
0
|
boolean this_present_state = true && this.isSetState(); |
| 504 |
0
|
boolean that_present_state = true && that.isSetState(); |
| 505 |
0
|
if (this_present_state || that_present_state) { |
| 506 |
0
|
if (!(this_present_state && that_present_state)) |
| 507 |
0
|
return false; |
| 508 |
0
|
if (!this.state.equals(that.state)) |
| 509 |
0
|
return false; |
| 510 |
|
} |
| 511 |
|
|
| 512 |
0
|
return true; |
| 513 |
|
} |
| 514 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 515 |
0
|
@Override... |
| 516 |
|
public int hashCode() { |
| 517 |
0
|
return 0; |
| 518 |
|
} |
| 519 |
|
|
|
|
|
| 0% |
Uncovered Elements: 85 (85) |
Complexity: 20 |
Complexity Density: 0.43 |
|
| 520 |
0
|
public int compareTo(HiveClusterStatus other) {... |
| 521 |
0
|
if (!getClass().equals(other.getClass())) { |
| 522 |
0
|
return getClass().getName().compareTo(other.getClass().getName()); |
| 523 |
|
} |
| 524 |
|
|
| 525 |
0
|
int lastComparison = 0; |
| 526 |
0
|
HiveClusterStatus typedOther = (HiveClusterStatus)other; |
| 527 |
|
|
| 528 |
0
|
lastComparison = Boolean.valueOf(isSetTaskTrackers()).compareTo(typedOther.isSetTaskTrackers()); |
| 529 |
0
|
if (lastComparison != 0) { |
| 530 |
0
|
return lastComparison; |
| 531 |
|
} |
| 532 |
0
|
if (isSetTaskTrackers()) { |
| 533 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers); |
| 534 |
0
|
if (lastComparison != 0) { |
| 535 |
0
|
return lastComparison; |
| 536 |
|
} |
| 537 |
|
} |
| 538 |
0
|
lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(typedOther.isSetMapTasks()); |
| 539 |
0
|
if (lastComparison != 0) { |
| 540 |
0
|
return lastComparison; |
| 541 |
|
} |
| 542 |
0
|
if (isSetMapTasks()) { |
| 543 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks); |
| 544 |
0
|
if (lastComparison != 0) { |
| 545 |
0
|
return lastComparison; |
| 546 |
|
} |
| 547 |
|
} |
| 548 |
0
|
lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(typedOther.isSetReduceTasks()); |
| 549 |
0
|
if (lastComparison != 0) { |
| 550 |
0
|
return lastComparison; |
| 551 |
|
} |
| 552 |
0
|
if (isSetReduceTasks()) { |
| 553 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks); |
| 554 |
0
|
if (lastComparison != 0) { |
| 555 |
0
|
return lastComparison; |
| 556 |
|
} |
| 557 |
|
} |
| 558 |
0
|
lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(typedOther.isSetMaxMapTasks()); |
| 559 |
0
|
if (lastComparison != 0) { |
| 560 |
0
|
return lastComparison; |
| 561 |
|
} |
| 562 |
0
|
if (isSetMaxMapTasks()) { |
| 563 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks); |
| 564 |
0
|
if (lastComparison != 0) { |
| 565 |
0
|
return lastComparison; |
| 566 |
|
} |
| 567 |
|
} |
| 568 |
0
|
lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(typedOther.isSetMaxReduceTasks()); |
| 569 |
0
|
if (lastComparison != 0) { |
| 570 |
0
|
return lastComparison; |
| 571 |
|
} |
| 572 |
0
|
if (isSetMaxReduceTasks()) { |
| 573 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks); |
| 574 |
0
|
if (lastComparison != 0) { |
| 575 |
0
|
return lastComparison; |
| 576 |
|
} |
| 577 |
|
} |
| 578 |
0
|
lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState()); |
| 579 |
0
|
if (lastComparison != 0) { |
| 580 |
0
|
return lastComparison; |
| 581 |
|
} |
| 582 |
0
|
if (isSetState()) { |
| 583 |
0
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state); |
| 584 |
0
|
if (lastComparison != 0) { |
| 585 |
0
|
return lastComparison; |
| 586 |
|
} |
| 587 |
|
} |
| 588 |
0
|
return 0; |
| 589 |
|
} |
| 590 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 591 |
0
|
public _Fields fieldForId(int fieldId) {... |
| 592 |
0
|
return _Fields.findByThriftId(fieldId); |
| 593 |
|
} |
| 594 |
|
|
|
|
|
| 0% |
Uncovered Elements: 61 (61) |
Complexity: 14 |
Complexity Density: 0.3 |
|
| 595 |
0
|
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {... |
| 596 |
0
|
org.apache.thrift.protocol.TField field; |
| 597 |
0
|
iprot.readStructBegin(); |
| 598 |
0
|
while (true) |
| 599 |
|
{ |
| 600 |
0
|
field = iprot.readFieldBegin(); |
| 601 |
0
|
if (field.type == org.apache.thrift.protocol.TType.STOP) { |
| 602 |
0
|
break; |
| 603 |
|
} |
| 604 |
0
|
switch (field.id) { |
| 605 |
0
|
case 1: |
| 606 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 607 |
0
|
this.taskTrackers = iprot.readI32(); |
| 608 |
0
|
setTaskTrackersIsSet(true); |
| 609 |
|
} else { |
| 610 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 611 |
|
} |
| 612 |
0
|
break; |
| 613 |
0
|
case 2: |
| 614 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 615 |
0
|
this.mapTasks = iprot.readI32(); |
| 616 |
0
|
setMapTasksIsSet(true); |
| 617 |
|
} else { |
| 618 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 619 |
|
} |
| 620 |
0
|
break; |
| 621 |
0
|
case 3: |
| 622 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 623 |
0
|
this.reduceTasks = iprot.readI32(); |
| 624 |
0
|
setReduceTasksIsSet(true); |
| 625 |
|
} else { |
| 626 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 627 |
|
} |
| 628 |
0
|
break; |
| 629 |
0
|
case 4: |
| 630 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 631 |
0
|
this.maxMapTasks = iprot.readI32(); |
| 632 |
0
|
setMaxMapTasksIsSet(true); |
| 633 |
|
} else { |
| 634 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 635 |
|
} |
| 636 |
0
|
break; |
| 637 |
0
|
case 5: |
| 638 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 639 |
0
|
this.maxReduceTasks = iprot.readI32(); |
| 640 |
0
|
setMaxReduceTasksIsSet(true); |
| 641 |
|
} else { |
| 642 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 643 |
|
} |
| 644 |
0
|
break; |
| 645 |
0
|
case 6: |
| 646 |
0
|
if (field.type == org.apache.thrift.protocol.TType.I32) { |
| 647 |
0
|
this.state = JobTrackerState.findByValue(iprot.readI32()); |
| 648 |
|
} else { |
| 649 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 650 |
|
} |
| 651 |
0
|
break; |
| 652 |
0
|
default: |
| 653 |
0
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); |
| 654 |
|
} |
| 655 |
0
|
iprot.readFieldEnd(); |
| 656 |
|
} |
| 657 |
0
|
iprot.readStructEnd(); |
| 658 |
0
|
validate(); |
| 659 |
|
} |
| 660 |
|
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 2 |
Complexity Density: 0.09 |
|
| 661 |
0
|
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {... |
| 662 |
0
|
validate(); |
| 663 |
|
|
| 664 |
0
|
oprot.writeStructBegin(STRUCT_DESC); |
| 665 |
0
|
oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); |
| 666 |
0
|
oprot.writeI32(this.taskTrackers); |
| 667 |
0
|
oprot.writeFieldEnd(); |
| 668 |
0
|
oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); |
| 669 |
0
|
oprot.writeI32(this.mapTasks); |
| 670 |
0
|
oprot.writeFieldEnd(); |
| 671 |
0
|
oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); |
| 672 |
0
|
oprot.writeI32(this.reduceTasks); |
| 673 |
0
|
oprot.writeFieldEnd(); |
| 674 |
0
|
oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); |
| 675 |
0
|
oprot.writeI32(this.maxMapTasks); |
| 676 |
0
|
oprot.writeFieldEnd(); |
| 677 |
0
|
oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); |
| 678 |
0
|
oprot.writeI32(this.maxReduceTasks); |
| 679 |
0
|
oprot.writeFieldEnd(); |
| 680 |
0
|
if (this.state != null) { |
| 681 |
0
|
oprot.writeFieldBegin(STATE_FIELD_DESC); |
| 682 |
0
|
oprot.writeI32(this.state.getValue()); |
| 683 |
0
|
oprot.writeFieldEnd(); |
| 684 |
|
} |
| 685 |
0
|
oprot.writeFieldStop(); |
| 686 |
0
|
oprot.writeStructEnd(); |
| 687 |
|
} |
| 688 |
|
|
|
|
|
| 0% |
Uncovered Elements: 46 (46) |
Complexity: 7 |
Complexity Density: 0.21 |
|
| 689 |
0
|
@Override... |
| 690 |
|
public String toString() { |
| 691 |
0
|
StringBuilder sb = new StringBuilder("HiveClusterStatus("); |
| 692 |
0
|
boolean first = true; |
| 693 |
|
|
| 694 |
0
|
sb.append("taskTrackers:"); |
| 695 |
0
|
sb.append(this.taskTrackers); |
| 696 |
0
|
first = false; |
| 697 |
0
|
if (!first) sb.append(", "); |
| 698 |
0
|
sb.append("mapTasks:"); |
| 699 |
0
|
sb.append(this.mapTasks); |
| 700 |
0
|
first = false; |
| 701 |
0
|
if (!first) sb.append(", "); |
| 702 |
0
|
sb.append("reduceTasks:"); |
| 703 |
0
|
sb.append(this.reduceTasks); |
| 704 |
0
|
first = false; |
| 705 |
0
|
if (!first) sb.append(", "); |
| 706 |
0
|
sb.append("maxMapTasks:"); |
| 707 |
0
|
sb.append(this.maxMapTasks); |
| 708 |
0
|
first = false; |
| 709 |
0
|
if (!first) sb.append(", "); |
| 710 |
0
|
sb.append("maxReduceTasks:"); |
| 711 |
0
|
sb.append(this.maxReduceTasks); |
| 712 |
0
|
first = false; |
| 713 |
0
|
if (!first) sb.append(", "); |
| 714 |
0
|
sb.append("state:"); |
| 715 |
0
|
if (this.state == null) { |
| 716 |
0
|
sb.append("null"); |
| 717 |
|
} else { |
| 718 |
0
|
sb.append(this.state); |
| 719 |
|
} |
| 720 |
0
|
first = false; |
| 721 |
0
|
sb.append(")"); |
| 722 |
0
|
return sb.toString(); |
| 723 |
|
} |
| 724 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 725 |
0
|
public void validate() throws org.apache.thrift.TException {... |
| 726 |
|
|
| 727 |
|
} |
| 728 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 729 |
0
|
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {... |
| 730 |
0
|
try { |
| 731 |
0
|
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| 732 |
|
} catch (org.apache.thrift.TException te) { |
| 733 |
0
|
throw new java.io.IOException(te); |
| 734 |
|
} |
| 735 |
|
} |
| 736 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 737 |
0
|
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {... |
| 738 |
0
|
try { |
| 739 |
|
|
| 740 |
0
|
__isset_bit_vector = new BitSet(1); |
| 741 |
0
|
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| 742 |
|
} catch (org.apache.thrift.TException te) { |
| 743 |
0
|
throw new java.io.IOException(te); |
| 744 |
|
} |
| 745 |
|
} |
| 746 |
|
|
| 747 |
|
} |
| 748 |
|
|