> On 2012-02-19 16:30:08, Ralph Goers wrote:
> > I have a suspicion that if you actually try to use this from an application 
> > via a configuration file you won't be able to. I don't see any setter 
> > methods for the host and port.

The reason I didn't put setters for host and port are that the AvroClient 
object can be created only if know the hostname and port. So the constructor 
needs these arguments. If the hostname and port change because the config 
changes, the application can simply create a new object of the 
Log4jAppender(resetting the port and hostname using setters will have the same 
effect - since internally we would be doing the same thing, by replacing the 
protocolClient). For example this would be how the setter would look:

public synchronized void setHostnameAndPort(String hostname, int port){
    this.hostname = hostname;
    this.port = port
    protocolClient = null;     //This basically to make sure a new AvroClient 
is created, considering the new setting.
}


 


- Hari


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3924/#review5211
-----------------------------------------------------------


On 2012-02-16 18:50:02, Hari Shreedharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/3924/
> -----------------------------------------------------------
> 
> (Updated 2012-02-16 18:50:02)
> 
> 
> Review request for Flume.
> 
> 
> Summary
> -------
> 
> A class which takes in a LoggingEvent and sends it to a predefined AvroSource 
> at a given host and port.
> 
> 
> This addresses bug FLUME-886.
>     https://issues.apache.org/jira/browse/FLUME-886
> 
> 
> Diffs
> -----
> 
>   branches/flume-728/flume-ng-log4jappender/pom.xml PRE-CREATION 
>   
> branches/flume-728/flume-ng-log4jappender/src/main/java/org/apache/flume/log4jappender/Log4jAppender.java
>  PRE-CREATION 
>   
> branches/flume-728/flume-ng-log4jappender/src/main/java/org/apache/flume/log4jappender/Log4jAvroHeaders.java
>  PRE-CREATION 
>   
> branches/flume-728/flume-ng-log4jappender/src/test/java/org/apache/flume/log4jappender/TestLog4jAppender.java
>  PRE-CREATION 
>   
> branches/flume-728/flume-ng-log4jappender/src/test/resources/log4j.properties 
> PRE-CREATION 
>   branches/flume-728/pom.xml 1244858 
> 
> Diff: https://reviews.apache.org/r/3924/diff
> 
> 
> Testing
> -------
> 
> Added unit tests.
> 
> 
> Thanks,
> 
> Hari
> 
>

Reply via email to