Skip to content

Info.convertFullPathToFsAndRelativePath fails on ` (backtick) in s3 path #155

@mkerhart-absa

Description

@mkerhart-absa

Repro steps:

val path = "s3a://bucket/data/`backticked.name`"
val (fs, p) = InfoFile.convertFullPathToFsAndRelativePath(path)(hadoopConfig)

Error:

Illegal character in path at index 18: s3a://bucket/data/`backticked.name`
java.net.URISyntaxException: Illegal character in path at index 18: s3a://bucket/data/`backticked.name`
	at java.net.URI$Parser.fail(URI.java:2873)
	at java.net.URI$Parser.checkChars(URI.java:3046)
	at java.net.URI$Parser.parseHierarchical(URI.java:3130)
	at java.net.URI$Parser.parse(URI.java:3078)
	at java.net.URI.<init>(URI.java:588)
	at za.co.absa.atum.utils.InfoFile$.convertFullPathToFsAndRelativePath(InfoFile.scala:45)

Expected result:

The method shouldn't fail. Backtick is a valid path char in this context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions