http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/FieldSchema.java ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/FieldSchema.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/FieldSchema.java index 6953ca8..1aba6ef 100644 --- a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/FieldSchema.java +++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/FieldSchema.java @@ -50,15 +50,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * The field schema contains the name the type and some simple statistics about the field. + * The field schema contains the field's name and type. */ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSchema._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FieldSchema"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField NUMBER_OF_TERMS_ESTIMATE_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfTermsEstimate", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField SHARD_EXISTENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("shardExistence", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -76,15 +74,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc * @see TYPE */ public TYPE type; // required - /** - * This is an estimate of the number of terms present in the index. This is a naive - * estimate, it is a sum of all the terms in each of the segments in each of the shards. - */ - public long numberOfTermsEstimate; // required - /** - * The number of shards in which this field exists. - */ - public int shardExistence; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -97,16 +86,7 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc * * @see TYPE */ - TYPE((short)2, "type"), - /** - * This is an estimate of the number of terms present in the index. This is a naive - * estimate, it is a sum of all the terms in each of the segments in each of the shards. - */ - NUMBER_OF_TERMS_ESTIMATE((short)3, "numberOfTermsEstimate"), - /** - * The number of shards in which this field exists. - */ - SHARD_EXISTENCE((short)4, "shardExistence"); + TYPE((short)2, "type"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -125,10 +105,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc return NAME; case 2: // TYPE return TYPE; - case 3: // NUMBER_OF_TERMS_ESTIMATE - return NUMBER_OF_TERMS_ESTIMATE; - case 4: // SHARD_EXISTENCE - return SHARD_EXISTENCE; default: return null; } @@ -169,9 +145,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc } // isset id assignments - private static final int __NUMBEROFTERMSESTIMATE_ISSET_ID = 0; - private static final int __SHARDEXISTENCE_ISSET_ID = 1; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -179,10 +152,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TYPE.class))); - tmpMap.put(_Fields.NUMBER_OF_TERMS_ESTIMATE, new org.apache.thrift.meta_data.FieldMetaData("numberOfTermsEstimate", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SHARD_EXISTENCE, new org.apache.thrift.meta_data.FieldMetaData("shardExistence", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); } @@ -192,32 +161,23 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc public FieldSchema( String name, - TYPE type, - long numberOfTermsEstimate, - int shardExistence) + TYPE type) { this(); this.name = name; this.type = type; - this.numberOfTermsEstimate = numberOfTermsEstimate; - setNumberOfTermsEstimateIsSet(true); - this.shardExistence = shardExistence; - setShardExistenceIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public FieldSchema(FieldSchema other) { - __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } if (other.isSetType()) { this.type = other.type; } - this.numberOfTermsEstimate = other.numberOfTermsEstimate; - this.shardExistence = other.shardExistence; } public FieldSchema deepCopy() { @@ -228,10 +188,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc public void clear() { this.name = null; this.type = null; - setNumberOfTermsEstimateIsSet(false); - this.numberOfTermsEstimate = 0; - setShardExistenceIsSet(false); - this.shardExistence = 0; } /** @@ -298,66 +254,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc } } - /** - * This is an estimate of the number of terms present in the index. This is a naive - * estimate, it is a sum of all the terms in each of the segments in each of the shards. - */ - public long getNumberOfTermsEstimate() { - return this.numberOfTermsEstimate; - } - - /** - * This is an estimate of the number of terms present in the index. This is a naive - * estimate, it is a sum of all the terms in each of the segments in each of the shards. - */ - public FieldSchema setNumberOfTermsEstimate(long numberOfTermsEstimate) { - this.numberOfTermsEstimate = numberOfTermsEstimate; - setNumberOfTermsEstimateIsSet(true); - return this; - } - - public void unsetNumberOfTermsEstimate() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID); - } - - /** Returns true if field numberOfTermsEstimate is set (has been assigned a value) and false otherwise */ - public boolean isSetNumberOfTermsEstimate() { - return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID); - } - - public void setNumberOfTermsEstimateIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID, value); - } - - /** - * The number of shards in which this field exists. - */ - public int getShardExistence() { - return this.shardExistence; - } - - /** - * The number of shards in which this field exists. - */ - public FieldSchema setShardExistence(int shardExistence) { - this.shardExistence = shardExistence; - setShardExistenceIsSet(true); - return this; - } - - public void unsetShardExistence() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID); - } - - /** Returns true if field shardExistence is set (has been assigned a value) and false otherwise */ - public boolean isSetShardExistence() { - return EncodingUtils.testBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID); - } - - public void setShardExistenceIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: @@ -376,22 +272,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc } break; - case NUMBER_OF_TERMS_ESTIMATE: - if (value == null) { - unsetNumberOfTermsEstimate(); - } else { - setNumberOfTermsEstimate((Long)value); - } - break; - - case SHARD_EXISTENCE: - if (value == null) { - unsetShardExistence(); - } else { - setShardExistence((Integer)value); - } - break; - } } @@ -403,12 +283,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc case TYPE: return getType(); - case NUMBER_OF_TERMS_ESTIMATE: - return Long.valueOf(getNumberOfTermsEstimate()); - - case SHARD_EXISTENCE: - return Integer.valueOf(getShardExistence()); - } throw new IllegalStateException(); } @@ -424,10 +298,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc return isSetName(); case TYPE: return isSetType(); - case NUMBER_OF_TERMS_ESTIMATE: - return isSetNumberOfTermsEstimate(); - case SHARD_EXISTENCE: - return isSetShardExistence(); } throw new IllegalStateException(); } @@ -463,24 +333,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc return false; } - boolean this_present_numberOfTermsEstimate = true; - boolean that_present_numberOfTermsEstimate = true; - if (this_present_numberOfTermsEstimate || that_present_numberOfTermsEstimate) { - if (!(this_present_numberOfTermsEstimate && that_present_numberOfTermsEstimate)) - return false; - if (this.numberOfTermsEstimate != that.numberOfTermsEstimate) - return false; - } - - boolean this_present_shardExistence = true; - boolean that_present_shardExistence = true; - if (this_present_shardExistence || that_present_shardExistence) { - if (!(this_present_shardExistence && that_present_shardExistence)) - return false; - if (this.shardExistence != that.shardExistence) - return false; - } - return true; } @@ -517,26 +369,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNumberOfTermsEstimate()).compareTo(typedOther.isSetNumberOfTermsEstimate()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumberOfTermsEstimate()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfTermsEstimate, typedOther.numberOfTermsEstimate); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetShardExistence()).compareTo(typedOther.isSetShardExistence()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetShardExistence()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardExistence, typedOther.shardExistence); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -572,14 +404,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc sb.append(this.type); } first = false; - if (!first) sb.append(", "); - sb.append("numberOfTermsEstimate:"); - sb.append(this.numberOfTermsEstimate); - first = false; - if (!first) sb.append(", "); - sb.append("shardExistence:"); - sb.append(this.shardExistence); - first = false; sb.append(")"); return sb.toString(); } @@ -599,8 +423,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; 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); @@ -641,22 +463,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // NUMBER_OF_TERMS_ESTIMATE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numberOfTermsEstimate = iprot.readI64(); - struct.setNumberOfTermsEstimateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SHARD_EXISTENCE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.shardExistence = iprot.readI32(); - struct.setShardExistenceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -682,12 +488,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(NUMBER_OF_TERMS_ESTIMATE_FIELD_DESC); - oprot.writeI64(struct.numberOfTermsEstimate); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SHARD_EXISTENCE_FIELD_DESC); - oprot.writeI32(struct.shardExistence); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -712,31 +512,19 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc if (struct.isSetType()) { optionals.set(1); } - if (struct.isSetNumberOfTermsEstimate()) { - optionals.set(2); - } - if (struct.isSetShardExistence()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); + oprot.writeBitSet(optionals, 2); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } - if (struct.isSetNumberOfTermsEstimate()) { - oprot.writeI64(struct.numberOfTermsEstimate); - } - if (struct.isSetShardExistence()) { - oprot.writeI32(struct.shardExistence); - } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -745,14 +533,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc struct.type = TYPE.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } - if (incoming.get(2)) { - struct.numberOfTermsEstimate = iprot.readI64(); - struct.setNumberOfTermsEstimateIsSet(true); - } - if (incoming.get(3)) { - struct.shardExistence = iprot.readI32(); - struct.setShardExistenceIsSet(true); - } } }
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm b/src/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm index 4afb02a..702259b 100644 --- a/src/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm +++ b/src/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm @@ -3612,21 +3612,17 @@ sub write { package Blur::Blur_schema_args; use base qw(Class::Accessor); -Blur::Blur_schema_args->mk_accessors( qw( session shardsIds ) ); +Blur::Blur_schema_args->mk_accessors( qw( session ) ); sub new { my $classname = shift; my $self = {}; my $vals = shift || {}; $self->{session} = undef; - $self->{shardsIds} = undef; if (UNIVERSAL::isa($vals,'HASH')) { if (defined $vals->{session}) { $self->{session} = $vals->{session}; } - if (defined $vals->{shardsIds}) { - $self->{shardsIds} = $vals->{shardsIds}; - } } return bless ($self, $classname); } @@ -3657,24 +3653,6 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::LIST) { - { - my $_size232 = 0; - $self->{shardsIds} = []; - my $_etype235 = 0; - $xfer += $input->readListBegin(\$_etype235, \$_size232); - for (my $_i236 = 0; $_i236 < $_size232; ++$_i236) - { - my $elem237 = undef; - $xfer += $input->readI32(\$elem237); - push(@{$self->{shardsIds}},$elem237); - } - $xfer += $input->readListEnd(); - } - } else { - $xfer += $input->skip($ftype); - } - last; }; $xfer += $input->skip($ftype); } $xfer += $input->readFieldEnd(); @@ -3692,20 +3670,6 @@ sub write { $xfer += $self->{session}->write($output); $xfer += $output->writeFieldEnd(); } - if (defined $self->{shardsIds}) { - $xfer += $output->writeFieldBegin('shardsIds', TType::LIST, 2); - { - $xfer += $output->writeListBegin(TType::I32, scalar(@{$self->{shardsIds}})); - { - foreach my $iter238 (@{$self->{shardsIds}}) - { - $xfer += $output->writeI32($iter238); - } - } - $xfer += $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4108,7 +4072,6 @@ sub queryStatus{ sub schema{ my $self = shift; my $session = shift; - my $shardsIds = shift; die 'implement interface'; } @@ -4299,8 +4262,7 @@ sub schema{ my ($self, $request) = @_; my $session = ($request->{'session'}) ? $request->{'session'} : undef; - my $shardsIds = ($request->{'shardsIds'}) ? $request->{'shardsIds'} : undef; - return $self->{impl}->schema($session, $shardsIds); + return $self->{impl}->schema($session); } sub tableStats{ @@ -5344,21 +5306,18 @@ sub recv_queryStatus{ sub schema{ my $self = shift; my $session = shift; - my $shardsIds = shift; - $self->send_schema($session, $shardsIds); + $self->send_schema($session); return $self->recv_schema(); } sub send_schema{ my $self = shift; my $session = shift; - my $shardsIds = shift; $self->{output}->writeMessageBegin('schema', TMessageType::CALL, $self->{seqid}); my $args = new Blur::Blur_schema_args(); $args->{session} = $session; - $args->{shardsIds} = $shardsIds; $args->write($self->{output}); $self->{output}->writeMessageEnd(); $self->{output}->getTransport()->flush(); @@ -5851,7 +5810,7 @@ sub process_schema { $input->readMessageEnd(); my $result = new Blur::Blur_schema_result(); eval { - $result->{success} = $self->{handler}->schema($args->session, $args->shardsIds); + $result->{success} = $self->{handler}->schema($args->session); }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ $result->{ex} = $@; } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm b/src/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm index 8caf64b..794270b 100644 --- a/src/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm +++ b/src/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm @@ -426,7 +426,7 @@ sub write { package Blur::FieldSchema; use base qw(Class::Accessor); -Blur::FieldSchema->mk_accessors( qw( name type numberOfTermsEstimate shardExistence ) ); +Blur::FieldSchema->mk_accessors( qw( name type ) ); sub new { my $classname = shift; @@ -434,8 +434,6 @@ sub new { my $vals = shift || {}; $self->{name} = undef; $self->{type} = undef; - $self->{numberOfTermsEstimate} = undef; - $self->{shardExistence} = undef; if (UNIVERSAL::isa($vals,'HASH')) { if (defined $vals->{name}) { $self->{name} = $vals->{name}; @@ -443,12 +441,6 @@ sub new { if (defined $vals->{type}) { $self->{type} = $vals->{type}; } - if (defined $vals->{numberOfTermsEstimate}) { - $self->{numberOfTermsEstimate} = $vals->{numberOfTermsEstimate}; - } - if (defined $vals->{shardExistence}) { - $self->{shardExistence} = $vals->{shardExistence}; - } } return bless ($self, $classname); } @@ -484,18 +476,6 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::I64) { - $xfer += $input->readI64(\$self->{numberOfTermsEstimate}); - } else { - $xfer += $input->skip($ftype); - } - last; }; - /^4$/ && do{ if ($ftype == TType::I32) { - $xfer += $input->readI32(\$self->{shardExistence}); - } else { - $xfer += $input->skip($ftype); - } - last; }; $xfer += $input->skip($ftype); } $xfer += $input->readFieldEnd(); @@ -518,16 +498,6 @@ sub write { $xfer += $output->writeI32($self->{type}); $xfer += $output->writeFieldEnd(); } - if (defined $self->{numberOfTermsEstimate}) { - $xfer += $output->writeFieldBegin('numberOfTermsEstimate', TType::I64, 3); - $xfer += $output->writeI64($self->{numberOfTermsEstimate}); - $xfer += $output->writeFieldEnd(); - } - if (defined $self->{shardExistence}) { - $xfer += $output->writeFieldBegin('shardExistence', TType::I32, 4); - $xfer += $output->writeI32($self->{shardExistence}); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-rb/blur.rb ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-rb/blur.rb b/src/distribution/src/main/scripts/interface/gen-rb/blur.rb index d9931b2..538eb35 100644 --- a/src/distribution/src/main/scripts/interface/gen-rb/blur.rb +++ b/src/distribution/src/main/scripts/interface/gen-rb/blur.rb @@ -357,13 +357,13 @@ module Blur raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryStatus failed: unknown result') end - def schema(session, shardsIds) - send_schema(session, shardsIds) + def schema(session) + send_schema(session) return recv_schema() end - def send_schema(session, shardsIds) - send_message('schema', Schema_args, :session => session, :shardsIds => shardsIds) + def send_schema(session) + send_message('schema', Schema_args, :session => session) end def recv_schema() @@ -640,7 +640,7 @@ module Blur args = read_args(iprot, Schema_args) result = Schema_result.new() begin - result.success = @handler.schema(args.session, args.shardsIds) + result.success = @handler.schema(args.session) rescue ::Blur::BlurException => ex result.ex = ex end @@ -1420,11 +1420,9 @@ module Blur class Schema_args include ::Thrift::Struct, ::Thrift::Struct_Union SESSION = 1 - SHARDSIDS = 2 FIELDS = { - SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session}, - SHARDSIDS => {:type => ::Thrift::Types::LIST, :name => 'shardsIds', :element => {:type => ::Thrift::Types::I32}} + SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session} } def struct_fields; FIELDS; end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-rb/blur_types.rb ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-rb/blur_types.rb b/src/distribution/src/main/scripts/interface/gen-rb/blur_types.rb index 100fab8..9b26ed5 100644 --- a/src/distribution/src/main/scripts/interface/gen-rb/blur_types.rb +++ b/src/distribution/src/main/scripts/interface/gen-rb/blur_types.rb @@ -168,24 +168,17 @@ module Blur ::Thrift::Struct.generate_accessors self end - # The field schema contains the name the type and some simple statistics about the field. + # The field schema contains the field's name and type. class FieldSchema include ::Thrift::Struct, ::Thrift::Struct_Union NAME = 1 TYPE = 2 - NUMBEROFTERMSESTIMATE = 3 - SHARDEXISTENCE = 4 FIELDS = { # The name of the field. NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, # The type of the field. - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Blur::TYPE}, - # This is an estimate of the number of terms present in the index. This is a naive -# estimate, it is a sum of all the terms in each of the segments in each of the shards. - NUMBEROFTERMSESTIMATE => {:type => ::Thrift::Types::I64, :name => 'numberOfTermsEstimate'}, - # The number of shards in which this field exists. - SHARDEXISTENCE => {:type => ::Thrift::Types::I32, :name => 'shardExistence'} + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Blur::TYPE} } def struct_fields; FIELDS; end
