You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ya...@apache.org on 2010/04/09 17:50:55 UTC
svn commit: r932471 - in /hadoop/pig/branches/branch-0.7/contrib/zebra:
CHANGES.txt src/java/org/apache/hadoop/zebra/pig/TableLoader.java
Author: yanz
Date: Fri Apr 9 15:50:54 2010
New Revision: 932471
URL: http://svn.apache.org/viewvc?rev=932471&view=rev
Log:
PIG-1356 TableLoader makes unnecessary calls to build a Job instance that create a new JobClient in the hadoop 0.20.9 (yanz)
Modified:
hadoop/pig/branches/branch-0.7/contrib/zebra/CHANGES.txt
hadoop/pig/branches/branch-0.7/contrib/zebra/src/java/org/apache/hadoop/zebra/pig/TableLoader.java
Modified: hadoop/pig/branches/branch-0.7/contrib/zebra/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/branches/branch-0.7/contrib/zebra/CHANGES.txt?rev=932471&r1=932470&r2=932471&view=diff
==============================================================================
--- hadoop/pig/branches/branch-0.7/contrib/zebra/CHANGES.txt (original)
+++ hadoop/pig/branches/branch-0.7/contrib/zebra/CHANGES.txt Fri Apr 9 15:50:54 2010
@@ -76,6 +76,8 @@ Trunk (unreleased changes)
BUG FIXES
+ PIG-1356 TableLoader makes unnecessary calls to build a Job instance that create a new JobClient in the hadoop 0.20.9 (yanz)
+
PIG-1349 Hubson test failure in test case TestBasicUnion (xuefuz via yanz)
PIG-1318 Invalid type for source_table field when using order-preserving Sorted Table Union (gauravj via yanz)
Modified: hadoop/pig/branches/branch-0.7/contrib/zebra/src/java/org/apache/hadoop/zebra/pig/TableLoader.java
URL: http://svn.apache.org/viewvc/hadoop/pig/branches/branch-0.7/contrib/zebra/src/java/org/apache/hadoop/zebra/pig/TableLoader.java?rev=932471&r1=932470&r2=932471&view=diff
==============================================================================
--- hadoop/pig/branches/branch-0.7/contrib/zebra/src/java/org/apache/hadoop/zebra/pig/TableLoader.java (original)
+++ hadoop/pig/branches/branch-0.7/contrib/zebra/src/java/org/apache/hadoop/zebra/pig/TableLoader.java Fri Apr 9 15:50:54 2010
@@ -212,8 +212,7 @@ public class TableLoader extends LoadFun
/*
* Hack: use FileInputFormat to decode comma-separated multiple path format.
*/
- private static Path[] getPathsFromLocation(String location, Configuration conf) throws IOException {
- Job j = new Job( conf );
+ private static Path[] getPathsFromLocation(String location, Job j) throws IOException {
FileInputFormat.setInputPaths( j, location );
Path[] paths = FileInputFormat.getInputPaths( j );
@@ -221,6 +220,7 @@ public class TableLoader extends LoadFun
* Performing glob pattern matching
*/
List<Path> result = new ArrayList<Path>(paths.length);
+ Configuration conf = j.getConfiguration();
for (Path p : paths) {
FileSystem fs = p.getFileSystem(conf);
FileStatus[] matches = fs.globStatus(p);
@@ -278,7 +278,7 @@ public class TableLoader extends LoadFun
@Override
public void setLocation(String location, Job job) throws IOException {
- Path[] paths = getPathsFromLocation( location, job.getConfiguration() );
+ Path[] paths = getPathsFromLocation( location, job );
TableInputFormat.setInputPaths( job, paths );
// The following obviously goes beyond of set location, but this is the only place that we
@@ -300,7 +300,7 @@ public class TableLoader extends LoadFun
@Override
public ResourceSchema getSchema(String location, Job job) throws IOException {
- Path[] paths = getPathsFromLocation( location, job.getConfiguration());
+ Path[] paths = getPathsFromLocation( location, job);
TableInputFormat.setInputPaths( job, paths );
Schema tableSchema = null;