Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
TBufferedTransport.receiver(function(transin) {
var protin = new TBinaryProtocol(transin);
var transout = new TBufferedTransport(undefined, function(buf) {
callback.sendReply(buf);
});
var protout = new TBinaryProtocol(transout);
try {
processor.process(protin, protout);
} catch (err) {
console.log(err);
var x = new Thrift.TApplicationException(
Thrift.TApplicationExceptionType.UNKNOWN_METHOD,
'Unknown error'
);
protout.writeMessageBegin('', Thrift.MessageType.Exception, 0);
x.write(protout);
protout.writeMessageEnd();
protout.flush();
}
})(datain);
}
AppFabricServiceClient.prototype.recv_status = 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 AppFabricService_status_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('status failed: unknown result');
};
FlowServiceClient.prototype.recv_stop = 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 FlowService_stop_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('stop failed: unknown result');
};
MetricsFrontendServiceClient.prototype.recv_getCounters = 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_getCounters_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('getCounters failed: unknown result');
};
MetadataServiceClient.prototype.recv_createDataset = 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_createDataset_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('createDataset failed: unknown result');
};