incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/9] git commit: Thrift generated files.
Date Wed, 04 Mar 2015 14:38:43 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c46eb880/distribution/src/main/scripts/interface/gen-js/Blur.js
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-js/Blur.js b/distribution/src/main/scripts/interface/gen-js/Blur.js
index 2dfcb11..ea6c267 100644
--- a/distribution/src/main/scripts/interface/gen-js/Blur.js
+++ b/distribution/src/main/scripts/interface/gen-js/Blur.js
@@ -6281,6 +6281,143 @@ Blur_configuration_result.prototype.write = function(output) {
   return;
 };
 
+Blur_configurationPerServer_args = function(args) {
+  this.thriftServerPlusPort = null;
+  this.configName = null;
+  if (args) {
+    if (args.thriftServerPlusPort !== undefined) {
+      this.thriftServerPlusPort = args.thriftServerPlusPort;
+    }
+    if (args.configName !== undefined) {
+      this.configName = args.configName;
+    }
+  }
+};
+Blur_configurationPerServer_args.prototype = {};
+Blur_configurationPerServer_args.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+      if (ftype == Thrift.Type.STRING) {
+        this.thriftServerPlusPort = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 2:
+      if (ftype == Thrift.Type.STRING) {
+        this.configName = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_configurationPerServer_args.prototype.write = function(output) {
+  output.writeStructBegin('Blur_configurationPerServer_args');
+  if (this.thriftServerPlusPort !== null && this.thriftServerPlusPort !== undefined)
{
+    output.writeFieldBegin('thriftServerPlusPort', Thrift.Type.STRING, 1);
+    output.writeString(this.thriftServerPlusPort);
+    output.writeFieldEnd();
+  }
+  if (this.configName !== null && this.configName !== undefined) {
+    output.writeFieldBegin('configName', Thrift.Type.STRING, 2);
+    output.writeString(this.configName);
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
+Blur_configurationPerServer_result = function(args) {
+  this.success = null;
+  this.ex = null;
+  if (args instanceof BlurException) {
+    this.ex = args;
+    return;
+  }
+  if (args) {
+    if (args.success !== undefined) {
+      this.success = args.success;
+    }
+    if (args.ex !== undefined) {
+      this.ex = args.ex;
+    }
+  }
+};
+Blur_configurationPerServer_result.prototype = {};
+Blur_configurationPerServer_result.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+      if (ftype == Thrift.Type.STRING) {
+        this.success = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 1:
+      if (ftype == Thrift.Type.STRUCT) {
+        this.ex = new BlurException();
+        this.ex.read(input);
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_configurationPerServer_result.prototype.write = function(output) {
+  output.writeStructBegin('Blur_configurationPerServer_result');
+  if (this.success !== null && this.success !== undefined) {
+    output.writeFieldBegin('success', Thrift.Type.STRING, 0);
+    output.writeString(this.success);
+    output.writeFieldEnd();
+  }
+  if (this.ex !== null && this.ex !== undefined) {
+    output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
+    this.ex.write(output);
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
 Blur_metrics_args = function(args) {
   this.metrics = null;
   if (args) {
@@ -9002,6 +9139,44 @@ BlurClient.prototype.recv_configuration = function() {
   }
   throw 'configuration failed: unknown result';
 };
+BlurClient.prototype.configurationPerServer = function(thriftServerPlusPort, configName)
{
+  this.send_configurationPerServer(thriftServerPlusPort, configName);
+  return this.recv_configurationPerServer();
+};
+
+BlurClient.prototype.send_configurationPerServer = function(thriftServerPlusPort, configName)
{
+  this.output.writeMessageBegin('configurationPerServer', Thrift.MessageType.CALL, this.seqid);
+  var args = new Blur_configurationPerServer_args();
+  args.thriftServerPlusPort = thriftServerPlusPort;
+  args.configName = configName;
+  args.write(this.output);
+  this.output.writeMessageEnd();
+  return this.output.getTransport().flush();
+};
+
+BlurClient.prototype.recv_configurationPerServer = function() {
+  var ret = this.input.readMessageBegin();
+  var fname = ret.fname;
+  var mtype = ret.mtype;
+  var rseqid = ret.rseqid;
+  if (mtype == Thrift.MessageType.EXCEPTION) {
+    var x = new Thrift.TApplicationException();
+    x.read(this.input);
+    this.input.readMessageEnd();
+    throw x;
+  }
+  var result = new Blur_configurationPerServer_result();
+  result.read(this.input);
+  this.input.readMessageEnd();
+
+  if (null !== result.ex) {
+    throw result.ex;
+  }
+  if (null !== result.success) {
+    return result.success;
+  }
+  throw 'configurationPerServer failed: unknown result';
+};
 BlurClient.prototype.metrics = function(metrics) {
   this.send_metrics(metrics);
   return this.recv_metrics();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c46eb880/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm b/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
index f1d5c65..01f96ac 100644
--- a/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
+++ b/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
@@ -7221,6 +7221,165 @@ sub write {
   return $xfer;
 }
 
+package Blur::Blur_configurationPerServer_args;
+use base qw(Class::Accessor);
+Blur::Blur_configurationPerServer_args->mk_accessors( qw( thriftServerPlusPort configName
) );
+
+sub new {
+  my $classname = shift;
+  my $self      = {};
+  my $vals      = shift || {};
+  $self->{thriftServerPlusPort} = undef;
+  $self->{configName} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{thriftServerPlusPort}) {
+      $self->{thriftServerPlusPort} = $vals->{thriftServerPlusPort};
+    }
+    if (defined $vals->{configName}) {
+      $self->{configName} = $vals->{configName};
+    }
+  }
+  return bless ($self, $classname);
+}
+
+sub getName {
+  return 'Blur_configurationPerServer_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->{thriftServerPlusPort});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{configName});
+      } 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('Blur_configurationPerServer_args');
+  if (defined $self->{thriftServerPlusPort}) {
+    $xfer += $output->writeFieldBegin('thriftServerPlusPort', TType::STRING, 1);
+    $xfer += $output->writeString($self->{thriftServerPlusPort});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{configName}) {
+    $xfer += $output->writeFieldBegin('configName', TType::STRING, 2);
+    $xfer += $output->writeString($self->{configName});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package Blur::Blur_configurationPerServer_result;
+use base qw(Class::Accessor);
+Blur::Blur_configurationPerServer_result->mk_accessors( qw( success ) );
+
+sub new {
+  my $classname = shift;
+  my $self      = {};
+  my $vals      = shift || {};
+  $self->{success} = undef;
+  $self->{ex} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ex}) {
+      $self->{ex} = $vals->{ex};
+    }
+  }
+  return bless ($self, $classname);
+}
+
+sub getName {
+  return 'Blur_configurationPerServer_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::STRING) {
+        $xfer += $input->readString(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ex} = new Blur::BlurException();
+        $xfer += $self->{ex}->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('Blur_configurationPerServer_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+    $xfer += $output->writeString($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ex}) {
+    $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+    $xfer += $self->{ex}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
 package Blur::Blur_metrics_args;
 use base qw(Class::Accessor);
 Blur::Blur_metrics_args->mk_accessors( qw( metrics ) );
@@ -8838,6 +8997,14 @@ sub configuration{
   die 'implement interface';
 }
 
+sub configurationPerServer{
+  my $self = shift;
+  my $thriftServerPlusPort = shift;
+  my $configName = shift;
+
+  die 'implement interface';
+}
+
 sub metrics{
   my $self = shift;
   my $metrics = shift;
@@ -9262,6 +9429,14 @@ sub configuration{
   return $self->{impl}->configuration();
 }
 
+sub configurationPerServer{
+  my ($self, $request) = @_;
+
+  my $thriftServerPlusPort = ($request->{'thriftServerPlusPort'}) ? $request->{'thriftServerPlusPort'}
: undef;
+  my $configName = ($request->{'configName'}) ? $request->{'configName'} : undef;
+  return $self->{impl}->configurationPerServer($thriftServerPlusPort, $configName);
+}
+
 sub metrics{
   my ($self, $request) = @_;
 
@@ -11456,6 +11631,55 @@ sub recv_configuration{
   }
   die "configuration failed: unknown result";
 }
+sub configurationPerServer{
+  my $self = shift;
+  my $thriftServerPlusPort = shift;
+  my $configName = shift;
+
+    $self->send_configurationPerServer($thriftServerPlusPort, $configName);
+  return $self->recv_configurationPerServer();
+}
+
+sub send_configurationPerServer{
+  my $self = shift;
+  my $thriftServerPlusPort = shift;
+  my $configName = shift;
+
+  $self->{output}->writeMessageBegin('configurationPerServer', TMessageType::CALL,
$self->{seqid});
+  my $args = new Blur::Blur_configurationPerServer_args();
+  $args->{thriftServerPlusPort} = $thriftServerPlusPort;
+  $args->{configName} = $configName;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_configurationPerServer{
+  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::Blur_configurationPerServer_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ex}) {
+    die $result->{ex};
+  }
+  die "configurationPerServer failed: unknown result";
+}
 sub metrics{
   my $self = shift;
   my $metrics = shift;
@@ -12646,6 +12870,23 @@ sub process_configuration {
     $output->getTransport()->flush();
 }
 
+sub process_configurationPerServer {
+    my ($self, $seqid, $input, $output) = @_;
+    my $args = new Blur::Blur_configurationPerServer_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    my $result = new Blur::Blur_configurationPerServer_result();
+    eval {
+      $result->{success} = $self->{handler}->configurationPerServer($args->thriftServerPlusPort,
$args->configName);
+    }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+      $result->{ex} = $@;
+    }
+    $output->writeMessageBegin('configurationPerServer', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->writeMessageEnd();
+    $output->getTransport()->flush();
+}
+
 sub process_metrics {
     my ($self, $seqid, $input, $output) = @_;
     my $args = new Blur::Blur_metrics_args();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c46eb880/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 e30b83b..ce5eae1 100644
--- a/distribution/src/main/scripts/interface/gen-rb/blur.rb
+++ b/distribution/src/main/scripts/interface/gen-rb/blur.rb
@@ -730,6 +730,22 @@ module Blur
         raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT,
'configuration failed: unknown result')
       end
 
+      def configurationPerServer(thriftServerPlusPort, configName)
+        send_configurationPerServer(thriftServerPlusPort, configName)
+        return recv_configurationPerServer()
+      end
+
+      def send_configurationPerServer(thriftServerPlusPort, configName)
+        send_message('configurationPerServer', ConfigurationPerServer_args, :thriftServerPlusPort
=> thriftServerPlusPort, :configName => configName)
+      end
+
+      def recv_configurationPerServer()
+        result = receive_message(ConfigurationPerServer_result)
+        return result.success unless result.success.nil?
+        raise result.ex unless result.ex.nil?
+        raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT,
'configurationPerServer failed: unknown result')
+      end
+
       def metrics(metrics)
         send_metrics(metrics)
         return recv_metrics()
@@ -1376,6 +1392,17 @@ module Blur
         write_result(result, oprot, 'configuration', seqid)
       end
 
+      def process_configurationPerServer(seqid, iprot, oprot)
+        args = read_args(iprot, ConfigurationPerServer_args)
+        result = ConfigurationPerServer_result.new()
+        begin
+          result.success = @handler.configurationPerServer(args.thriftServerPlusPort, args.configName)
+        rescue ::Blur::BlurException => ex
+          result.ex = ex
+        end
+        write_result(result, oprot, 'configurationPerServer', seqid)
+      end
+
       def process_metrics(seqid, iprot, oprot)
         args = read_args(iprot, Metrics_args)
         result = Metrics_result.new()
@@ -3133,6 +3160,42 @@ module Blur
       ::Thrift::Struct.generate_accessors self
     end
 
+    class ConfigurationPerServer_args
+      include ::Thrift::Struct, ::Thrift::Struct_Union
+      THRIFTSERVERPLUSPORT = 1
+      CONFIGNAME = 2
+
+      FIELDS = {
+        THRIFTSERVERPLUSPORT => {:type => ::Thrift::Types::STRING, :name => 'thriftServerPlusPort'},
+        CONFIGNAME => {:type => ::Thrift::Types::STRING, :name => 'configName'}
+      }
+
+      def struct_fields; FIELDS; end
+
+      def validate
+      end
+
+      ::Thrift::Struct.generate_accessors self
+    end
+
+    class ConfigurationPerServer_result
+      include ::Thrift::Struct, ::Thrift::Struct_Union
+      SUCCESS = 0
+      EX = 1
+
+      FIELDS = {
+        SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
+        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 Metrics_args
       include ::Thrift::Struct, ::Thrift::Struct_Union
       METRICS = 1

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c46eb880/docs/Blur.html
----------------------------------------------------------------------
diff --git a/docs/Blur.html b/docs/Blur.html
index 07b0259..9fe4dac 100644
--- a/docs/Blur.html
+++ b/docs/Blur.html
@@ -161,6 +161,7 @@ limitations under the License.
 <li><a href="#Fn_Blur_shardServerLayoutState">&nbsp;&nbsp;shardServerLayoutState</a></li>
 <li><a href="#Fn_Blur_isInSafeMode">&nbsp;&nbsp;isInSafeMode</a></li>
 <li><a href="#Fn_Blur_configuration">&nbsp;&nbsp;configuration</a></li>
+<li><a href="#Fn_Blur_configurationPerServer">&nbsp;&nbsp;configurationPerServer</a></li>
 <li><a href="#Fn_Blur_metrics">&nbsp;&nbsp;metrics</a></li>
 <li><a href="#Fn_Blur_startTrace">&nbsp;&nbsp;startTrace</a></li>
 <li><a href="#Fn_Blur_traceList">&nbsp;&nbsp;traceList</a></li>
@@ -1137,6 +1138,12 @@ throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Fetches the Blur configuration.
 @return Map of property name to value.
+<br/></p></section><section><div class="page-header"><h4
id="Fn_Blur_configurationPerServer">Function: Blur.configurationPerServer</h4></div><p
class="lead">
+<pre><code>string</code> configurationPerServer(<code>string</code>
thriftServerPlusPort,
+<code>string</code> configName)
+throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Fetches the Blur configuration.
+@return Map of property name to value.
 <br/></p></section><section><div class="page-header"><h4
id="Fn_Blur_metrics">Function: Blur.metrics</h4></div><p class="lead">
 <pre><code>map&lt;<code>string</code>, <code><a href="Blur.html#Struct_Metric">Metric</a></code>&gt;</code>
metrics(<code>set&lt;<code>string</code>&gt;</code> metrics)
 throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>


Mime
View raw message