Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java?rev=1437479&r1=1437478&r2=1437479&view=diff ============================================================================== --- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java (original) +++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java Wed Jan 23 15:32:52 2013 @@ -59,7 +59,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new PKeyExtentTupleSchemeFactory()); } - public ByteBuffer tableId; // required + public String tableId; // required public ByteBuffer endRow; // required public ByteBuffer prevEndRow; // required @@ -132,7 +132,7 @@ import org.slf4j.LoggerFactory; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.END_ROW, new org.apache.thrift.meta_data.FieldMetaData("endRow", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.PREV_END_ROW, new org.apache.thrift.meta_data.FieldMetaData("prevEndRow", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -145,7 +145,7 @@ import org.slf4j.LoggerFactory; } public PKeyExtent( - ByteBuffer tableId, + String tableId, ByteBuffer endRow, ByteBuffer prevEndRow) { @@ -160,8 +160,7 @@ import org.slf4j.LoggerFactory; */ public PKeyExtent(PKeyExtent other) { if (other.isSetTableId()) { - this.tableId = org.apache.thrift.TBaseHelper.copyBinary(other.tableId); -; + this.tableId = other.tableId; } if (other.isSetEndRow()) { this.endRow = org.apache.thrift.TBaseHelper.copyBinary(other.endRow); @@ -184,21 +183,11 @@ import org.slf4j.LoggerFactory; this.prevEndRow = null; } - public byte[] getTableId() { - setTableId(org.apache.thrift.TBaseHelper.rightSize(tableId)); - return tableId == null ? null : tableId.array(); - } - - public ByteBuffer bufferForTableId() { - return tableId; - } - - public PKeyExtent setTableId(byte[] tableId) { - setTableId(tableId == null ? (ByteBuffer)null : ByteBuffer.wrap(tableId)); - return this; + public String getTableId() { + return this.tableId; } - public PKeyExtent setTableId(ByteBuffer tableId) { + public PKeyExtent setTableId(String tableId) { this.tableId = tableId; return this; } @@ -292,7 +281,7 @@ import org.slf4j.LoggerFactory; if (value == null) { unsetTableId(); } else { - setTableId((ByteBuffer)value); + setTableId((String)value); } break; @@ -457,7 +446,7 @@ import org.slf4j.LoggerFactory; if (this.tableId == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.tableId, sb); + sb.append(this.tableId); } first = false; if (!first) sb.append(", "); @@ -521,7 +510,7 @@ import org.slf4j.LoggerFactory; switch (schemeField.id) { case 1: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.tableId = iprot.readBinary(); + struct.tableId = iprot.readString(); struct.setTableIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -560,7 +549,7 @@ import org.slf4j.LoggerFactory; oprot.writeStructBegin(STRUCT_DESC); if (struct.tableId != null) { oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); - oprot.writeBinary(struct.tableId); + oprot.writeString(struct.tableId); oprot.writeFieldEnd(); } if (struct.endRow != null) { @@ -602,7 +591,7 @@ import org.slf4j.LoggerFactory; } oprot.writeBitSet(optionals, 3); if (struct.isSetTableId()) { - oprot.writeBinary(struct.tableId); + oprot.writeString(struct.tableId); } if (struct.isSetEndRow()) { oprot.writeBinary(struct.endRow); @@ -617,7 +606,7 @@ import org.slf4j.LoggerFactory; TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.tableId = iprot.readBinary(); + struct.tableId = iprot.readString(); struct.setTableIdIsSet(true); } if (incoming.get(1)) {
Modified: accumulo/trunk/proxy/src/main/thrift/proxy.thrift URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/thrift/proxy.thrift?rev=1437479&r1=1437478&r2=1437479&view=diff ============================================================================== --- accumulo/trunk/proxy/src/main/thrift/proxy.thrift (original) +++ accumulo/trunk/proxy/src/main/thrift/proxy.thrift Wed Jan 23 15:32:52 2013 @@ -109,7 +109,7 @@ enum PScanState { } struct PKeyExtent { - 1:binary tableId, + 1:string tableId, 2:binary endRow, 3:binary prevEndRow } @@ -123,7 +123,7 @@ struct PColumn { struct PActiveScan { 1:string client 2:string user - 3:string tableId + 3:string table 4:i64 age 5:i64 idleTime 6:PScanType type @@ -256,7 +256,7 @@ service AccumuloProxy // security operations bool securityOperations_authenticateUser (1:UserPass userpass, 2:string user, 3:binary password) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); - void securityOperations_changeUserAuthorizations (1:UserPass userpass, 2:string user, 3:set<string> authorizations) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); + void securityOperations_changeUserAuthorizations (1:UserPass userpass, 2:string user, 3:set<binary> authorizations) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); void securityOperations_changeUserPassword (1:UserPass userpass, 2:string user, 3:binary password) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); void securityOperations_createUser (1:UserPass userpass, 2:string user, 3:binary password) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); void securityOperations_dropUser (1:UserPass userpass, 2:string user) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2); @@ -272,8 +272,8 @@ service AccumuloProxy // scanning - string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:set<string> authorizations, 4:PIteratorSetting iteratorSetting, 5:list<PRange> range); - string createScanner(1:UserPass userpass, 2:string tableName, 3:set<string> authorizations, 4:PIteratorSetting iteratorSetting, 5:PRange range); + string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:set<binary> authorizations, 4:list<PIteratorSetting> iteratorSetting, 5:list<PRange> range); + string createScanner(1:UserPass userpass, 2:string tableName, 3:set<binary> authorizations, 4:list<PIteratorSetting> iteratorSetting, 5:PRange range); bool scanner_hasnext(1:string scanner); KeyValueAndPeek scanner_next(1:string scanner);
