http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm ---------------------------------------------------------------------- diff --git a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm index 15b969e..1704f5d 100644 --- a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm +++ b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm @@ -1206,85 +1206,6 @@ sub write { return $xfer; } -package Blur::ExpertQuery; -use base qw(Class::Accessor); -Blur::ExpertQuery->mk_accessors( qw( query filter ) ); - -sub new { - my $classname = shift; - my $self = {}; - my $vals = shift || {}; - $self->{query} = undef; - $self->{filter} = undef; - if (UNIVERSAL::isa($vals,'HASH')) { - if (defined $vals->{query}) { - $self->{query} = $vals->{query}; - } - if (defined $vals->{filter}) { - $self->{filter} = $vals->{filter}; - } - } - return bless ($self, $classname); -} - -sub getName { - return 'ExpertQuery'; -} - -sub read { - my ($self, $input) = @_; - my $xfer = 0; - my $fname; - my $ftype = 0; - my $fid = 0; - $xfer += $input->readStructBegin(\$fname); - while (1) - { - $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { - last; - } - SWITCH: for($fid) - { - /^1$/ && do{ if ($ftype == TType::STRING) { - $xfer += $input->readString(\$self->{query}); - } else { - $xfer += $input->skip($ftype); - } - last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { - $xfer += $input->readString(\$self->{filter}); - } else { - $xfer += $input->skip($ftype); - } - last; }; - $xfer += $input->skip($ftype); - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; -} - -sub write { - my ($self, $output) = @_; - my $xfer = 0; - $xfer += $output->writeStructBegin('ExpertQuery'); - if (defined $self->{query}) { - $xfer += $output->writeFieldBegin('query', TType::STRING, 1); - $xfer += $output->writeString($self->{query}); - $xfer += $output->writeFieldEnd(); - } - if (defined $self->{filter}) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); - $xfer += $output->writeString($self->{filter}); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; -} - package Blur::Facet; use base qw(Class::Accessor); Blur::Facet->mk_accessors( qw( queryStr minimumNumberOfBlurResults ) ); @@ -1366,17 +1287,15 @@ sub write { package Blur::BlurQuery; use base qw(Class::Accessor); -Blur::BlurQuery->mk_accessors( qw( simpleQuery expertQuery facets selector allowStaleData useCacheIfPresent start fetch minimumNumberOfResults maxQueryTime uuid userContext cacheResult startTime modifyFileCaches ) ); +Blur::BlurQuery->mk_accessors( qw( simpleQuery facets selector useCacheIfPresent start fetch minimumNumberOfResults maxQueryTime uuid userContext cacheResult startTime ) ); sub new { my $classname = shift; my $self = {}; my $vals = shift || {}; $self->{simpleQuery} = undef; - $self->{expertQuery} = undef; $self->{facets} = undef; $self->{selector} = undef; - $self->{allowStaleData} = 0; $self->{useCacheIfPresent} = 1; $self->{start} = 0; $self->{fetch} = 10; @@ -1386,23 +1305,16 @@ sub new { $self->{userContext} = undef; $self->{cacheResult} = 1; $self->{startTime} = 0; - $self->{modifyFileCaches} = 1; if (UNIVERSAL::isa($vals,'HASH')) { if (defined $vals->{simpleQuery}) { $self->{simpleQuery} = $vals->{simpleQuery}; } - if (defined $vals->{expertQuery}) { - $self->{expertQuery} = $vals->{expertQuery}; - } if (defined $vals->{facets}) { $self->{facets} = $vals->{facets}; } if (defined $vals->{selector}) { $self->{selector} = $vals->{selector}; } - if (defined $vals->{allowStaleData}) { - $self->{allowStaleData} = $vals->{allowStaleData}; - } if (defined $vals->{useCacheIfPresent}) { $self->{useCacheIfPresent} = $vals->{useCacheIfPresent}; } @@ -1430,9 +1342,6 @@ sub new { if (defined $vals->{startTime}) { $self->{startTime} = $vals->{startTime}; } - if (defined $vals->{modifyFileCaches}) { - $self->{modifyFileCaches} = $vals->{modifyFileCaches}; - } } return bless ($self, $classname); } @@ -1463,13 +1372,6 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{expertQuery} = new Blur::ExpertQuery(); - $xfer += $self->{expertQuery}->read($input); - } else { - $xfer += $input->skip($ftype); - } - last; }; /^3$/ && do{ if ($ftype == TType::LIST) { { my $_size37 = 0; @@ -1496,12 +1398,6 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::BOOL) { - $xfer += $input->readBool(\$self->{allowStaleData}); - } else { - $xfer += $input->skip($ftype); - } - last; }; /^6$/ && do{ if ($ftype == TType::BOOL) { $xfer += $input->readBool(\$self->{useCacheIfPresent}); } else { @@ -1556,12 +1452,6 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^15$/ && do{ if ($ftype == TType::BOOL) { - $xfer += $input->readBool(\$self->{modifyFileCaches}); - } else { - $xfer += $input->skip($ftype); - } - last; }; $xfer += $input->skip($ftype); } $xfer += $input->readFieldEnd(); @@ -1579,11 +1469,6 @@ sub write { $xfer += $self->{simpleQuery}->write($output); $xfer += $output->writeFieldEnd(); } - if (defined $self->{expertQuery}) { - $xfer += $output->writeFieldBegin('expertQuery', TType::STRUCT, 2); - $xfer += $self->{expertQuery}->write($output); - $xfer += $output->writeFieldEnd(); - } if (defined $self->{facets}) { $xfer += $output->writeFieldBegin('facets', TType::LIST, 3); { @@ -1603,11 +1488,6 @@ sub write { $xfer += $self->{selector}->write($output); $xfer += $output->writeFieldEnd(); } - if (defined $self->{allowStaleData}) { - $xfer += $output->writeFieldBegin('allowStaleData', TType::BOOL, 5); - $xfer += $output->writeBool($self->{allowStaleData}); - $xfer += $output->writeFieldEnd(); - } if (defined $self->{useCacheIfPresent}) { $xfer += $output->writeFieldBegin('useCacheIfPresent', TType::BOOL, 6); $xfer += $output->writeBool($self->{useCacheIfPresent}); @@ -1653,11 +1533,6 @@ sub write { $xfer += $output->writeI64($self->{startTime}); $xfer += $output->writeFieldEnd(); } - if (defined $self->{modifyFileCaches}) { - $xfer += $output->writeFieldBegin('modifyFileCaches', TType::BOOL, 15); - $xfer += $output->writeBool($self->{modifyFileCaches}); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -2738,94 +2613,9 @@ sub write { return $xfer; } -package Blur::ColumnPreCache; -use base qw(Class::Accessor); -Blur::ColumnPreCache->mk_accessors( qw( preCacheCols ) ); - -sub new { - my $classname = shift; - my $self = {}; - my $vals = shift || {}; - $self->{preCacheCols} = undef; - if (UNIVERSAL::isa($vals,'HASH')) { - if (defined $vals->{preCacheCols}) { - $self->{preCacheCols} = $vals->{preCacheCols}; - } - } - return bless ($self, $classname); -} - -sub getName { - return 'ColumnPreCache'; -} - -sub read { - my ($self, $input) = @_; - my $xfer = 0; - my $fname; - my $ftype = 0; - my $fid = 0; - $xfer += $input->readStructBegin(\$fname); - while (1) - { - $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { - last; - } - SWITCH: for($fid) - { - /^1$/ && do{ if ($ftype == TType::LIST) { - { - my $_size106 = 0; - $self->{preCacheCols} = []; - my $_etype109 = 0; - $xfer += $input->readListBegin(\$_etype109, \$_size106); - for (my $_i110 = 0; $_i110 < $_size106; ++$_i110) - { - my $elem111 = undef; - $xfer += $input->readString(\$elem111); - push(@{$self->{preCacheCols}},$elem111); - } - $xfer += $input->readListEnd(); - } - } else { - $xfer += $input->skip($ftype); - } - last; }; - $xfer += $input->skip($ftype); - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; -} - -sub write { - my ($self, $output) = @_; - my $xfer = 0; - $xfer += $output->writeStructBegin('ColumnPreCache'); - if (defined $self->{preCacheCols}) { - $xfer += $output->writeFieldBegin('preCacheCols', TType::LIST, 1); - { - $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{preCacheCols}})); - { - foreach my $iter112 (@{$self->{preCacheCols}}) - { - $xfer += $output->writeString($iter112); - } - } - $xfer += $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; -} - package Blur::TableDescriptor; use base qw(Class::Accessor); -Blur::TableDescriptor->mk_accessors( qw( isEnabled shardCount tableUri cluster name similarityClass blockCaching blockCachingFileTypes readOnly columnPreCache tableProperties strictTypes defaultMissingFieldType defaultMissingFieldLessIndexing defaultMissingFieldProps ) ); +Blur::TableDescriptor->mk_accessors( qw( isEnabled shardCount tableUri cluster name similarityClass blockCaching blockCachingFileTypes readOnly preCacheCols tableProperties strictTypes defaultMissingFieldType defaultMissingFieldLessIndexing defaultMissingFieldProps ) ); sub new { my $classname = shift; @@ -2840,7 +2630,7 @@ sub new { $self->{blockCaching} = 1; $self->{blockCachingFileTypes} = undef; $self->{readOnly} = 0; - $self->{columnPreCache} = undef; + $self->{preCacheCols} = undef; $self->{tableProperties} = undef; $self->{strictTypes} = 0; $self->{defaultMissingFieldType} = "text"; @@ -2874,8 +2664,8 @@ sub new { if (defined $vals->{readOnly}) { $self->{readOnly} = $vals->{readOnly}; } - if (defined $vals->{columnPreCache}) { - $self->{columnPreCache} = $vals->{columnPreCache}; + if (defined $vals->{preCacheCols}) { + $self->{preCacheCols} = $vals->{preCacheCols}; } if (defined $vals->{tableProperties}) { $self->{tableProperties} = $vals->{tableProperties}; @@ -2959,15 +2749,15 @@ sub read { last; }; /^11$/ && do{ if ($ftype == TType::SET) { { - my $_size113 = 0; + my $_size106 = 0; $self->{blockCachingFileTypes} = {}; - my $_etype116 = 0; - $xfer += $input->readSetBegin(\$_etype116, \$_size113); - for (my $_i117 = 0; $_i117 < $_size113; ++$_i117) + my $_etype109 = 0; + $xfer += $input->readSetBegin(\$_etype109, \$_size106); + for (my $_i110 = 0; $_i110 < $_size106; ++$_i110) { - my $elem118 = undef; - $xfer += $input->readString(\$elem118); - $self->{blockCachingFileTypes}->{$elem118} = 1; + my $elem111 = undef; + $xfer += $input->readString(\$elem111); + $self->{blockCachingFileTypes}->{$elem111} = 1; } $xfer += $input->readSetEnd(); } @@ -2981,27 +2771,38 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^13$/ && do{ if ($ftype == TType::STRUCT) { - $self->{columnPreCache} = new Blur::ColumnPreCache(); - $xfer += $self->{columnPreCache}->read($input); + /^13$/ && do{ if ($ftype == TType::LIST) { + { + my $_size112 = 0; + $self->{preCacheCols} = []; + my $_etype115 = 0; + $xfer += $input->readListBegin(\$_etype115, \$_size112); + for (my $_i116 = 0; $_i116 < $_size112; ++$_i116) + { + my $elem117 = undef; + $xfer += $input->readString(\$elem117); + push(@{$self->{preCacheCols}},$elem117); + } + $xfer += $input->readListEnd(); + } } else { $xfer += $input->skip($ftype); } last; }; /^14$/ && do{ if ($ftype == TType::MAP) { { - my $_size119 = 0; + my $_size118 = 0; $self->{tableProperties} = {}; - my $_ktype120 = 0; - my $_vtype121 = 0; - $xfer += $input->readMapBegin(\$_ktype120, \$_vtype121, \$_size119); - for (my $_i123 = 0; $_i123 < $_size119; ++$_i123) + my $_ktype119 = 0; + my $_vtype120 = 0; + $xfer += $input->readMapBegin(\$_ktype119, \$_vtype120, \$_size118); + for (my $_i122 = 0; $_i122 < $_size118; ++$_i122) { - my $key124 = ''; - my $val125 = ''; - $xfer += $input->readString(\$key124); - $xfer += $input->readString(\$val125); - $self->{tableProperties}->{$key124} = $val125; + my $key123 = ''; + my $val124 = ''; + $xfer += $input->readString(\$key123); + $xfer += $input->readString(\$val124); + $self->{tableProperties}->{$key123} = $val124; } $xfer += $input->readMapEnd(); } @@ -3029,18 +2830,18 @@ sub read { last; }; /^18$/ && do{ if ($ftype == TType::MAP) { { - my $_size126 = 0; + my $_size125 = 0; $self->{defaultMissingFieldProps} = {}; - my $_ktype127 = 0; - my $_vtype128 = 0; - $xfer += $input->readMapBegin(\$_ktype127, \$_vtype128, \$_size126); - for (my $_i130 = 0; $_i130 < $_size126; ++$_i130) + my $_ktype126 = 0; + my $_vtype127 = 0; + $xfer += $input->readMapBegin(\$_ktype126, \$_vtype127, \$_size125); + for (my $_i129 = 0; $_i129 < $_size125; ++$_i129) { - my $key131 = ''; - my $val132 = ''; - $xfer += $input->readString(\$key131); - $xfer += $input->readString(\$val132); - $self->{defaultMissingFieldProps}->{$key131} = $val132; + my $key130 = ''; + my $val131 = ''; + $xfer += $input->readString(\$key130); + $xfer += $input->readString(\$val131); + $self->{defaultMissingFieldProps}->{$key130} = $val131; } $xfer += $input->readMapEnd(); } @@ -3100,9 +2901,9 @@ sub write { { $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{blockCachingFileTypes}})); { - foreach my $iter133 (@{$self->{blockCachingFileTypes}}) + foreach my $iter132 (@{$self->{blockCachingFileTypes}}) { - $xfer += $output->writeString($iter133); + $xfer += $output->writeString($iter132); } } $xfer += $output->writeSetEnd(); @@ -3114,9 +2915,18 @@ sub write { $xfer += $output->writeBool($self->{readOnly}); $xfer += $output->writeFieldEnd(); } - if (defined $self->{columnPreCache}) { - $xfer += $output->writeFieldBegin('columnPreCache', TType::STRUCT, 13); - $xfer += $self->{columnPreCache}->write($output); + if (defined $self->{preCacheCols}) { + $xfer += $output->writeFieldBegin('preCacheCols', TType::LIST, 13); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{preCacheCols}})); + { + foreach my $iter133 (@{$self->{preCacheCols}}) + { + $xfer += $output->writeString($iter133); + } + } + $xfer += $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if (defined $self->{tableProperties}) {
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/distribution/src/main/scripts/interface/gen-rb/blur.rb ---------------------------------------------------------------------- diff --git a/distribution/src/main/scripts/interface/gen-rb/blur.rb b/distribution/src/main/scripts/interface/gen-rb/blur.rb index 31cf300..58041bd 100644 --- a/distribution/src/main/scripts/interface/gen-rb/blur.rb +++ b/distribution/src/main/scripts/interface/gen-rb/blur.rb @@ -187,22 +187,6 @@ module Blur return end - def currentQueries(table) - send_currentQueries(table) - return recv_currentQueries() - end - - def send_currentQueries(table) - send_message('currentQueries', CurrentQueries_args, :table => table) - end - - def recv_currentQueries() - result = receive_message(CurrentQueries_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'currentQueries failed: unknown result') - end - def queryStatusIdList(table) send_queryStatusIdList(table) return recv_queryStatusIdList() @@ -251,22 +235,6 @@ module Blur raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'schema failed: unknown result') end - def getTableStats(table) - send_getTableStats(table) - return recv_getTableStats() - end - - def send_getTableStats(table) - send_message('getTableStats', GetTableStats_args, :table => table) - end - - def recv_getTableStats() - result = receive_message(GetTableStats_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTableStats failed: unknown result') - end - def tableStats(table) send_tableStats(table) return recv_tableStats() @@ -626,17 +594,6 @@ module Blur write_result(result, oprot, 'cancelQuery', seqid) end - def process_currentQueries(seqid, iprot, oprot) - args = read_args(iprot, CurrentQueries_args) - result = CurrentQueries_result.new() - begin - result.success = @handler.currentQueries(args.table) - rescue ::Blur::BlurException => ex - result.ex = ex - end - write_result(result, oprot, 'currentQueries', seqid) - end - def process_queryStatusIdList(seqid, iprot, oprot) args = read_args(iprot, QueryStatusIdList_args) result = QueryStatusIdList_result.new() @@ -670,17 +627,6 @@ module Blur write_result(result, oprot, 'schema', seqid) end - def process_getTableStats(seqid, iprot, oprot) - args = read_args(iprot, GetTableStats_args) - result = GetTableStats_result.new() - begin - result.success = @handler.getTableStats(args.table) - rescue ::Blur::BlurException => ex - result.ex = ex - end - write_result(result, oprot, 'getTableStats', seqid) - end - def process_tableStats(seqid, iprot, oprot) args = read_args(iprot, TableStats_args) result = TableStats_result.new() @@ -888,6 +834,7 @@ module Blur CLUSTER = 1 FIELDS = { + # the cluster name. CLUSTER => {:type => ::Thrift::Types::STRING, :name => 'cluster'} } @@ -955,6 +902,7 @@ module Blur TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -989,6 +937,7 @@ module Blur TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -1056,6 +1005,7 @@ module Blur CLUSTER = 1 FIELDS = { + # the cluster name. CLUSTER => {:type => ::Thrift::Types::STRING, :name => 'cluster'} } @@ -1090,6 +1040,7 @@ module Blur TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -1125,7 +1076,9 @@ module Blur BLURQUERY = 2 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the query to execute. BLURQUERY => {:type => ::Thrift::Types::STRUCT, :name => 'blurQuery', :class => ::Blur::BlurQuery} } @@ -1161,7 +1114,9 @@ module Blur SIMPLEQUERY = 2 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the query to parse. SIMPLEQUERY => {:type => ::Thrift::Types::STRUCT, :name => 'simpleQuery', :class => ::Blur::SimpleQuery} } @@ -1197,7 +1152,9 @@ module Blur UUID = 2 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the uuid of the query. UUID => {:type => ::Thrift::Types::I64, :name => 'uuid'} } @@ -1225,45 +1182,12 @@ module Blur ::Thrift::Struct.generate_accessors self end - class CurrentQueries_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE = 1 - - FIELDS = { - TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class CurrentQueries_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - EX = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::BlurQueryStatus}}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Blur::BlurException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - class QueryStatusIdList_args include ::Thrift::Struct, ::Thrift::Struct_Union TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -1299,7 +1223,9 @@ module Blur UUID = 2 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the uuid of the query. UUID => {:type => ::Thrift::Types::I64, :name => 'uuid'} } @@ -1363,40 +1289,6 @@ module Blur ::Thrift::Struct.generate_accessors self end - class GetTableStats_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE = 1 - - FIELDS = { - TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetTableStats_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - EX = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Blur::TableStats}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Blur::BlurException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - class TableStats_args include ::Thrift::Struct, ::Thrift::Struct_Union TABLE = 1 @@ -1618,6 +1510,7 @@ module Blur TABLEDESCRIPTOR = 1 FIELDS = { + # the TableDescriptor. TABLEDESCRIPTOR => {:type => ::Thrift::Types::STRUCT, :name => 'tableDescriptor', :class => ::Blur::TableDescriptor} } @@ -1650,6 +1543,7 @@ module Blur TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -1682,6 +1576,7 @@ module Blur TABLE = 1 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'} } @@ -1715,7 +1610,9 @@ module Blur DELETEINDEXFILES = 2 FIELDS = { + # the table name. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # true to remove the index storage and false if to preserve. DELETEINDEXFILES => {:type => ::Thrift::Types::BOOL, :name => 'deleteIndexFiles'} } @@ -1749,7 +1646,9 @@ module Blur COLUMNDEFINITION = 2 FIELDS = { + # the name of the table. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the ColumnDefinition. COLUMNDEFINITION => {:type => ::Thrift::Types::STRUCT, :name => 'columnDefinition', :class => ::Blur::ColumnDefinition} } @@ -1785,7 +1684,9 @@ module Blur NUMBEROFSEGMENTSPERSHARD = 2 FIELDS = { + # table the name of the table. TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}, + # the maximum of segments per shard index after the operation is completed. NUMBEROFSEGMENTSPERSHARD => {:type => ::Thrift::Types::I32, :name => 'numberOfSegmentsPerShard'} } @@ -1818,6 +1719,7 @@ module Blur CLUSTER = 1 FIELDS = { + # the name of the cluster. CLUSTER => {:type => ::Thrift::Types::STRING, :name => 'cluster'} } @@ -1885,6 +1787,7 @@ module Blur METRICS = 1 FIELDS = { + # the names of the metrics to return. If null all are returned. METRICS => {:type => ::Thrift::Types::SET, :name => 'metrics', :element => {:type => ::Thrift::Types::STRING}} } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/distribution/src/main/scripts/interface/gen-rb/blur_types.rb ---------------------------------------------------------------------- diff --git a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb index dc2293b..b7d52ad 100644 --- a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb +++ b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb @@ -320,7 +320,8 @@ module Blur ::Thrift::Struct.generate_accessors self end - # FetchResult contains the row or record fetch result based if the Selector was going to fetch the entire row or a single record. + # FetchResult contains the row or record fetch result based if the Selector +# was going to fetch the entire row or a single record. class FetchResult include ::Thrift::Struct, ::Thrift::Struct_Union EXISTS = 1 @@ -350,27 +351,6 @@ module Blur ::Thrift::Struct.generate_accessors self end - # The expert query allows for submission of a serialized query and filter object to be executed against all the queries. - class ExpertQuery - include ::Thrift::Struct, ::Thrift::Struct_Union - QUERY = 1 - FILTER = 2 - - FIELDS = { - # The serialized query. - QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :binary => true}, - # The serialized filter. - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - # Blur facet. class Facet include ::Thrift::Struct, ::Thrift::Struct_Union @@ -378,7 +358,14 @@ module Blur MINIMUMNUMBEROFBLURRESULTS = 2 FIELDS = { + # The facet query. QUERYSTR => {:type => ::Thrift::Types::STRING, :name => 'queryStr'}, + # The minimum number of results before no longer processing the facet. This +# is a good way to decrease the strain on the system while using many facets. For +# example if you set this attribute to 1000, then the shard server will stop +# processing the facet at the 1000 mark. However because this is processed at +# the shard server level the controller will likely return more than the minimum +# because it sums the answers from the shard servers. MINIMUMNUMBEROFBLURRESULTS => {:type => ::Thrift::Types::I64, :name => 'minimumNumberOfBlurResults', :default => 9223372036854775807} } @@ -390,14 +377,13 @@ module Blur ::Thrift::Struct.generate_accessors self end - # + # The Blur Query object that contains the query that needs to be executed along +# with the query options. class BlurQuery include ::Thrift::Struct, ::Thrift::Struct_Union SIMPLEQUERY = 1 - EXPERTQUERY = 2 FACETS = 3 SELECTOR = 4 - ALLOWSTALEDATA = 5 USECACHEIFPRESENT = 6 START = 7 FETCH = 8 @@ -407,39 +393,34 @@ module Blur USERCONTEXT = 12 CACHERESULT = 13 STARTTIME = 14 - MODIFYFILECACHES = 15 FIELDS = { - # + # The query information. SIMPLEQUERY => {:type => ::Thrift::Types::STRUCT, :name => 'simpleQuery', :class => ::Blur::SimpleQuery}, - # - EXPERTQUERY => {:type => ::Thrift::Types::STRUCT, :name => 'expertQuery', :class => ::Blur::ExpertQuery}, - # + # A list of Facets to execute with the given query. FACETS => {:type => ::Thrift::Types::LIST, :name => 'facets', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Facet}}, # Selector is used to fetch data in the search results, if null only location ids will be fetched. SELECTOR => {:type => ::Thrift::Types::STRUCT, :name => 'selector', :class => ::Blur::Selector}, - # @deprecated This value is no longer used. This allows the query to see the most current data that has been added to the table. - ALLOWSTALEDATA => {:type => ::Thrift::Types::BOOL, :name => 'allowStaleData', :default => false}, - # + # Enabled by default to use a cached result if the query matches a previous run query with the +# configured amount of time. USECACHEIFPRESENT => {:type => ::Thrift::Types::BOOL, :name => 'useCacheIfPresent', :default => true}, - # + # The starting result position, 0 by default. START => {:type => ::Thrift::Types::I64, :name => 'start', :default => 0}, - # + # The number of fetched results, 10 by default. FETCH => {:type => ::Thrift::Types::I32, :name => 'fetch', :default => 10}, - # + # The minimum number of results to find before returning. MINIMUMNUMBEROFRESULTS => {:type => ::Thrift::Types::I64, :name => 'minimumNumberOfResults', :default => 9223372036854775807}, - # + # The maximum amount of time the query should execute before timing out. MAXQUERYTIME => {:type => ::Thrift::Types::I64, :name => 'maxQueryTime', :default => 9223372036854775807}, - # + # Sets the uuid of this query, this is normal set by the client so that the status +# of a running query can be found or the query can be canceled. UUID => {:type => ::Thrift::Types::I64, :name => 'uuid'}, - # + # Sets a user context, only used for logging at this point. USERCONTEXT => {:type => ::Thrift::Types::STRING, :name => 'userContext'}, - # + # Enabled by default to cache this result. False would not cache the result. CACHERESULT => {:type => ::Thrift::Types::BOOL, :name => 'cacheResult', :default => true}, - # - STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime', :default => 0}, - # - MODIFYFILECACHES => {:type => ::Thrift::Types::BOOL, :name => 'modifyFileCaches', :default => true} + # Sets the start time, if 0 the controller sets the time. + STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime', :default => 0} } def struct_fields; FIELDS; end @@ -450,7 +431,7 @@ module Blur ::Thrift::Struct.generate_accessors self end - # + # class BlurResult include ::Thrift::Struct, ::Thrift::Struct_Union LOCATIONID = 1 @@ -460,7 +441,7 @@ module Blur FIELDS = { # WARNING: This is an internal only attribute and is not intended for use by clients. LOCATIONID => {:type => ::Thrift::Types::STRING, :name => 'locationId'}, - # + # SCORE => {:type => ::Thrift::Types::DOUBLE, :name => 'score'}, # FETCHRESULT => {:type => ::Thrift::Types::STRUCT, :name => 'fetchResult', :class => ::Blur::FetchResult} @@ -686,24 +667,6 @@ module Blur end # - class ColumnPreCache - include ::Thrift::Struct, ::Thrift::Struct_Union - PRECACHECOLS = 1 - - FIELDS = { - # This map sets what column families and columns to prefetch into block cache on shard open. - PRECACHECOLS => {:type => ::Thrift::Types::LIST, :name => 'preCacheCols', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # class TableDescriptor include ::Thrift::Struct, ::Thrift::Struct_Union ISENABLED = 1 @@ -715,7 +678,7 @@ module Blur BLOCKCACHING = 10 BLOCKCACHINGFILETYPES = 11 READONLY = 12 - COLUMNPRECACHE = 13 + PRECACHECOLS = 13 TABLEPROPERTIES = 14 STRICTTYPES = 15 DEFAULTMISSINGFIELDTYPE = 16 @@ -742,8 +705,8 @@ module Blur # If a table is set to be readonly, that means that mutates through Thrift are NOT allowed. However # updates through MapReduce are allowed and in fact they are only allowed if the table is in readOnly mode. READONLY => {:type => ::Thrift::Types::BOOL, :name => 'readOnly', :default => false}, - # Sets what column families and columns to prefetch into block cache on shard open. - COLUMNPRECACHE => {:type => ::Thrift::Types::STRUCT, :name => 'columnPreCache', :class => ::Blur::ColumnPreCache}, + # This map sets what column families and columns to prefetch into block cache on shard open. + PRECACHECOLS => {:type => ::Thrift::Types::LIST, :name => 'preCacheCols', :element => {:type => ::Thrift::Types::STRING}}, # The table properties that can modify the default behavior of the table. TODO: Document all options. TABLEPROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'tableProperties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, # Whether strict types are enabled or not (default). If they are enabled no column can be added without first having it's type defined.
