yihua commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2099067086
##########
hudi-common/src/main/java/org/apache/hudi/common/bootstrap/index/hfile/HFileBootstrapIndex.java:
##########
@@ -144,7 +144,7 @@ public BootstrapIndex.IndexReader createReader() {
@Override
public BootstrapIndex.IndexWriter createWriter(String bootstrapBasePath) {
- return (IndexWriter)
ReflectionUtils.loadClass("org.apache.hudi.common.bootstrap.index.hfile.HBaseHFileBootstrapIndexWriter",
+ return (IndexWriter)
ReflectionUtils.loadClass(HFileBootstrapIndexWriter.class.getName(),
Review Comment:
We can directly use `new HFileBootstrapIndexWriter` instead of reflection
here?
##########
hudi-common/src/main/java/org/apache/hudi/common/bootstrap/index/hfile/HFileBootstrapIndexWriter.java:
##########
@@ -114,9 +108,7 @@ private void writeNextPartition(String partitionPath,
String bootstrapPartitionP
m.getBootstrapFileStatus())).collect(Collectors.toMap(Pair::getKey,
Pair::getValue)));
Option<byte[]> bytes =
TimelineMetadataUtils.serializeAvroMetadata(bootstrapPartitionMetadata,
HoodieBootstrapPartitionMetadata.class);
if (bytes.isPresent()) {
- indexByPartitionWriter
- .append(new KeyValue(getUTF8Bytes(getPartitionKey(partitionPath)),
new byte[0], new byte[0],
- HConstants.LATEST_TIMESTAMP, KeyValue.Type.Put, bytes.get()));
+ indexByPartitionWriter.append(getPartitionKey(partitionPath),
bytes.get());
Review Comment:
When writing the key-value pairs, do you write the bytes confirming to
`HConstants.LATEST_TIMESTAMP`, `KeyValue.Type.Put`, etc.?
--
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]