Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1987 Fix existing findbugs warnings
  3. OOZIE-2943

Fix Findbugs warnings in oozie-sharelib-pig

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0b1
    • Component/s: build
    • Labels:
      None

      Description

      Currently Findbugs complains about the following warnings in the oozie-sharelib-pig module:

      [INFO] org.apache.oozie.action.hadoop.OoziePigStats.toJSONFromMultiStoreCounters(Map) makes inefficient use of keySet iterator instead of entrySet iterator [org.apache.oozie.action.hadoop.OoziePigStats] At OoziePigStats.java:[line 130]
      [INFO] Dead store to klass in org.apache.oozie.action.hadoop.PigMain.runPigJob(String[], String, boolean, boolean) [org.apache.oozie.action.hadoop.PigMain] At PigMain.java:[line 335]
      [INFO] Found reliance on default encoding in org.apache.oozie.action.hadoop.PigMain.handleError(String): new java.io.FileReader(String) [org.apache.oozie.action.hadoop.PigMain] At PigMain.java:[line 307]
      [INFO] Found reliance on default encoding in org.apache.oozie.action.hadoop.PigMain.writeExternalData(String, File): new java.io.FileWriter(File) [org.apache.oozie.action.hadoop.PigMain] At PigMain.java:[line 408]
      [INFO] org.apache.oozie.action.hadoop.PigMain.run(String[]) may fail to clean up java.io.OutputStream on checked exception [org.apache.oozie.action.hadoop.PigMain, org.apache.oozie.action.hadoop.PigMain] Obligation to clean up resource created at PigMain.java:[line 130] is not dischargedPath continues at PigMain.java:[line 131]
      [INFO] org.apache.oozie.action.hadoop.PigMain.handleError(String) may fail to close stream on exception [org.apache.oozie.action.hadoop.PigMain] At PigMain.java:[line 307]
      [INFO] org.apache.oozie.action.hadoop.PigMain.run(String[]) may fail to close stream on exception [org.apache.oozie.action.hadoop.PigMain] At PigMain.java:[line 130]
      [INFO] Found reliance on default encoding in org.apache.oozie.action.hadoop.PigMainWithOldAPI.getHadoopJobIds(String): new java.io.FileReader(String) [org.apache.oozie.action.hadoop.PigMainWithOldAPI] At PigMainWithOldAPI.java:[line 265]
      [INFO] Found reliance on default encoding in org.apache.oozie.action.hadoop.PigMainWithOldAPI.run(String[]): new java.io.FileReader(String) [org.apache.oozie.action.hadoop.PigMainWithOldAPI, org.apache.oozie.action.hadoop.PigMainWithOldAPI] At PigMainWithOldAPI.java:[line 126]Another occurrence at PigMainWithOldAPI.java:[line 219]
      [INFO] org.apache.oozie.action.hadoop.PigMainWithOldAPI.run(String[]) may fail to clean up java.io.OutputStream on checked exception [org.apache.oozie.action.hadoop.PigMainWithOldAPI, org.apache.oozie.action.hadoop.PigMainWithOldAPI] Obligation to clean up resource created at PigMainWithOldAPI.java:[line 101] is not dischargedPath continues at PigMainWithOldAPI.java:[line 102]
      [INFO] org.apache.oozie.action.hadoop.PigMainWithOldAPI.getHadoopJobIds(String) may fail to close stream on exception [org.apache.oozie.action.hadoop.PigMainWithOldAPI] At PigMainWithOldAPI.java:[line 265]
      [INFO] org.apache.oozie.action.hadoop.PigMainWithOldAPI.run(String[]) may fail to close stream on exception [org.apache.oozie.action.hadoop.PigMainWithOldAPI, org.apache.oozie.action.hadoop.PigMainWithOldAPI] At PigMainWithOldAPI.java:[line 101]Another occurrence at PigMainWithOldAPI.java:[line 242]
      [INFO] org.apache.oozie.action.hadoop.PigMainWithOldAPI.run(String[]) may fail to close stream on exception [org.apache.oozie.action.hadoop.PigMainWithOldAPI, org.apache.oozie.action.hadoop.PigMainWithOldAPI] At PigMainWithOldAPI.java:[line 126]Another occurrence at PigMainWithOldAPI.java:[line 219]
      

      They should be fixed to get the code more reliable.

        Attachments

        1. OOZIE-2943-1.patch
          12 kB
          Jan Hentschel
        2. OOZIE-2943-2.patch
          13 kB
          Jan Hentschel

          Issue Links

            Activity

              People

              • Assignee:
                janh Jan Hentschel
                Reporter:
                janh Jan Hentschel
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: