beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Di Fabio (JIRA)" <>
Subject [jira] [Created] (BEAM-2229) GcsFileSystem can create invalid Metadata
Date Tue, 09 May 2017 13:33:04 GMT
Josh Di Fabio created BEAM-2229:

             Summary: GcsFileSystem can create invalid Metadata
                 Key: BEAM-2229
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-gcp
    Affects Versions: 2.0.0
            Reporter: Josh Di Fabio
            Assignee: Daniel Halperin
            Priority: Trivial

This is the first issue I've raised on Apache's JIRA; if I have made any mistakes in compiling
this ticket then I apologise and would welcome any feedback.

When matching a path spec, {{GcsFileSystem.toMetadata()}} will sometimes attempt to build
an instance of {{}} without first setting {{sizeBytes}}\[1\].
This always results in an error in the autovalue-generated builder for {{MatchResult.Metadata}}
as {{sizeBytes}} is a required field\[2\].

I propose that {{GcsFileSystem}} set {{sizeBytes}} to {{0}} when there is no size returned
by GCS, which will presumably happen when the path spec refers either to a directory, or to
a non-existent file. {{GcsFileSystem.toMetadata()}} could be updated as follows:

    if (size != null) {

    if (size != null) {
    } else {


This message was sent by Atlassian JIRA

View raw message