-
Notifications
You must be signed in to change notification settings - Fork 592
HDDS-5666. Add option to createKey via streaming api in Freon #2574
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
Conversation
d1e4eea to
89a12ad
Compare
f637b1e to
ce1d880
Compare
283c943 to
855d341
Compare
captainzmc
left a comment
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 @sadanand48 work on this. I left few comments.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OzoneClientKeyGenerator.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ContentGenerator.java
Outdated
Show resolved
Hide resolved
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.
This line will conflict with the patch of EC. EC is currently voting on merge to master, so EC will merge into master soon. So can we continue this PR after EC merge?
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.
Sure.
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.
@sadanand48 , let's hardcode replicationConfig in createStreamKey(..) for the moment. We may change it later if there is a need.
private void createStreamKey(long counter) throws Exception {
final ReplicationConfig replicationConfig = ReplicationConfig
.fromProtoTypeAndFactor(HddsProtos.ReplicationType.RATIS,
HddsProtos.ReplicationFactor.THREE);
final String key = generateObjectName(counter);
timer.time(() -> {
try (OzoneDataStreamOutput stream = bucket
.createStreamKey(key, keySize, replicationConfig, metadata)) {
contentGenerator.write(stream);
}
return null;
});
}
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.
Done.
b6f1921 to
f826d12
Compare
|
@sadanand48 , there are conflicts. Could could you update the change? |
(cherry picked from commit f623bec992e80eda82e6155a3b20c476e683a3d6)
szetszwo
left a comment
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.
+1 the change looks good.
What changes were proposed in this pull request?
Add an option to createKey via streaming api in Freon via OzoneClientKeyGenerator.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5666
How was this patch tested?
Tested the command via docker