Review Board 1.7.22


Flume-1026: Document thread safety expectations of interfaces

Review Request #4400 - Created March 19, 2012 and submitted

Juhani Connolly
trunk
Flume-1026
Reviewers
Flume
flume-git
I went over the basic interfaces and added some javadoc for developers of new components.

I am pretty concerned about the fact that pretty much  everything is not thread safe because off the lack of guarantees provided by some of the interfaces(Configurable in particular).

A lot of existing components assume thread safety(which is somewhat given by isolation of process() type methods to a single runner thread). Should we be fixing these components, or making some more guarantees about when and how configuration calls should  be called(e.g. only callable on a stopped component?)
Doc only patch
flume-ng-core/src/main/java/org/apache/flume/Channel.java
Revision 9d1c14c New Change
[20] 38 lines
[+20]
39
 * </p>
39
 * </p>
40
 * <p>
40
 * <p>
41
 * Channels are associated with unique {@linkplain NamedComponent names} that
41
 * Channels are associated with unique {@linkplain NamedComponent names} that
42
 * can be used for separating configuration and working namespaces.
42
 * can be used for separating configuration and working namespaces.
43
 * </p>
43
 * </p>

    
   
44
 * <p>

    
   
45
 * Channels must be thread safe, protecting any internal invariants as no

    
   
46
 * guarantees are given as to when and by how many sources/sinks they may

    
   
47
 * be simultaneously accessed by.

    
   
48
 * </p>
44
 *
49
 *
45
 * @see org.apache.flume.Source
50
 * @see org.apache.flume.Source
46
 * @see org.apache.flume.Sink
51
 * @see org.apache.flume.Sink
47
 * @see org.apache.flume.Transaction
52
 * @see org.apache.flume.Transaction
48
 */
53
 */
[+20] [20] 32 lines
flume-ng-core/src/main/java/org/apache/flume/PollableSource.java
Revision 8806040 New Change
 
flume-ng-core/src/main/java/org/apache/flume/Sink.java
Revision 4a706cf New Change
 
flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java
Revision ea6000b New Change
 
flume-ng-core/src/main/java/org/apache/flume/Source.java
Revision f4e9481 New Change
 
flume-ng-core/src/main/java/org/apache/flume/Transaction.java
Revision 5b1fee5 New Change
 
flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java
Revision 0fa4839 New Change
 
  1. flume-ng-core/src/main/java/org/apache/flume/Channel.java: Loading...
  2. flume-ng-core/src/main/java/org/apache/flume/PollableSource.java: Loading...
  3. flume-ng-core/src/main/java/org/apache/flume/Sink.java: Loading...
  4. flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java: Loading...
  5. flume-ng-core/src/main/java/org/apache/flume/Source.java: Loading...
  6. flume-ng-core/src/main/java/org/apache/flume/Transaction.java: Loading...
  7. flume-ng-core/src/main/java/org/apache/flume/conf/Configurable.java: Loading...