Review Board 1.7.22


PIG-3050 Fix FindBugs multithreading warnings

Review Request #8649 - Created Dec. 17, 2012 and submitted

Cheolsoo Park
PIG-3050
Reviewers
pig
sms
pig-git
Please see https://issues.apache.org/jira/browse/PIG-3050
Verified that both unit test and e2e test pass.
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigHadoopLogger.java
Revision 9b8223d New Change
[20] 48 lines
[+20] [+] public static synchronized PigHadoopLogger getInstance() {
49

    
   
49

   
50
    @SuppressWarnings("unchecked")
50
    @SuppressWarnings("unchecked")
51
    public void warn(Object o, String msg, Enum warningEnum) {
51
    public void warn(Object o, String msg, Enum warningEnum) {
52
        String displayMessage = o.getClass().getName() + ": " + msg;
52
        String displayMessage = o.getClass().getName() + ": " + msg;
53
        
53
        
54
        if (aggregate) {
54
        if (getAggregate()) {
55
            if (reporter != null) {
55
            if (reporter != null) {
56
                reporter.getCounter(warningEnum).increment(1);
56
                reporter.getCounter(warningEnum).increment(1);
57
            } else {
57
            } else {
58
                //TODO:
58
                //TODO:
59
                //in local mode of execution if the PigHadoopLogger is used initially,
59
                //in local mode of execution if the PigHadoopLogger is used initially,
[+20] [20] 12 lines
[+20] public void warn(Object o, String msg, Enum warningEnum) {
72

    
   
72

   
73
    public synchronized void setReporter(PigStatusReporter rep) {
73
    public synchronized void setReporter(PigStatusReporter rep) {
74
        this.reporter = rep;
74
        this.reporter = rep;
75
    }
75
    }
76
    
76
    
77
    public boolean getAggregate() {
77
    public synchronized boolean getAggregate() {
78
        return aggregate;
78
        return aggregate;
79
    }
79
    }
80
    
80
    
81
    public synchronized void setAggregate(boolean aggregate) {
81
    public synchronized void setAggregate(boolean aggregate) {
82
        this.aggregate = aggregate;
82
        this.aggregate = aggregate;
83
    }
83
    }
84

    
   
84

   
85
}
85
}
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java
Revision ee4d52a New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
Revision 5195dee New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserComparisonFunc.java
Revision fcaf9b0 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java
Revision df1af28 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFRJoin.java
Revision 58a8892 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POForEach.java
Revision 0a69ef2 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POJoinPackage.java
Revision d1283b8 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPackage.java
Revision 6bbe5e0 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPackageLite.java
Revision 8ab351d New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POStream.java
Revision e3379c8 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POUnion.java
Revision b29c481 New Change
 
src/org/apache/pig/data/DefaultAbstractBag.java
Revision 816143f New Change
 
src/org/apache/pig/data/NonSpillableDataBag.java
Revision 6b59c8f New Change
 
src/org/apache/pig/data/SchemaTupleBackend.java
Revision 6f0ad3b New Change
 
src/org/apache/pig/impl/util/SpillableMemoryManager.java
Revision 403d774 New Change
 
  1. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigHadoopLogger.java: Loading...
  2. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java: Loading...
  3. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java: Loading...
  4. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserComparisonFunc.java: Loading...
  5. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java: Loading...
  6. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFRJoin.java: Loading...
  7. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POForEach.java: Loading...
  8. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POJoinPackage.java: Loading...
  9. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPackage.java: Loading...
  10. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPackageLite.java: Loading...
  11. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POStream.java: Loading...
  12. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POUnion.java: Loading...
  13. src/org/apache/pig/data/DefaultAbstractBag.java: Loading...
  14. src/org/apache/pig/data/NonSpillableDataBag.java: Loading...
  15. src/org/apache/pig/data/SchemaTupleBackend.java: Loading...
  16. src/org/apache/pig/impl/util/SpillableMemoryManager.java: Loading...