Author: olga
Date: Thu Oct 29 16:07:49 2009
New Revision: 831007

URL: http://svn.apache.org/viewvc?rev=831007&view=rev
Log:
PIG-1055: FINDBUGS: remaining Dodgy Warnings (olgan)

Modified:
    hadoop/pig/trunk/CHANGES.txt
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/DotMRPrinter.java
    
hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/OpLimitOptimizer.java
    hadoop/pig/trunk/test/findbugsExcludeFile.xml

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=831007&r1=831006&r2=831007&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Thu Oct 29 16:07:49 2009
@@ -26,6 +26,8 @@
 
 IMPROVEMENTS
 
+PIG-1055: FINDBUGS: remaining "Dodgy Warnings" (olgan)
+
 PIG-1052: FINDBUGS: remaining performance warningse(olgan)
 
 PIG-1037: Converted sorted and distinct bags to use the new active spilling

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java?rev=831007&r1=831006&r2=831007&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
 Thu Oct 29 16:07:49 2009
@@ -353,7 +353,6 @@
             return new String[] {hodHDFS, hodMapRed};
         }
         
-        try {
             // first, create temp director to store the configuration
             hodConfDir = createTempDir(server);
                        
@@ -431,12 +430,6 @@
             hodMapRed = mapred;
 
             return new String[] {hdfs, mapred};
-        } 
-        catch (Exception e) {
-            int errCode = 6010;
-            String msg = "Could not connect to HOD";
-            throw new ExecException(msg, errCode, 
PigException.REMOTE_ENVIRONMENT, e);
-        }
     }
 
     private synchronized void closeHod(String server){

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/DotMRPrinter.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/DotMRPrinter.java?rev=831007&r1=831006&r2=831007&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/DotMRPrinter.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/DotMRPrinter.java
 Thu Oct 29 16:07:49 2009
@@ -187,7 +187,7 @@
         @Override
         protected String[] getAttributes(InnerOperator op) {
             String[] attributes = new String[3];
-            attributes[0] = "label=\""+getName(op)+"\"";
+            attributes[0] = "label=\""+super.getName(op)+"\"";
             attributes[1] = "style=\"filled\"";
             attributes[2] = "fillcolor=\"white\"";
             return attributes;

Modified: 
hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/OpLimitOptimizer.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/OpLimitOptimizer.java?rev=831007&r1=831006&r2=831007&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/OpLimitOptimizer.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/OpLimitOptimizer.java
 Thu Oct 29 16:07:49 2009
@@ -241,10 +241,6 @@
             }
        } catch (OptimizerException oe) {
            throw oe;
-        } catch (Exception e) {
-            int errCode = 2050;
-            String msg = "Internal error. Unable to optimize limit operator.";
-            throw new OptimizerException(msg, errCode, PigException.BUG);
         }
     }
 }

Modified: hadoop/pig/trunk/test/findbugsExcludeFile.xml
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/test/findbugsExcludeFile.xml?rev=831007&r1=831006&r2=831007&view=diff
==============================================================================
--- hadoop/pig/trunk/test/findbugsExcludeFile.xml (original)
+++ hadoop/pig/trunk/test/findbugsExcludeFile.xml Thu Oct 29 16:07:49 2009
@@ -22,6 +22,10 @@
     <Match>
         <Package name="org.apache.pig.data.parser.*" />
     </Match>
+    <!-- Code does not support multithreading at the moment -->
+    <Match>
+        <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+    </Match>
     <!-- Ingnore non-serializable comparators --> 
     <Match>
         <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
@@ -142,6 +146,16 @@
         <Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
     </Match>
     <Match>
+        <Bug pattern="BC_BAD_CAST_TO_CONCRETE_COLLECTION" />
+    </Match>
+    <!-- This Tuple classes are not used -->
+    <Match>
+        <Class name="org.apache.pig.data.AmendableTuple" />
+    </Match>
+    <Match>
+        <Class name="org.apache.pig.data.TimestampedTuple" />
+    </Match>
+    <Match>
         <Class 
name="org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.partitioners.CountingMap"
 />
         <Method name="put" />
         <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
@@ -184,4 +198,33 @@
         <Method name = "getOperator" />
         <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE" />
     </Match>
+    <Match>
+        <Class 
name="org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.CombinerOptimizer"
 />
+        <Method name = "visitMROp" />
+        <Bug pattern="REC_CATCH_EXCEPTION" />
+    </Match>
+    <Match>
+        <Class name="org.apache.pig.tools.streams.StreamGenerator" />
+        <Method name = "actionPerformed" />
+        <Bug pattern="REC_CATCH_EXCEPTION" />
+    </Match>
+    <Match>
+        <Class 
name="org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler" 
/>
+        <Or>
+        <Method name = "visitDistinct" />
+        <Method name = "visitFRJoin" />
+        </Or>
+        <Bug pattern="REC_CATCH_EXCEPTION" />
+    </Match>
+    <Match>
+        <Class name="org.apache.tools.bzip2r.CBZip2OutputStream" />
+        <Method name = "qSort3" />
+        <Bug pattern="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW" />
+    </Match>
+    <Match>
+        <Class name="org.apache.tools.bzip2r.CBZip2OutputStream" />
+        <Method name = "sendMTFValues" />
+        <Bug pattern="IM_BAD_CHECK_FOR_ODD" />
+    </Match>
+    
 </FindBugsFilter>


Reply via email to