[
https://issues.apache.org/jira/browse/HBASE-9546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13785303#comment-13785303
]
Ted Yu commented on HBASE-9546:
-------------------------------
For HFileDataBlockEncoderImpl.java :
{code}
+ private HFileBlockEncodingContext createInCacheEncodingContext(HFileContext
fileContext) {
+ HFileContext newContext = new HFileContextBuilder()
+ .withBlockSize(fileContext.getBlocksize())
+
.withBytesPerCheckSum(fileContext.getBytesPerChecksum())
+ .withChecksumType(fileContext.getChecksumType())
+
.withCompressionAlgo(fileContext.getCompression())
+
.withDataBlockEncodingInCache(fileContext.getEncodingInCache())
+
.withDataBlockEncodingOnDisk(fileContext.getEncodingOnDisk())
+
.withHBaseCheckSum(fileContext.shouldUseHBaseChecksum())
+
.withCompressTags(fileContext.shouldCompressTags())
+
.withIncludesMvcc(fileContext.shouldIncludeMvcc())
+
.withIncludesTags(fileContext.shouldIncludeTags()).build();
{code}
Would HFileContext copy constructor be more suitable in the above case ? More
fields may be added to HFileContext in the future.
> HFileContext should adopt Builder pattern
> -----------------------------------------
>
> Key: HBASE-9546
> URL: https://issues.apache.org/jira/browse/HBASE-9546
> Project: HBase
> Issue Type: Sub-task
> Reporter: Ted Yu
> Assignee: ramkrishna.s.vasudevan
> Attachments: HBASE-9546.patch
>
>
> HFileContext is used in so many places for HFile v3, HFileContext should use
> the Builder pattern.
--
This message was sent by Atlassian JIRA
(v6.1#6144)