[
https://issues.apache.org/jira/browse/HDFS-13371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419489#comment-16419489
]
Jason Lowe commented on HDFS-13371:
-----------------------------------
{quote}Is there a good way to handle this other than having test coverage for
this (which I'm not even sure how) and catching when new optional fields are
added?
{quote}
Reflection could be leveraged to generate protobuf records for testing. See
TestPBImplRecords for an example. Theoretically any field marked optional in
the protobuf record could be missing in the test record, although I suspect in
practice many of the fields aren't really optional. So the hard part would be
knowing which ones are truly optional despite what the protobuf field metadata
says. So it might be a manual process to add a test for a new, optional field
that was added. However if there was already a test framework in place and very
simple to add the new field to the test (i.e.: by adding an annotation to a
method/field or single line to a test) then it would be more likely to be done.
> NPE for FsServerDefaults.getKeyProviderUri() for clientProtocol communication
> between 2.7 and 3.2
> -------------------------------------------------------------------------------------------------
>
> Key: HDFS-13371
> URL: https://issues.apache.org/jira/browse/HDFS-13371
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.1.0, 3.2.0
> Reporter: Sherwood Zheng
> Assignee: Sherwood Zheng
> Priority: Minor
> Attachments: HADOOP-15336.000.patch, HADOOP-15336.001.patch
>
>
> KeyProviderUri is not available in 2.7 so when 2.7 clients contact with 3.2
> services, it cannot find the key provider URI and triggers a
> NullPointerException.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]