Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Flume >> mail # dev >> Review Request: FLUME-1896. Thrift Rpc Client


+
Hari Shreedharan 2013-02-04, 07:43
+
Hari Shreedharan 2013-02-04, 08:37
+
Hari Shreedharan 2013-02-04, 09:02
+
Hari Shreedharan 2013-02-06, 07:15
+
Hari Shreedharan 2013-02-06, 07:42
+
Hari Shreedharan 2013-02-07, 02:01
+
Hari Shreedharan 2013-02-07, 03:31
+
Brock Noland 2013-02-07, 15:40
+
Hari Shreedharan 2013-02-07, 17:41
+
Brock Noland 2013-02-07, 19:51
+
Hari Shreedharan 2013-02-07, 17:43
+
Hari Shreedharan 2013-02-07, 21:31
+
Hari Shreedharan 2013-02-08, 09:24
+
Hari Shreedharan 2013-02-08, 22:40
+
Hari Shreedharan 2013-02-08, 23:05
+
Mike Percy 2013-02-09, 00:57
+
Hari Shreedharan 2013-02-09, 01:45
+
Hari Shreedharan 2013-02-09, 02:28
+
Brock Noland 2013-02-10, 21:11
Copy link to this message
-
Re: Review Request: FLUME-1896. Thrift Rpc Client.


> On Feb. 10, 2013, 9:11 p.m., Brock Noland wrote:
> >

Brock:

Thanks for the review. I had considered both the options you mentioned in the comments, the reason I didn't do either of those was that using a BlockingQueue and/or semaphore adds an additional lock/unlock cycle inside the data structure code. Since we already need to lock for creating the clients, this code makes one less lock/unlock cycle (during creates, and destroys - both places where the queue and the counts are modified).

As such, I prefer the thread synchronization being more explicit than having multiple lock-enabled data structures.
> On Feb. 10, 2013, 9:11 p.m., Brock Noland wrote:
> > flume-ng-sdk/src/main/java/org/apache/flume/api/ThriftRpcClient.java, line 337
> > <https://reviews.apache.org/r/9284/diff/10/?file=257203#file257203line337>
> >
> >     Would a small amount of synchronization and a BlockingQueue make this code a little simpler?

I don't see it becoming much simpler. I also prefer having the threading code being more explicit. A blocking queue does not really help, since we are lazily initializing the clients, so we need locking for that anyway.
- Hari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9284/#review16399
-----------------------------------------------------------
On Feb. 9, 2013, 2:28 a.m., Hari Shreedharan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9284/
> -----------------------------------------------------------
>
> (Updated Feb. 9, 2013, 2:28 a.m.)
>
>
> Review request for Flume.
>
>
> Description
> -------
>
> Added thrift rpc client. Detailed description posted on jira.
>
>
> This addresses bug FLUME-1896.
>     https://issues.apache.org/jira/browse/FLUME-1896
>
>
> Diffs
> -----
>
>   flume-ng-legacy-sources/flume-thrift-source/pom.xml b9667cd
>   flume-ng-legacy-sources/flume-thrift-source/src/main/java/com/cloudera/flume/handlers/thrift/EventStatus.java 327107a
>   flume-ng-legacy-sources/flume-thrift-source/src/main/java/com/cloudera/flume/handlers/thrift/Priority.java d2495d2
>   flume-ng-legacy-sources/flume-thrift-source/src/main/java/com/cloudera/flume/handlers/thrift/ThriftFlumeEvent.java 2bb6cfd
>   flume-ng-legacy-sources/flume-thrift-source/src/main/java/com/cloudera/flume/handlers/thrift/ThriftFlumeEventServer.java 0f2ad2d
>   flume-ng-legacy-sources/flume-thrift-source/src/main/thrift/aslv2 PRE-CREATION
>   flume-ng-sdk/pom.xml ab066d5
>   flume-ng-sdk/src/main/java/org/apache/flume/api/HostInfo.java 7388a45
>   flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientConfigurationConstants.java ab4c3de
>   flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java 3c93921
>   flume-ng-sdk/src/main/java/org/apache/flume/api/ThriftRpcClient.java PRE-CREATION
>   flume-ng-sdk/src/main/java/org/apache/flume/thrift/Status.java PRE-CREATION
>   flume-ng-sdk/src/main/java/org/apache/flume/thrift/ThriftFlumeEvent.java PRE-CREATION
>   flume-ng-sdk/src/main/java/org/apache/flume/thrift/ThriftSourceProtocol.java PRE-CREATION
>   flume-ng-sdk/src/main/thrift/aslv2 PRE-CREATION
>   flume-ng-sdk/src/main/thrift/flume.thrift PRE-CREATION
>   flume-ng-sdk/src/test/java/org/apache/flume/api/TestThriftRpcClient.java PRE-CREATION
>   flume-ng-sdk/src/test/java/org/apache/flume/api/ThriftTestingSource.java PRE-CREATION
>   flume-ng-sources/flume-scribe-source/pom.xml 588207d
>   flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java 401a7e4
>   flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java 6bfa84c
>   flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java ccde51b
>   flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ScribeSource.java 6190b11
+
Brock Noland 2013-02-11, 16:24
+
Hari Shreedharan 2013-02-11, 17:43
+
Brock Noland 2013-02-11, 18:34
+
Hari Shreedharan 2013-02-11, 19:04
+
Hari Shreedharan 2013-02-11, 19:09
+
Brock Noland 2013-02-11, 16:14
+
Brock Noland 2013-02-11, 16:15
+
Brock Noland 2013-02-11, 18:34