@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case START_KEY: return getStartKey(); case END_KEY: return getEndKey(); case ID: return getId(); case NAME: return getName(); case VERSION: return getVersion(); case SERVER_NAME: return getServerName(); case PORT: return getPort(); } throw new java.lang.IllegalStateException(); }
+ Bytes.toStringBinary(row)); TRegionInfo region = new TRegionInfo(); region.setStartKey(regionInfo.getStartKey()); region.setEndKey(regionInfo.getEndKey()); region.id = regionInfo.getRegionId(); region.setName(regionInfo.getRegionName()); region.setServerName(Bytes.toBytes(serverName.getHostname())); region.port = serverName.getPort();
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof TRegionInfo) return this.equals((TRegionInfo)that); return false; }
/** 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 START_KEY: return isSetStartKey(); case END_KEY: return isSetEndKey(); case ID: return isSetId(); case NAME: return isSetName(); case VERSION: return isSetVersion(); case SERVER_NAME: return isSetServerName(); case PORT: return isSetPort(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetStartKey()) ? 131071 : 524287); if (isSetStartKey()) hashCode = hashCode * 8191 + startKey.hashCode(); hashCode = hashCode * 8191 + ((isSetEndKey()) ? 131071 : 524287); if (isSetEndKey()) hashCode = hashCode * 8191 + endKey.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(id); hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); if (isSetName()) hashCode = hashCode * 8191 + name.hashCode(); hashCode = hashCode * 8191 + (int) (version); hashCode = hashCode * 8191 + ((isSetServerName()) ? 131071 : 524287); if (isSetServerName()) hashCode = hashCode * 8191 + serverName.hashCode(); hashCode = hashCode * 8191 + port; return hashCode; }
public TRegionInfo deepCopy() { return new TRegionInfo(this); }
public static void doTestGetRegionInfo(Hbase.Iface handler) throws Exception { // Create tableA and add two columns to rowA handler.createTable(tableAname, getColumnDescriptors()); try { handler.mutateRow(tableAname, rowAname, getMutations(), null); byte[] searchRow = HRegionInfo.createRegionName( TableName.valueOf(tableAname.array()), rowAname.array(), HConstants.NINES, false); TRegionInfo regionInfo = handler.getRegionInfo(ByteBuffer.wrap(searchRow)); assertTrue(Bytes.toStringBinary(regionInfo.getName()).startsWith( Bytes.toStringBinary(tableAname))); } finally { handler.disableTable(tableAname); handler.deleteTable(tableAname); } }
lastComparison = java.lang.Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey()); if (lastComparison != 0) { return lastComparison; if (isSetStartKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, other.startKey); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey()); if (lastComparison != 0) { return lastComparison; if (isSetEndKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, other.endKey); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; if (isSetName()) {
return true; boolean this_present_startKey = true && this.isSetStartKey(); boolean that_present_startKey = true && that.isSetStartKey(); if (this_present_startKey || that_present_startKey) { if (!(this_present_startKey && that_present_startKey)) boolean this_present_endKey = true && this.isSetEndKey(); boolean that_present_endKey = true && that.isSetEndKey(); if (this_present_endKey || that_present_endKey) { if (!(this_present_endKey && that_present_endKey)) boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) 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))
RegionInfo info = regionLocation.getRegionInfo(); ServerName serverName = regionLocation.getServerName(); TRegionInfo region = new TRegionInfo(); region.serverName = ByteBuffer.wrap( Bytes.toBytes(serverName.getHostname()));
public static void doTestGetRegionInfo(Hbase.Iface handler) throws Exception { // Create tableA and add two columns to rowA handler.createTable(tableAname, getColumnDescriptors()); try { handler.mutateRow(tableAname, rowAname, getMutations(), null); byte[] searchRow = HRegionInfo.createRegionName( TableName.valueOf(tableAname.array()), rowAname.array(), HConstants.NINES, false); TRegionInfo regionInfo = handler.getRegionInfo(ByteBuffer.wrap(searchRow)); assertTrue(Bytes.toStringBinary(regionInfo.getName()).startsWith( Bytes.toStringBinary(tableAname))); } finally { handler.disableTable(tableAname); handler.deleteTable(tableAname); } }
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetStartKey()) { optionals.set(0); if (struct.isSetEndKey()) { optionals.set(1); if (struct.isSetId()) { optionals.set(2); if (struct.isSetName()) { optionals.set(3); if (struct.isSetVersion()) { optionals.set(4); if (struct.isSetServerName()) { optionals.set(5); if (struct.isSetPort()) { optionals.set(6); if (struct.isSetStartKey()) { oprot.writeBinary(struct.startKey); if (struct.isSetEndKey()) { oprot.writeBinary(struct.endKey);
public Object getFieldValue(_Fields field) { switch (field) { case START_KEY: return getStartKey(); case END_KEY: return getEndKey(); case ID: return Long.valueOf(getId()); case NAME: return getName(); case VERSION: return Byte.valueOf(getVersion()); case SERVER_NAME: return getServerName(); case PORT: return Integer.valueOf(getPort()); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public TRegionInfo(TRegionInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetStartKey()) { this.startKey = org.apache.thrift.TBaseHelper.copyBinary(other.startKey); } if (other.isSetEndKey()) { this.endKey = org.apache.thrift.TBaseHelper.copyBinary(other.endKey); } this.id = other.id; if (other.isSetName()) { this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name); } this.version = other.version; if (other.isSetServerName()) { this.serverName = org.apache.thrift.TBaseHelper.copyBinary(other.serverName); } this.port = other.port; }
TRegionInfo region = new TRegionInfo(); region.setStartKey(regionInfo.getStartKey()); region.setEndKey(regionInfo.getEndKey()); region.id = regionInfo.getRegionId(); region.setName(regionInfo.getRegionName()); region.version = regionInfo.getVersion(); if (value != null && value.length > 0) { String hostAndPort = Bytes.toString(value); region.setServerName(Bytes.toBytes( Addressing.parseHostname(hostAndPort))); region.port = Addressing.parsePort(hostAndPort);
public TRegionInfo deepCopy() { return new TRegionInfo(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TRegionInfo) return this.equals((TRegionInfo)that); return false; }
public static void doTestGetRegionInfo(Hbase.Iface handler) throws Exception { // Create tableA and add two columns to rowA handler.createTable(tableAname, getColumnDescriptors()); try { handler.mutateRow(tableAname, rowAname, getMutations(), null); byte[] searchRow = HRegionInfo.createRegionName( TableName.valueOf(tableAname.array()), rowAname.array(), HConstants.NINES, false); TRegionInfo regionInfo = handler.getRegionInfo(ByteBuffer.wrap(searchRow)); assertTrue(Bytes.toStringBinary(regionInfo.getName()).startsWith( Bytes.toStringBinary(tableAname))); } finally { handler.disableTable(tableAname); handler.deleteTable(tableAname); } }
/** 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 IllegalArgumentException(); } switch (field) { case START_KEY: return isSetStartKey(); case END_KEY: return isSetEndKey(); case ID: return isSetId(); case NAME: return isSetName(); case VERSION: return isSetVersion(); case SERVER_NAME: return isSetServerName(); case PORT: return isSetPort(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case START_KEY: return getStartKey(); case END_KEY: return getEndKey(); case ID: return Long.valueOf(getId()); case NAME: return getName(); case VERSION: return Byte.valueOf(getVersion()); case SERVER_NAME: return getServerName(); case PORT: return Integer.valueOf(getPort()); } throw new IllegalStateException(); }