MCPcopy Create free account
hub / github.com/apache/impala / SerializeToString

Method SerializeToString

be/src/rpc/thrift-util.h:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118
119 template <class T>
120 Status SerializeToString(const T* obj, std::string* result) {
121 try {
122 mem_buffer_->resetBuffer();
123 obj->write(protocol_.get());
124 } catch (std::exception& e) {
125 std::stringstream msg;
126 msg << "Couldn't serialize thrift object beyond "
127 << mem_buffer_->getBufferSize() << " bytes:\n" << e.what();
128 return Status(msg.str());
129 }
130 *result = mem_buffer_->getBufferAsString();
131 return Status::OK();
132 }
133
134 private:
135 std::shared_ptr<apache::thrift::transport::TMemoryBuffer> mem_buffer_;

Callers 13

MakeUnsignedTokenFunction · 0.80
MakeIncompatibleTokenFunction · 0.80
GenerateAuthzTokenMethod · 0.80
GenerateAuthnTokenMethod · 0.80
TEST_PFunction · 0.80
AddStatsToTopicMethod · 0.80
AddHostToTopicDeltaMethod · 0.80
WriteMethod · 0.80

Calls 5

OKFunction · 0.85
getMethod · 0.65
StatusClass · 0.50
writeMethod · 0.45
strMethod · 0.45

Tested by 8

MakeUnsignedTokenFunction · 0.64
MakeIncompatibleTokenFunction · 0.64
TEST_PFunction · 0.64
AddStatsToTopicMethod · 0.64
AddHostToTopicDeltaMethod · 0.64
TESTFunction · 0.64