How to use the thrift.Thrift.MessageType function in thrift

To help you get started, we’ve selected a few thrift examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cdapio / cdap / server / thrift_bindings / MetadataService.js View on Github external
MetadataServiceClient.prototype.send_createStream = function(account, stream) {
  var output = new this.pClass(this.output);
  output.writeMessageBegin('createStream', Thrift.MessageType.CALL, this.seqid);
  var args = new MetadataService_createStream_args();
  args.account = account;
  args.stream = stream;
  args.write(output);
  output.writeMessageEnd();
  return this.output.flush();
};
github cdapio / cdap / server / thrift_bindings / MetricsFrontendService.js View on Github external
MetricsFrontendServiceClient.prototype.recv_getLog = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new MetricsFrontendService_getLog_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.e) {
    return callback(result.e);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('getLog failed: unknown result');
github cdapio / cdap / server / thrift_bindings / FlowService.js View on Github external
this._handler.status(args.token, args.identifier, function (success) {
    result.success = success;
    output.writeMessageBegin("status", Thrift.MessageType.REPLY, seqid);
    result.write(output);
    output.writeMessageEnd();
    output.flush();
  })
}
github yodasan / evernode / lib / evernote-thrift / gen-nodejs / UserStore.js View on Github external
this._handler.getNoteStoreUrl(args.authenticationToken, function (err, result) {
    var result = new UserStore_getNoteStoreUrl_result((err != null ? err : {success: result}));
    output.writeMessageBegin("getNoteStoreUrl", Thrift.MessageType.REPLY, seqid);
    result.write(output);
    output.writeMessageEnd();
    output.flush();
  })
}
github cdapio / cdap / server / common / thrift_bindings / AppFabricService.js View on Github external
AppFabricServiceClient.prototype.send_start = function(token, descriptor) {
  var output = new this.pClass(this.output);
  output.writeMessageBegin('start', Thrift.MessageType.CALL, this.seqid);
  var args = new AppFabricService_start_args();
  args.token = token;
  args.descriptor = descriptor;
  args.write(output);
  output.writeMessageEnd();
  return this.output.flush();
};
github yodasan / evernode / lib / evernote-thrift / gen-nodejs / UserStore.js View on Github external
UserStoreClient.prototype.recv_getUser = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new UserStore_getUser_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.userException) {
    return callback(result.userException);
  }
  if (null !== result.systemException) {
    return callback(result.systemException);
  }
  if (null !== result.success) {
github cdapio / cdap / server / thrift_bindings / FlowService.js View on Github external
FlowServiceClient.prototype.send_start = function(token, descriptor) {
  var output = new this.pClass(this.output);
  output.writeMessageBegin('start', Thrift.MessageType.CALL, this.seqid);
  var args = new FlowService_start_args();
  args.token = token;
  args.descriptor = descriptor;
  args.write(output);
  output.writeMessageEnd();
  return this.output.flush();
};
github cdapio / cdap / server / common / thrift_bindings / AppFabricService.js View on Github external
AppFabricServiceProcessor.prototype.process = function(input, output) {
  var r = input.readMessageBegin();
  if (this['process_' + r.fname]) {
    return this['process_' + r.fname].call(this, r.rseqid, input, output);
  } else {
    input.skip(Thrift.Type.STRUCT);
    input.readMessageEnd();
    var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
    output.writeMessageBegin(r.fname, Thrift.MessageType.Exception, r.rseqid);
    x.write(output);
    output.writeMessageEnd();
    output.flush();
  }
}
github cdapio / cdap / server / thrift_bindings / AuthorizationService.js View on Github external
this._handler.renew(args.token, function (success) {
    result.success = success;
    output.writeMessageBegin("renew", Thrift.MessageType.REPLY, seqid);
    result.write(output);
    output.writeMessageEnd();
    output.flush();
  })
}
github cdapio / cdap / server / thrift_bindings / MetadataService.js View on Github external
MetadataServiceClient.prototype.recv_getQuery = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new MetadataService_getQuery_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.e) {
    return callback(result.e);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('getQuery failed: unknown result');