-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-28556 Reduce memory copying in Rest server when serializing Cel… #5870
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
} | ||
cellSetModel.addRow(rModel); | ||
Cell firstCell = r.rawCells()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we extract a common method for this? Seems the code is exactly the same with the above code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will add a utility method somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the refactor
for (Cell kv : kvs) { | ||
rModel.addCell(new CellModel(CellUtil.cloneFamily(kv), CellUtil.cloneQualifier(kv), | ||
kv.getTimestamp(), CellUtil.cloneValue(kv))); | ||
Cell firstCell = rs.rawCells()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too...
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
@InterfaceAudience.Private | ||
public class RestUtil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it final and give it a private constructor. Otherwise there will be some checkstyle warnings IIRC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…lModel to Protobuf Signed-off-by: Duo Zhang <[email protected]>
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…lModel to Protobuf (#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (apache#5870) Signed-off-by: Duo Zhang <[email protected]>
…lModel to Protobuf (apache#5870) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 7cd0436)
…lModel to Protobuf
Change-Id: I2234e3e12fcfe789b3b5dd6fe3bbd52339fdd642