incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [37/51] [abbrv] Massive changes to the the thrift API. Getting closer to the final version, this commit also removes the controller from the architecture.
Date Tue, 11 Dec 2012 02:21:00 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/aee531c2/interface/gen-perl/Blur/ShardServer.pm
----------------------------------------------------------------------
diff --git a/interface/gen-perl/Blur/ShardServer.pm b/interface/gen-perl/Blur/ShardServer.pm
deleted file mode 100644
index 19195f9..0000000
--- a/interface/gen-perl/Blur/ShardServer.pm
+++ /dev/null
@@ -1,2065 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.9.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-require 5.6.0;
-use strict;
-use warnings;
-use Thrift;
-
-use Blur::Types;
-use Blur::Blur;
-
-# HELPER FUNCTIONS AND STRUCTURES
-
-package Blur::ShardServer_openReadSession_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_openReadSession_args->mk_accessors( qw( table ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{table} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{table}) {
-        $self->{table} = $vals->{table};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_openReadSession_args';
-  }
-
-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->{table});
-        } 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('ShardServer_openReadSession_args');
-    if (defined $self->{table}) {
-      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
-      $xfer += $output->writeString($self->{table});
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_openReadSession_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_openReadSession_result->mk_accessors( qw( success ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{success} = undef;
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{success}) {
-        $self->{success} = $vals->{success};
-      }
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_openReadSession_result';
-  }
-
-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)
-      {
-        /^0$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{success} = new Blur::Session();
-          $xfer += $self->{success}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_openReadSession_result');
-    if (defined $self->{success}) {
-      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
-      $xfer += $self->{success}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_search_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_search_args->mk_accessors( qw( session queryArgs ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{session} = undef;
-    $self->{queryArgs} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
-      }
-      if (defined $vals->{queryArgs}) {
-        $self->{queryArgs} = $vals->{queryArgs};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_search_args';
-  }
-
-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::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{queryArgs} = new Blur::QueryArgs();
-          $xfer += $self->{queryArgs}->read($input);
-        } 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('ShardServer_search_args');
-    if (defined $self->{session}) {
-      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
-      $xfer += $self->{session}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{queryArgs}) {
-      $xfer += $output->writeFieldBegin('queryArgs', TType::STRUCT, 2);
-      $xfer += $self->{queryArgs}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_search_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_search_result->mk_accessors( qw( success ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{success} = undef;
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{success}) {
-        $self->{success} = $vals->{success};
-      }
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_search_result';
-  }
-
-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)
-      {
-        /^0$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size191 = 0;
-            $self->{success} = [];
-            my $_etype194 = 0;
-            $xfer += $input->readListBegin(\$_etype194, \$_size191);
-            for (my $_i195 = 0; $_i195 < $_size191; ++$_i195)
-            {
-              my $elem196 = undef;
-              $elem196 = new Blur::TopFieldDocs();
-              $xfer += $elem196->read($input);
-              push(@{$self->{success}},$elem196);
-            }
-            $xfer += $input->readListEnd();
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_search_result');
-    if (defined $self->{success}) {
-      $xfer += $output->writeFieldBegin('success', TType::LIST, 0);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}}));
-        {
-          foreach my $iter197 (@{$self->{success}}) 
-          {
-            $xfer += ${iter197}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_doc_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_doc_args->mk_accessors( qw( session docLocations fields ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{session} = undef;
-    $self->{docLocations} = undef;
-    $self->{fields} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
-      }
-      if (defined $vals->{docLocations}) {
-        $self->{docLocations} = $vals->{docLocations};
-      }
-      if (defined $vals->{fields}) {
-        $self->{fields} = $vals->{fields};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_doc_args';
-  }
-
-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::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size198 = 0;
-            $self->{docLocations} = [];
-            my $_etype201 = 0;
-            $xfer += $input->readListBegin(\$_etype201, \$_size198);
-            for (my $_i202 = 0; $_i202 < $_size198; ++$_i202)
-            {
-              my $elem203 = undef;
-              $elem203 = new Blur::DocLocation();
-              $xfer += $elem203->read($input);
-              push(@{$self->{docLocations}},$elem203);
-            }
-            $xfer += $input->readListEnd();
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^4$/ && do{        if ($ftype == TType::SET) {
-          {
-            my $_size204 = 0;
-            $self->{fields} = {};
-            my $_etype207 = 0;
-            $xfer += $input->readSetBegin(\$_etype207, \$_size204);
-            for (my $_i208 = 0; $_i208 < $_size204; ++$_i208)
-            {
-              my $elem209 = undef;
-              $xfer += $input->readString(\$elem209);
-              $self->{fields}->{$elem209} = 1;
-            }
-            $xfer += $input->readSetEnd();
-          }
-        } 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('ShardServer_doc_args');
-    if (defined $self->{session}) {
-      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
-      $xfer += $self->{session}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{docLocations}) {
-      $xfer += $output->writeFieldBegin('docLocations', TType::LIST, 2);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{docLocations}}));
-        {
-          foreach my $iter210 (@{$self->{docLocations}}) 
-          {
-            $xfer += ${iter210}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{fields}) {
-      $xfer += $output->writeFieldBegin('fields', TType::SET, 4);
-      {
-        $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{fields}}));
-        {
-          foreach my $iter211 (@{$self->{fields}})
-          {
-            $xfer += $output->writeString($iter211);
-          }
-        }
-        $xfer += $output->writeSetEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_doc_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_doc_result->mk_accessors( qw( success ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{success} = undef;
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{success}) {
-        $self->{success} = $vals->{success};
-      }
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_doc_result';
-  }
-
-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)
-      {
-        /^0$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size212 = 0;
-            $self->{success} = [];
-            my $_etype215 = 0;
-            $xfer += $input->readListBegin(\$_etype215, \$_size212);
-            for (my $_i216 = 0; $_i216 < $_size212; ++$_i216)
-            {
-              my $elem217 = undef;
-              $elem217 = new Blur::Document();
-              $xfer += $elem217->read($input);
-              push(@{$self->{success}},$elem217);
-            }
-            $xfer += $input->readListEnd();
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_doc_result');
-    if (defined $self->{success}) {
-      $xfer += $output->writeFieldBegin('success', TType::LIST, 0);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}}));
-        {
-          foreach my $iter218 (@{$self->{success}}) 
-          {
-            $xfer += ${iter218}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_closeReadSession_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_closeReadSession_args->mk_accessors( qw( session ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{session} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_closeReadSession_args';
-  }
-
-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::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
-        } 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('ShardServer_closeReadSession_args');
-    if (defined $self->{session}) {
-      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
-      $xfer += $self->{session}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_closeReadSession_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_closeReadSession_result->mk_accessors( qw( ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_closeReadSession_result';
-  }
-
-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::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_closeReadSession_result');
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_addDocuments_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_addDocuments_args->mk_accessors( qw( options documents ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{options} = undef;
-    $self->{documents} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{options}) {
-        $self->{options} = $vals->{options};
-      }
-      if (defined $vals->{documents}) {
-        $self->{documents} = $vals->{documents};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_addDocuments_args';
-  }
-
-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::STRUCT) {
-          $self->{options} = new Blur::MutateOptions();
-          $xfer += $self->{options}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size219 = 0;
-            $self->{documents} = [];
-            my $_etype222 = 0;
-            $xfer += $input->readListBegin(\$_etype222, \$_size219);
-            for (my $_i223 = 0; $_i223 < $_size219; ++$_i223)
-            {
-              my $elem224 = undef;
-              $elem224 = new Blur::Document();
-              $xfer += $elem224->read($input);
-              push(@{$self->{documents}},$elem224);
-            }
-            $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('ShardServer_addDocuments_args');
-    if (defined $self->{options}) {
-      $xfer += $output->writeFieldBegin('options', TType::STRUCT, 1);
-      $xfer += $self->{options}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{documents}) {
-      $xfer += $output->writeFieldBegin('documents', TType::LIST, 2);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{documents}}));
-        {
-          foreach my $iter225 (@{$self->{documents}}) 
-          {
-            $xfer += ${iter225}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_addDocuments_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_addDocuments_result->mk_accessors( qw( ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_addDocuments_result';
-  }
-
-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::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_addDocuments_result');
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_deleteDocumentsByQueries_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_deleteDocumentsByQueries_args->mk_accessors( qw( options queries ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{options} = undef;
-    $self->{queries} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{options}) {
-        $self->{options} = $vals->{options};
-      }
-      if (defined $vals->{queries}) {
-        $self->{queries} = $vals->{queries};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_deleteDocumentsByQueries_args';
-  }
-
-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::STRUCT) {
-          $self->{options} = new Blur::MutateOptions();
-          $xfer += $self->{options}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size226 = 0;
-            $self->{queries} = [];
-            my $_etype229 = 0;
-            $xfer += $input->readListBegin(\$_etype229, \$_size226);
-            for (my $_i230 = 0; $_i230 < $_size226; ++$_i230)
-            {
-              my $elem231 = undef;
-              $xfer += $input->readString(\$elem231);
-              push(@{$self->{queries}},$elem231);
-            }
-            $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('ShardServer_deleteDocumentsByQueries_args');
-    if (defined $self->{options}) {
-      $xfer += $output->writeFieldBegin('options', TType::STRUCT, 1);
-      $xfer += $self->{options}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{queries}) {
-      $xfer += $output->writeFieldBegin('queries', TType::LIST, 2);
-      {
-        $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{queries}}));
-        {
-          foreach my $iter232 (@{$self->{queries}}) 
-          {
-            $xfer += $output->writeString($iter232);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_deleteDocumentsByQueries_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_deleteDocumentsByQueries_result->mk_accessors( qw( ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_deleteDocumentsByQueries_result';
-  }
-
-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::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_deleteDocumentsByQueries_result');
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_deleteDocuments_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_deleteDocuments_args->mk_accessors( qw( options terms ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{options} = undef;
-    $self->{terms} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{options}) {
-        $self->{options} = $vals->{options};
-      }
-      if (defined $vals->{terms}) {
-        $self->{terms} = $vals->{terms};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_deleteDocuments_args';
-  }
-
-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::STRUCT) {
-          $self->{options} = new Blur::MutateOptions();
-          $xfer += $self->{options}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size233 = 0;
-            $self->{terms} = [];
-            my $_etype236 = 0;
-            $xfer += $input->readListBegin(\$_etype236, \$_size233);
-            for (my $_i237 = 0; $_i237 < $_size233; ++$_i237)
-            {
-              my $elem238 = undef;
-              $elem238 = new Blur::Term();
-              $xfer += $elem238->read($input);
-              push(@{$self->{terms}},$elem238);
-            }
-            $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('ShardServer_deleteDocuments_args');
-    if (defined $self->{options}) {
-      $xfer += $output->writeFieldBegin('options', TType::STRUCT, 1);
-      $xfer += $self->{options}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{terms}) {
-      $xfer += $output->writeFieldBegin('terms', TType::LIST, 2);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{terms}}));
-        {
-          foreach my $iter239 (@{$self->{terms}}) 
-          {
-            $xfer += ${iter239}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_deleteDocuments_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_deleteDocuments_result->mk_accessors( qw( ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_deleteDocuments_result';
-  }
-
-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::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_deleteDocuments_result');
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_updateDocuments_args;
-use base qw(Class::Accessor);
-Blur::ShardServer_updateDocuments_args->mk_accessors( qw( options updatePackages ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{options} = undef;
-    $self->{updatePackages} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{options}) {
-        $self->{options} = $vals->{options};
-      }
-      if (defined $vals->{updatePackages}) {
-        $self->{updatePackages} = $vals->{updatePackages};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_updateDocuments_args';
-  }
-
-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::STRUCT) {
-          $self->{options} = new Blur::MutateOptions();
-          $xfer += $self->{options}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-        last; };
-        /^2$/ && do{        if ($ftype == TType::LIST) {
-          {
-            my $_size240 = 0;
-            $self->{updatePackages} = [];
-            my $_etype243 = 0;
-            $xfer += $input->readListBegin(\$_etype243, \$_size240);
-            for (my $_i244 = 0; $_i244 < $_size240; ++$_i244)
-            {
-              my $elem245 = undef;
-              $elem245 = new Blur::UpdatePackage();
-              $xfer += $elem245->read($input);
-              push(@{$self->{updatePackages}},$elem245);
-            }
-            $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('ShardServer_updateDocuments_args');
-    if (defined $self->{options}) {
-      $xfer += $output->writeFieldBegin('options', TType::STRUCT, 1);
-      $xfer += $self->{options}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if (defined $self->{updatePackages}) {
-      $xfer += $output->writeFieldBegin('updatePackages', TType::LIST, 2);
-      {
-        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{updatePackages}}));
-        {
-          foreach my $iter246 (@{$self->{updatePackages}}) 
-          {
-            $xfer += ${iter246}->write($output);
-          }
-        }
-        $xfer += $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServer_updateDocuments_result;
-use base qw(Class::Accessor);
-Blur::ShardServer_updateDocuments_result->mk_accessors( qw( ) );
-
-sub new {
-    my $classname = shift;
-    my $self      = {};
-    my $vals      = shift || {};
-    $self->{e} = undef;
-    if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{e}) {
-        $self->{e} = $vals->{e};
-      }
-    }
-    return bless ($self, $classname);
-}
-
-sub getName {
-    return 'ShardServer_updateDocuments_result';
-  }
-
-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::STRUCT) {
-          $self->{e} = new Blur::BlurException();
-          $xfer += $self->{e}->read($input);
-        } 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('ShardServer_updateDocuments_result');
-    if (defined $self->{e}) {
-      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
-      $xfer += $self->{e}->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-package Blur::ShardServerIf;
-
-use strict;
-use base qw(Blur::BlurIf);
-
-sub openReadSession{
-  my $self = shift;
-  my $table = shift;
-
-  die 'implement interface';
-}
-
-sub search{
-  my $self = shift;
-  my $session = shift;
-  my $queryArgs = shift;
-
-  die 'implement interface';
-}
-
-sub doc{
-  my $self = shift;
-  my $session = shift;
-  my $docLocations = shift;
-  my $fields = shift;
-
-  die 'implement interface';
-}
-
-sub closeReadSession{
-  my $self = shift;
-  my $session = shift;
-
-  die 'implement interface';
-}
-
-sub addDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $documents = shift;
-
-  die 'implement interface';
-}
-
-sub deleteDocumentsByQueries{
-  my $self = shift;
-  my $options = shift;
-  my $queries = shift;
-
-  die 'implement interface';
-}
-
-sub deleteDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $terms = shift;
-
-  die 'implement interface';
-}
-
-sub updateDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $updatePackages = shift;
-
-  die 'implement interface';
-}
-
-package Blur::ShardServerRest;
-
-use strict;
-use base qw(Blur::BlurRest);
-
-sub openReadSession{
-    my ($self, $request) = @_;
-
-    my $table = ($request->{'table'}) ? $request->{'table'} : undef;
-    return $self->{impl}->openReadSession($table);
-  }
-
-sub search{
-    my ($self, $request) = @_;
-
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
-    my $queryArgs = ($request->{'queryArgs'}) ? $request->{'queryArgs'} : undef;
-    return $self->{impl}->search($session, $queryArgs);
-  }
-
-sub doc{
-    my ($self, $request) = @_;
-
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
-    my $docLocations = ($request->{'docLocations'}) ? $request->{'docLocations'} : undef;
-    my $fields = ($request->{'fields'}) ? $request->{'fields'} : undef;
-    return $self->{impl}->doc($session, $docLocations, $fields);
-  }
-
-sub closeReadSession{
-    my ($self, $request) = @_;
-
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
-    return $self->{impl}->closeReadSession($session);
-  }
-
-sub addDocuments{
-    my ($self, $request) = @_;
-
-    my $options = ($request->{'options'}) ? $request->{'options'} : undef;
-    my $documents = ($request->{'documents'}) ? $request->{'documents'} : undef;
-    return $self->{impl}->addDocuments($options, $documents);
-  }
-
-sub deleteDocumentsByQueries{
-    my ($self, $request) = @_;
-
-    my $options = ($request->{'options'}) ? $request->{'options'} : undef;
-    my $queries = ($request->{'queries'}) ? $request->{'queries'} : undef;
-    return $self->{impl}->deleteDocumentsByQueries($options, $queries);
-  }
-
-sub deleteDocuments{
-    my ($self, $request) = @_;
-
-    my $options = ($request->{'options'}) ? $request->{'options'} : undef;
-    my $terms = ($request->{'terms'}) ? $request->{'terms'} : undef;
-    return $self->{impl}->deleteDocuments($options, $terms);
-  }
-
-sub updateDocuments{
-    my ($self, $request) = @_;
-
-    my $options = ($request->{'options'}) ? $request->{'options'} : undef;
-    my $updatePackages = ($request->{'updatePackages'}) ? $request->{'updatePackages'} : undef;
-    return $self->{impl}->updateDocuments($options, $updatePackages);
-  }
-
-package Blur::ShardServerClient;
-
-use base qw(Blur::BlurClient);
-use base qw(Blur::ShardServerIf);
-sub new {
-    my ($classname, $input, $output) = @_;
-    my $self      = {};
-    $self = $classname->SUPER::new($input, $output);
-    return bless($self,$classname);
-}
-
-sub openReadSession{
-  my $self = shift;
-  my $table = shift;
-
-        $self->send_openReadSession($table);
-    return $self->recv_openReadSession();
-}
-
-sub send_openReadSession{
-  my $self = shift;
-  my $table = shift;
-
-    $self->{output}->writeMessageBegin('openReadSession', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_openReadSession_args();
-    $args->{table} = $table;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_openReadSession{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_openReadSession_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{success} ) {
-      return $result->{success};
-    }
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    die "openReadSession failed: unknown result";
-}
-sub search{
-  my $self = shift;
-  my $session = shift;
-  my $queryArgs = shift;
-
-        $self->send_search($session, $queryArgs);
-    return $self->recv_search();
-}
-
-sub send_search{
-  my $self = shift;
-  my $session = shift;
-  my $queryArgs = shift;
-
-    $self->{output}->writeMessageBegin('search', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_search_args();
-    $args->{session} = $session;
-    $args->{queryArgs} = $queryArgs;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_search{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_search_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{success} ) {
-      return $result->{success};
-    }
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    die "search failed: unknown result";
-}
-sub doc{
-  my $self = shift;
-  my $session = shift;
-  my $docLocations = shift;
-  my $fields = shift;
-
-        $self->send_doc($session, $docLocations, $fields);
-    return $self->recv_doc();
-}
-
-sub send_doc{
-  my $self = shift;
-  my $session = shift;
-  my $docLocations = shift;
-  my $fields = shift;
-
-    $self->{output}->writeMessageBegin('doc', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_doc_args();
-    $args->{session} = $session;
-    $args->{docLocations} = $docLocations;
-    $args->{fields} = $fields;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_doc{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_doc_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{success} ) {
-      return $result->{success};
-    }
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    die "doc failed: unknown result";
-}
-sub closeReadSession{
-  my $self = shift;
-  my $session = shift;
-
-        $self->send_closeReadSession($session);
-    $self->recv_closeReadSession();
-}
-
-sub send_closeReadSession{
-  my $self = shift;
-  my $session = shift;
-
-    $self->{output}->writeMessageBegin('closeReadSession', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_closeReadSession_args();
-    $args->{session} = $session;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_closeReadSession{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_closeReadSession_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    return;
-}
-sub addDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $documents = shift;
-
-        $self->send_addDocuments($options, $documents);
-    $self->recv_addDocuments();
-}
-
-sub send_addDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $documents = shift;
-
-    $self->{output}->writeMessageBegin('addDocuments', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_addDocuments_args();
-    $args->{options} = $options;
-    $args->{documents} = $documents;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_addDocuments{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_addDocuments_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    return;
-}
-sub deleteDocumentsByQueries{
-  my $self = shift;
-  my $options = shift;
-  my $queries = shift;
-
-        $self->send_deleteDocumentsByQueries($options, $queries);
-    $self->recv_deleteDocumentsByQueries();
-}
-
-sub send_deleteDocumentsByQueries{
-  my $self = shift;
-  my $options = shift;
-  my $queries = shift;
-
-    $self->{output}->writeMessageBegin('deleteDocumentsByQueries', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_deleteDocumentsByQueries_args();
-    $args->{options} = $options;
-    $args->{queries} = $queries;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_deleteDocumentsByQueries{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_deleteDocumentsByQueries_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    return;
-}
-sub deleteDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $terms = shift;
-
-        $self->send_deleteDocuments($options, $terms);
-    $self->recv_deleteDocuments();
-}
-
-sub send_deleteDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $terms = shift;
-
-    $self->{output}->writeMessageBegin('deleteDocuments', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_deleteDocuments_args();
-    $args->{options} = $options;
-    $args->{terms} = $terms;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_deleteDocuments{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_deleteDocuments_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    return;
-}
-sub updateDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $updatePackages = shift;
-
-        $self->send_updateDocuments($options, $updatePackages);
-    $self->recv_updateDocuments();
-}
-
-sub send_updateDocuments{
-  my $self = shift;
-  my $options = shift;
-  my $updatePackages = shift;
-
-    $self->{output}->writeMessageBegin('updateDocuments', TMessageType::CALL, $self->{seqid});
-    my $args = new Blur::ShardServer_updateDocuments_args();
-    $args->{options} = $options;
-    $args->{updatePackages} = $updatePackages;
-    $args->write($self->{output});
-    $self->{output}->writeMessageEnd();
-    $self->{output}->getTransport()->flush();
-}
-
-sub recv_updateDocuments{
-  my $self = shift;
-
-    my $rseqid = 0;
-    my $fname;
-    my $mtype = 0;
-
-    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-    if ($mtype == TMessageType::EXCEPTION) {
-      my $x = new TApplicationException();
-      $x->read($self->{input});
-      $self->{input}->readMessageEnd();
-      die $x;
-    }
-    my $result = new Blur::ShardServer_updateDocuments_result();
-    $result->read($self->{input});
-    $self->{input}->readMessageEnd();
-
-    if (defined $result->{e}) {
-      die $result->{e};
-    }
-    return;
-}
-package Blur::ShardServerProcessor;
-
-use strict;
-use base qw(Blur::BlurProcessor);
-
-sub process {
-      my ($self, $input, $output) = @_;
-      my $rseqid = 0;
-      my $fname  = undef;
-      my $mtype  = 0;
-
-      $input->readMessageBegin(\$fname, \$mtype, \$rseqid);
-      my $methodname = 'process_'.$fname;
-      if (!$self->can($methodname)) {
-        $input->skip(TType::STRUCT);
-        $input->readMessageEnd();
-        my $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
-        $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
-        $x->write($output);
-        $output->writeMessageEnd();
-        $output->getTransport()->flush();
-        return;
-      }
-      $self->$methodname($rseqid, $input, $output);
-      return 1;
-}
-
-sub process_openReadSession {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_openReadSession_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_openReadSession_result();
-      eval {
-        $result->{success} = $self->{handler}->openReadSession($args->table);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('openReadSession', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_search {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_search_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_search_result();
-      eval {
-        $result->{success} = $self->{handler}->search($args->session, $args->queryArgs);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('search', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_doc {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_doc_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_doc_result();
-      eval {
-        $result->{success} = $self->{handler}->doc($args->session, $args->docLocations, $args->fields);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('doc', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_closeReadSession {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_closeReadSession_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_closeReadSession_result();
-      eval {
-        $self->{handler}->closeReadSession($args->session);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('closeReadSession', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_addDocuments {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_addDocuments_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_addDocuments_result();
-      eval {
-        $self->{handler}->addDocuments($args->options, $args->documents);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('addDocuments', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_deleteDocumentsByQueries {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_deleteDocumentsByQueries_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_deleteDocumentsByQueries_result();
-      eval {
-        $self->{handler}->deleteDocumentsByQueries($args->options, $args->queries);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('deleteDocumentsByQueries', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_deleteDocuments {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_deleteDocuments_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_deleteDocuments_result();
-      eval {
-        $self->{handler}->deleteDocuments($args->options, $args->terms);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('deleteDocuments', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-sub process_updateDocuments {
-      my ($self, $seqid, $input, $output) = @_;
-      my $args = new Blur::ShardServer_updateDocuments_args();
-      $args->read($input);
-      $input->readMessageEnd();
-      my $result = new Blur::ShardServer_updateDocuments_result();
-      eval {
-        $self->{handler}->updateDocuments($args->options, $args->updatePackages);
-      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-        $result->{e} = $@;
-      }
-      $output->writeMessageBegin('updateDocuments', TMessageType::REPLY, $seqid);
-      $result->write($output);
-      $output->writeMessageEnd();
-      $output->getTransport()->flush();
-}
-
-1;


Mime
View raw message