beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [1/3] beam git commit: Use getFileName in NumberedShardedFile
Date Fri, 28 Apr 2017 21:13:39 GMT
Repository: beam
Updated Branches:
  refs/heads/master 2bd668fdb -> dbd44faf3


Use getFileName in NumberedShardedFile


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/0c269cc2
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/0c269cc2
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/0c269cc2

Branch: refs/heads/master
Commit: 0c269cc21674b6f1d863e3ddb8ab233303086212
Parents: 4e6dbf8
Author: Vikas Kedigehalli <vikasrk@google.com>
Authored: Fri Apr 28 12:14:24 2017 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Fri Apr 28 14:13:28 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/beam/sdk/util/NumberedShardedFile.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/0c269cc2/sdks/java/core/src/main/java/org/apache/beam/sdk/util/NumberedShardedFile.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/NumberedShardedFile.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/NumberedShardedFile.java
index fa22586..e904382 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/NumberedShardedFile.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/NumberedShardedFile.java
@@ -195,8 +195,7 @@ public class NumberedShardedFile implements ShardedFile {
   @VisibleForTesting
   boolean checkTotalNumOfFiles(Collection<Metadata> files) {
     for (Metadata fileMedadata : files) {
-      String fileName = fileMedadata.resourceId().toString().substring(
-          fileMedadata.resourceId().getCurrentDirectory().toString().length());
+      String fileName = fileMedadata.resourceId().getFilename();
 
       if (fileName == null) {
         // this path has zero elements


Mime
View raw message