adoroszlai commented on code in PR #3633:
URL: https://github.com/apache/ozone/pull/3633#discussion_r931863681
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKeyDetails.java:
##########
@@ -95,4 +102,13 @@ public FileEncryptionInfo getFileEncryptionInfo() {
public void setOzoneKeyLocations(List<OzoneKeyLocation> ozoneKeyLocations) {
this.ozoneKeyLocations = ozoneKeyLocations;
}
+
+ /**
+ * Get OzoneInputStream to read the content of the key.
+ * @return OzoneInputStream
+ * @throws IOException
+ */
+ public OzoneInputStream getContent() throws IOException {
Review Comment:
`OzoneKeyDetails` is converted to JSON by `ozone sh key info`. The
`getContent()` method should be excluded from the conversion, because we don't
want the binary content to be shown along with metadata.
```suggestion
@JsonIgnore
public OzoneInputStream getContent() throws IOException {
```
This prevents:
```
No serializer found for ...
org.apache.hadoop.ozone.client.OzoneKeyDetails["content"]->org.apache.hadoop.ozone.client.io.OzoneInputStream["inputStream"]->...
```
https://github.com/apache/ozone/runs/7554046528?check_suite_focus=true#step:5:253
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKeyDetails.java:
##########
@@ -21,7 +21,10 @@
import org.apache.hadoop.fs.FileEncryptionInfo;
Review Comment:
Import for `@JsonIgnore`:
```suggestion
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.hadoop.fs.FileEncryptionInfo;
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]