pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cheol...@apache.org
Subject svn commit: r1604649 - in /pig/trunk: CHANGES.txt src/org/apache/pig/builtin/Bloom.java
Date Sun, 22 Jun 2014 20:09:39 GMT
Author: cheolsoo
Date: Sun Jun 22 20:09:38 2014
New Revision: 1604649

URL: http://svn.apache.org/r1604649
Log:
PIG-4032: BloomFilter fails with s3 path in Hadoop 2.4 (cheolsoo)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/org/apache/pig/builtin/Bloom.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1604649&r1=1604648&r2=1604649&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Sun Jun 22 20:09:38 2014
@@ -40,6 +40,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-4032: BloomFilter fails with s3 path in Hadoop 2.4 (cheolsoo)
+
 PIG-4018: Schema validation fails with UNION ONSCHEMA (daijy)
 
 PIG-4022: Fix tez e2e test SkewedJoin_6 (daijy)

Modified: pig/trunk/src/org/apache/pig/builtin/Bloom.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/builtin/Bloom.java?rev=1604649&r1=1604648&r2=1604649&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/builtin/Bloom.java (original)
+++ pig/trunk/src/org/apache/pig/builtin/Bloom.java Sun Jun 22 20:09:38 2014
@@ -26,7 +26,6 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.bloom.BloomFilter;
 import org.apache.hadoop.util.bloom.Key;
@@ -35,7 +34,6 @@ import org.apache.pig.FilterFunc;
 import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
-import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
  * Use a Bloom filter build previously by BuildBloom.  You would first
@@ -112,7 +110,8 @@ public class Bloom extends FilterFunc {
     }
 
     private String getFilenameFromPath(String p) throws IOException {
-        return p.replace("/", "_");
+        Path path = new Path(p);
+        return path.toUri().getPath().replace("/", "_");
     }
 
 }



Mime
View raw message