saintstack commented on a change in pull request #1062: HBASE-23705 Add
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368615564
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java
##########
@@ -380,7 +386,8 @@ private HFileContext createHFileContext(Path path,
HFileContextBuilder builder = new HFileContextBuilder()
.withHBaseCheckSum(true)
.withHFileName(path.getName())
- .withCompression(trailer.getCompressionCodec());
+ .withCompression(trailer.getCompressionCodec())
+
.withCellComparator(trailer.createComparator(trailer.getComparatorClassName()));
Review comment:
I want to keep context immutable so it is safe to use in any context. It is
why I removed the setter methods. I think it fine building a new one here
rather than reuse. Its once per file reader open. Seems fine.
Let me add your getCellComparator suggestion.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services