You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2012/02/07 20:28:22 UTC
svn commit: r1241565 - in /pig/trunk: CHANGES.txt
src/org/apache/pig/builtin/JsonMetadata.java
test/org/apache/pig/test/TestPigStorage.java
Author: daijy
Date: Tue Feb 7 19:28:22 2012
New Revision: 1241565
URL: http://svn.apache.org/viewvc?rev=1241565&view=rev
Log:
Input Path Globbing{} not working with PigStorageSchema or PigStorage('\t', '-schema')
Modified:
pig/trunk/CHANGES.txt
pig/trunk/src/org/apache/pig/builtin/JsonMetadata.java
pig/trunk/test/org/apache/pig/test/TestPigStorage.java
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1241565&r1=1241564&r2=1241565&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Tue Feb 7 19:28:22 2012
@@ -243,6 +243,8 @@ PIG-2228: support partial aggregation in
BUG FIXES
+PIG-2489: Input Path Globbing{} not working with PigStorageSchema or PigStorage('\t', '-schema') (daijy)
+
PIG-2484: Fix several e2e test failures/aborts for 23 (daijy)
PIG-2400: Document has based aggregation support (chandec via daijy)
Modified: pig/trunk/src/org/apache/pig/builtin/JsonMetadata.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/builtin/JsonMetadata.java?rev=1241565&r1=1241564&r2=1241565&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/builtin/JsonMetadata.java (original)
+++ pig/trunk/src/org/apache/pig/builtin/JsonMetadata.java Tue Feb 7 19:28:22 2012
@@ -102,11 +102,9 @@ public class JsonMetadata implements Loa
String[] locations = LoadFunc.getPathStrings(path);
for (String loc : locations) {
DataStorage storage;
- try {
- storage = new HDataStorage(new URI(loc), ConfigurationUtil.toProperties(conf));
- } catch (URISyntaxException e) {
- throw new IOException("Unable to read " + loc, e);
- }
+
+ storage = new HDataStorage(new Path(loc).toUri(), ConfigurationUtil.toProperties(conf));
+
String fullPath = FileLocalizer.fullPath(loc, storage);
if(storage.isContainer(fullPath)) {
Modified: pig/trunk/test/org/apache/pig/test/TestPigStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPigStorage.java?rev=1241565&r1=1241564&r2=1241565&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPigStorage.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPigStorage.java Tue Feb 7 19:28:22 2012
@@ -457,5 +457,10 @@ public class TestPigStorage {
Assert.assertTrue(ResourceSchema.equals(schema, testSchema));
new File(globtestdir+"a/a0/.pig_schema").delete();
new File(globtestdir+"a/.pig_schema").delete();
+
+ pigStorage = new PigStorage("\t", "-schema");
+ putSchemaFile(globtestdir+"a/.pig_schema", testSchema);
+ schema = pigStorage.getSchema(globtestdir+"{a,b}", new Job(ConfigurationUtil.toConfiguration(pigContext.getProperties())));
+ Assert.assertTrue(ResourceSchema.equals(schema, testSchema));
}
}