MAPREDUCE-1125. SerialUtils.cc: deserializeFloat is out of sync with SerialUtils.hh (Simone Leo via aw)

This commit is contained in:
Allen Wittenauer 2015-11-05 16:57:22 -08:00
parent fc7cd46faf
commit 19a0c2660c
3 changed files with 11 additions and 1 deletions

View File

@ -120,7 +120,6 @@ Trunk (Unreleased)
BUG FIXES
MAPREDUCE-6191. Improve clearing stale state of Java serialization
testcase. (Sam Liu via Eric Yang)
@ -172,6 +171,9 @@ Trunk (Unreleased)
MAPREDUCE-3914. Mismatched free() / delete / delete [] in HadoopPipes
(Joe Mudd via aw)
MAPREDUCE-1125. SerialUtils.cc: deserializeFloat is out of sync with
SerialUtils.hh (Simone Leo via aw)
MAPREDUCE-4574. Fix TotalOrderParitioner to work with
non-WritableComparable key types. (harsh)

View File

@ -162,6 +162,7 @@ namespace HadoopUtils {
void serializeLong(int64_t t, OutStream& stream);
int64_t deserializeLong(InStream& stream);
void serializeFloat(float t, OutStream& stream);
void deserializeFloat(float& t, InStream& stream);
float deserializeFloat(InStream& stream);
void serializeString(const std::string& t, OutStream& stream);
void deserializeString(std::string& t, InStream& stream);

View File

@ -252,6 +252,13 @@ namespace HadoopUtils {
stream.write(buf, sizeof(float));
}
float deserializeFloat(InStream& stream)
{
float f;
deserializeFloat(f, stream);
return f;
}
void deserializeFloat(float& t, InStream& stream)
{
char buf[sizeof(float)];