Author: olga Date: Thu Oct 23 11:46:23 2008 New Revision: 707440 URL: http://svn.apache.org/viewvc?rev=707440&view=rev Log: PIG-507: permissions errors not reported
Modified: incubator/pig/branches/types/CHANGES.txt incubator/pig/branches/types/src/org/apache/pig/backend/executionengine/PigSlicer.java incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java Modified: incubator/pig/branches/types/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/CHANGES.txt?rev=707440&r1=707439&r2=707440&view=diff ============================================================================== --- incubator/pig/branches/types/CHANGES.txt (original) +++ incubator/pig/branches/types/CHANGES.txt Thu Oct 23 11:46:23 2008 @@ -299,3 +299,5 @@ olgan) PIG-499: parser issue with as (sms via olgan) + + PIG-507: permission error not reported (pradeepk via olgan) Modified: incubator/pig/branches/types/src/org/apache/pig/backend/executionengine/PigSlicer.java URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/executionengine/PigSlicer.java?rev=707440&r1=707439&r2=707440&view=diff ============================================================================== --- incubator/pig/branches/types/src/org/apache/pig/backend/executionengine/PigSlicer.java (original) +++ incubator/pig/branches/types/src/org/apache/pig/backend/executionengine/PigSlicer.java Thu Oct 23 11:46:23 2008 @@ -29,6 +29,7 @@ import org.apache.pig.backend.datastorage.DataStorage; import org.apache.pig.backend.datastorage.ElementDescriptor; import org.apache.pig.impl.io.FileLocalizer; +import org.apache.pig.impl.util.WrappedIOException; /** * Creates a slice per block size element in all files at location. If location @@ -71,18 +72,21 @@ if (fullPath.systemElement()) { continue; } - if (fullPath instanceof ContainerDescriptor) { - for (ElementDescriptor child : ((ContainerDescriptor) fullPath)) { - paths.add(child); + try { + if (fullPath instanceof ContainerDescriptor) { + for (ElementDescriptor child : ((ContainerDescriptor) fullPath)) { + paths.add(child); + } + continue; } - continue; + } catch (Exception e) { + throw WrappedIOException.wrap(e); } Map<String, Object> stats = fullPath.getStatistics(); long bs = (Long) (stats.get(ElementDescriptor.BLOCK_SIZE_KEY)); long size = (Long) (stats.get(ElementDescriptor.LENGTH_KEY)); long pos = 0; String name = fullPath.toString(); - // System.out.println(size + " " + name); if (name.endsWith(".gz") || !splittable) { // Anything that ends with a ".gz" we must process as a complete // file Modified: incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java?rev=707440&r1=707439&r2=707440&view=diff ============================================================================== --- incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java (original) +++ incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java Thu Oct 23 11:46:23 2008 @@ -154,6 +154,7 @@ } } catch (IOException e) { + throw new RuntimeException(e.getMessage()); } /*