public THRegionLocation deepCopy() { return new THRegionLocation(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof THRegionLocation) return this.equals((THRegionLocation)that); return false; }
@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERVER_NAME: return getServerName(); case REGION_INFO: return getRegionInfo(); } throw new java.lang.IllegalStateException(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SERVER_NAME: return isSetServerName(); case REGION_INFO: return isSetRegionInfo(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SERVER_NAME: if (value == null) { unsetServerName(); } else { setServerName((TServerName)value); } break; case REGION_INFO: if (value == null) { unsetRegionInfo(); } else { setRegionInfo((THRegionInfo)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new THRegionLocation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); } } }
public static THRegionLocation regionLocationFromHBase(HRegionLocation hrl) { HRegionInfo hri = hrl.getRegionInfo(); ServerName serverName = hrl.getServerName(); THRegionInfo thRegionInfo = new THRegionInfo(); THRegionLocation thRegionLocation = new THRegionLocation(); TServerName tServerName = new TServerName(); tServerName.setHostName(serverName.getHostname()); tServerName.setPort(serverName.getPort()); tServerName.setStartCode(serverName.getStartcode()); thRegionInfo.setTableName(hri.getTable().getName()); thRegionInfo.setEndKey(hri.getEndKey()); thRegionInfo.setStartKey(hri.getStartKey()); thRegionInfo.setOffline(hri.isOffline()); thRegionInfo.setSplit(hri.isSplit()); thRegionInfo.setReplicaId(hri.getReplicaId()); thRegionLocation.setRegionInfo(thRegionInfo); thRegionLocation.setServerName(tServerName); return thRegionLocation; }
struct.serverName = new TServerName(); struct.serverName.read(iprot); struct.setServerNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.regionInfo = new THRegionInfo(); struct.regionInfo.read(iprot); struct.setRegionInfoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, THRegionLocation struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.serverName = new TServerName(); struct.serverName.read(iprot); struct.setServerNameIsSet(true); struct.regionInfo = new THRegionInfo(); struct.regionInfo.read(iprot); struct.setRegionInfoIsSet(true); } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetServerName()) ? 131071 : 524287); if (isSetServerName()) hashCode = hashCode * 8191 + serverName.hashCode(); hashCode = hashCode * 8191 + ((isSetRegionInfo()) ? 131071 : 524287); if (isSetRegionInfo()) hashCode = hashCode * 8191 + regionInfo.hashCode(); return hashCode; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SERVER_NAME: if (value == null) { unsetServerName(); } else { setServerName((TServerName)value); } break; case REGION_INFO: if (value == null) { unsetRegionInfo(); } else { setRegionInfo((THRegionInfo)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new THRegionLocation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); } } }
public static THRegionLocation regionLocationFromHBase(HRegionLocation hrl) { HRegionInfo hri = hrl.getRegionInfo(); ServerName serverName = hrl.getServerName(); THRegionInfo thRegionInfo = new THRegionInfo(); THRegionLocation thRegionLocation = new THRegionLocation(); TServerName tServerName = new TServerName(); tServerName.setHostName(serverName.getHostname()); tServerName.setPort(serverName.getPort()); tServerName.setStartCode(serverName.getStartcode()); thRegionInfo.setTableName(hri.getTable().getName()); thRegionInfo.setEndKey(hri.getEndKey()); thRegionInfo.setStartKey(hri.getStartKey()); thRegionInfo.setOffline(hri.isOffline()); thRegionInfo.setSplit(hri.isSplit()); thRegionInfo.setReplicaId(hri.getReplicaId()); thRegionLocation.setRegionInfo(thRegionInfo); thRegionLocation.setServerName(tServerName); return thRegionLocation; }
struct.serverName = new TServerName(); struct.serverName.read(iprot); struct.setServerNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.regionInfo = new THRegionInfo(); struct.regionInfo.read(iprot); struct.setRegionInfoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, THRegionLocation struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.serverName = new TServerName(); struct.serverName.read(iprot); struct.setServerNameIsSet(true); struct.regionInfo = new THRegionInfo(); struct.regionInfo.read(iprot); struct.setRegionInfoIsSet(true); } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public boolean equals(THRegionLocation that) { if (that == null) return false; if (this == that) return true; boolean this_present_serverName = true && this.isSetServerName(); boolean that_present_serverName = true && that.isSetServerName(); if (this_present_serverName || that_present_serverName) { if (!(this_present_serverName && that_present_serverName)) return false; if (!this.serverName.equals(that.serverName)) return false; } boolean this_present_regionInfo = true && this.isSetRegionInfo(); boolean that_present_regionInfo = true && that.isSetRegionInfo(); if (this_present_regionInfo || that_present_regionInfo) { if (!(this_present_regionInfo && that_present_regionInfo)) return false; if (!this.regionInfo.equals(that.regionInfo)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SERVER_NAME: if (value == null) { unsetServerName(); } else { setServerName((TServerName)value); } break; case REGION_INFO: if (value == null) { unsetRegionInfo(); } else { setRegionInfo((THRegionInfo)value); } break; } }
case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new THRegionLocation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else {