linkedin / dynamometer

A tool for scale and performance testing of HDFS with a specific focus on the NameNode.
BSD 2-Clause "Simplified" License
131 stars 34 forks source link

Fix log error when specify multiple source paths #102

Open pingsutw opened 5 years ago

xkrogen commented 5 years ago

Hi @pingsutw , I actually don't agree that this is correct. Here is the original code:

    Preconditions.checkArgument(resource.getType() == LocalResourceType.ARCHIVE || srcPaths.length == 1,
        "Can only specify multiple source paths if using an ARCHIVE type");

The preconditions say "the resource is an archive OR there is only one source path", i.e., if the resource is an archive then more than one source path is okay. The message is saying that you can only specify multiple source paths if you use archive, which is consistent with the code.