You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Xiaoyu Yao (JIRA)" <ji...@apache.org> on 2014/09/07 01:14:28 UTC

[jira] [Updated] (HDFS-7025) HDFS Credential Provider related Unit Test Failure

     [ https://issues.apache.org/jira/browse/HDFS-7025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiaoyu Yao updated HDFS-7025:
-----------------------------
    Attachment: HDFS-7025.0.patch

> HDFS Credential Provider related  Unit Test Failure
> ---------------------------------------------------
>
>                 Key: HDFS-7025
>                 URL: https://issues.apache.org/jira/browse/HDFS-7025
>             Project: Hadoop HDFS
>          Issue Type: Test
>          Components: encryption
>    Affects Versions: 2.4.1
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Critical
>         Attachments: HDFS-7025.0.patch
>
>
> Reported by: Xiaomara and investigated by [~cnauroth].
> The credential provider related unit tests failed on Windows. The tests try to set up a URI by taking the build test directory and concatenating it with other strings containing the rest of the URI format, i.e.:
> {code}
>   public void testFactory() throws Exception {
>     Configuration conf = new Configuration();
>     conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
>         UserProvider.SCHEME_NAME + ":///," +
>             JavaKeyStoreProvider.SCHEME_NAME + "://file" + tmpDir + "/test.jks");
> {code}
> This logic is incorrect on Windows, because the file path separator will be '\', which violates URI syntax. Forward slash is not permitted. 
> The proper fix is to always do path/URI construction through the org.apache.hadoop.fs.Path class, specifically using the constructors that take explicit parent and child arguments.
> The affected unit tests are:
> {code}
> * TestCryptoAdminCLI
> * TestDFSUtil
> * TestEncryptionZones
> * TestReservedRawPaths
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)