You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ro...@apache.org on 2016/02/08 00:52:43 UTC
svn commit: r1729053 - in /pig/trunk: CHANGES.txt
contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java
Author: rohini
Date: Sun Feb 7 23:52:42 2016
New Revision: 1729053
URL: http://svn.apache.org/viewvc?rev=1729053&view=rev
Log:
PIG-4686: Backend code should not call AvroStorageUtils.getPaths (mitdesai via rohini)
Modified:
pig/trunk/CHANGES.txt
pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1729053&r1=1729052&r2=1729053&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Sun Feb 7 23:52:42 2016
@@ -89,6 +89,8 @@ PIG-4639: Add better parser for Apache H
BUG FIXES
+PIG-4686: Backend code should not call AvroStorageUtils.getPaths (mitdesai via rohini)
+
PIG-4795: Flushing ObjectOutputStream before calling toByteArray on the underlying ByteArrayOutputStream (emopers via daijy)
PIG-4690: Union with self replicate join will fail in Tez (rohini)
Modified: pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java?rev=1729053&r1=1729052&r2=1729053&view=diff
==============================================================================
--- pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java (original)
+++ pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/AvroStorage.java Sun Feb 7 23:52:42 2016
@@ -186,18 +186,20 @@ public class AvroStorage extends FileInp
}
}
- Configuration conf = job.getConfiguration();
- Set<Path> paths = AvroStorageUtils.getPaths(location, conf, true);
- if (!paths.isEmpty()) {
- // Set top level directories in input format. Adding all files will
- // bloat configuration size
- FileInputFormat.setInputPaths(job, paths.toArray(new Path[paths.size()]));
- // Scan all directories including sub directories for schema
- if (inputAvroSchema == null) {
- setInputAvroSchema(paths, conf);
+ if (inputAvroSchema == null || UDFContext.getUDFContext().isFrontend()) {
+ Configuration conf = job.getConfiguration();
+ Set<Path> paths = AvroStorageUtils.getPaths(location, conf, true);
+ if (!paths.isEmpty()) {
+ // Set top level directories in input format. Adding all files will
+ // bloat configuration size
+ FileInputFormat.setInputPaths(job, paths.toArray(new Path[paths.size()]));
+ // Scan all directories including sub directories for schema
+ if (inputAvroSchema == null) {
+ setInputAvroSchema(paths, conf);
+ }
+ } else {
+ throw new IOException("Input path \'" + location + "\' is not found");
}
- } else {
- throw new IOException("Input path \'" + location + "\' is not found");
}
}