smengcl commented on code in PR #4584:
URL: https://github.com/apache/ozone/pull/4584#discussion_r1195737109


##########
hadoop-hdds/rocks-native/src/main/patches/rocks-native.patch:
##########
@@ -153,36 +144,83 @@ index eefbaaeee..503ec7aa6 100644
    }
  
    return Status::OK();
-@@ -478,21 +481,26 @@ Status SstFileDumper::ReadSequential(bool print_kv, 
uint64_t read_num,
+ }
+ 
++void write(int value, FILE* file) {
++  char b[4];
++  b[3] =  value & 0x000000ff;
++  b[2] = (value & 0x0000ff00) >> 8;
++  b[1] = (value & 0x00ff0000) >> 16;
++  b[0] = (value & 0xff000000) >> 24;
++  std::fwrite(b, 4, 1, file);
++}
++
++void write(const char* value, int length, FILE* file) {
++  write(length, file);
++  fwrite(value, length, 1, file);
++}
++
++void write(const std::string& value, FILE* file) {
++  write(value.data(), (int)value.length(), file);
++
++}

Review Comment:
   nit
   
   ```suggestion
   +void write(const std::string& value, FILE* file) {
   +  write(value.data(), (int)value.length(), file);
   +}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to