ggershinsky commented on a change in pull request #615: URL: https://github.com/apache/parquet-mr/pull/615#discussion_r447508802
########## File path: parquet-hadoop/src/main/java/org/apache/parquet/crypto/keytools/KeyMaterial.java ########## @@ -0,0 +1,166 @@ +/* Review comment: > .. With the correct annotations it can map a java object automatically. This approach seems to be optimal for objects with a fixed structure / fields - because it searches for all object fields in the json file. In our case, many fields are not always written (eg kms instance or url, if the key is for a column, and not for the footer; and other examples). Searching for them always is an overhead. Moreover, in case of internal storage, we don't need to parse two objects - key metadata and key material, because they are the same, so parsing one object is sufficient. The code we have today, performs only the search/parse of the relevant objects/fields, so it is optimal in that sense - and is also well-defined in one place. We can add more comments to the code to make the field parsing logic crystal clear. What do you think? > > the format of these json objects is important for compatibility. We shall specify them or at least give an example in the comments. Sounds good. In addition to the comments mentioned above (that will be added to the relevant code lines), we will add a class comment to each relevant class, that documents the structure of the corresponding json. ---------------------------------------------------------------- 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: us...@infra.apache.org