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

Ship it!


LGTM.

- Jiangjie Qin


On July 9, 2015, 9:05 a.m., Ismael Juma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36345/
> -----------------------------------------------------------
> 
> (Updated July 9, 2015, 9:05 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2322
>     https://issues.apache.org/jira/browse/KAFKA-2322
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> kafka-2322; Use multi-catch to reduce redundancy
> 
> 
> kafka-2322; Use try with resources instead of try/finally
> 
> It's more concise and handles the exception from `close`
> better.
> 
> 
> Diffs
> -----
> 
>   clients/src/main/java/org/apache/kafka/clients/ClientUtils.java 
> 0d68bf1e1e90fe9d5d4397ddf817b9a9af8d9f7a 
>   clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java 
> 9ebda5eae5936a6b0897e74cfb231803c9d6a2da 
>   clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java 
> 15d00d4e484bb5d51a9ae6857ed6e024a2cc1820 
>   clients/src/main/java/org/apache/kafka/clients/Metadata.java 
> 0387f2602c93a62cd333f1b3c569ca6b66b5b779 
>   clients/src/main/java/org/apache/kafka/clients/NetworkClient.java 
> 48fe7961e2215372d8033ece4af739ea06c6457b 
>   clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java 
> daff34db5bf2144e9dc274b23dc56b88f4efafdc 
>   
> clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecords.java 
> eb75d2e797e3aa3992e4cf74b12f51c8f1545e02 
>   clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java 
> 7aa076084c894bb8f47b9df2c086475b06f47060 
>   clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java 
> 46e26a665a22625d50888efa7b53472279f36e79 
>   
> clients/src/main/java/org/apache/kafka/clients/consumer/internals/Coordinator.java
>  c1c8172cd45f6715262f9a6f497a7b1797a834a3 
>   
> clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
>  695eaf63db9a5fa20dc2ca68957901462a96cd96 
>   
> clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestFuture.java
>  13fc9af7392b4ade958daf3b0c9a165ddda351a6 
>   
> clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java
>  683745304c671952ff566f23b5dd4cf3ab75377a 
>   clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java 
> 03b8dd23df63a8d8a117f02eabcce4a2d48c44f7 
>   clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java 
> 36e7ffa2a0a0b9bfaa41c22feb1be8ae476ab321 
>   clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java 
> aa264202f2724907924985a5ecbe74afc4c6c04b 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java
>  4cb1e50d6c4ed55241aeaef1d3af09def5274103 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java
>  a152bd7697dca55609a9ec4cfe0a82c10595fbc3 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
>  06182db1c3a5da85648199b4c0c98b80ea7c6c0c 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java 
> 0baf16e55046a2f49f6431e01d52c323c95eddf0 
>   
> clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java 
> 13f4d5958052afcc8ad66eacbcae50b6fd149398 
>   clients/src/main/java/org/apache/kafka/common/Cluster.java 
> 60594a7dce90130911a626ea80cf80d815aeb46e 
>   clients/src/main/java/org/apache/kafka/common/MetricName.java 
> 04b4a09badd5157a426812b78d491248a4d38fba 
>   clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java 
> bae528d31516679bed88ee61b408f209f185a8cc 
>   clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java 
> 4170bcc7def5b50d8aa20e8e84089c35b705b527 
>   clients/src/main/java/org/apache/kafka/common/metrics/JmxReporter.java 
> 6b9590c418aedd2727544c5dd23c017b4b72467a 
>   clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java 
> 5f6caf957e3bd3789e575236b00b3996cd7731c2 
>   clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java 
> ca823fd4639523018311b814fde69b6177e73b97 
>   
> clients/src/main/java/org/apache/kafka/common/metrics/stats/Percentiles.java 
> 78c93e88fa0b886b8a618e80dfd86ff53f753507 
>   
> clients/src/main/java/org/apache/kafka/common/metrics/stats/SampledStat.java 
> b341b7daaa10204906d78b812fb05fd27bc69373 
>   clients/src/main/java/org/apache/kafka/common/network/Selector.java 
> aaf60c98c2c0f4513a8d65ee0db67953a529d598 
>   clients/src/main/java/org/apache/kafka/common/protocol/Errors.java 
> 4c0ecc3badd99727b5bd9d430364e61c184e0923 
>   
> clients/src/main/java/org/apache/kafka/common/protocol/SecurityProtocol.java 
> dab1a94dd29563688b6ecf4eeb0e180b06049d3f 
>   clients/src/main/java/org/apache/kafka/common/protocol/types/Schema.java 
> 3a14ac0fb350a9d60b5cba82d55d4656cb5be8d7 
>   clients/src/main/java/org/apache/kafka/common/requests/FetchRequest.java 
> df073a0e76cc5cc731861b9604d0e19a928970e0 
>   clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java 
> eb8951fba48c335095cc43fc3672de1c733e07ff 
>   
> clients/src/main/java/org/apache/kafka/common/requests/JoinGroupRequest.java 
> 1ffe0760b40c4c669ffceedd231a2129e0eb9b24 
>   
> clients/src/main/java/org/apache/kafka/common/requests/JoinGroupResponse.java 
> 7bf544ef170682a1e2d9b35519edcf36a4567945 
>   
> clients/src/main/java/org/apache/kafka/common/requests/ListOffsetRequest.java 
> 6da4a0e14b0992c6f9355481627033fa5b7bfa9d 
>   
> clients/src/main/java/org/apache/kafka/common/requests/ListOffsetResponse.java
>  f70608600fc4e74d03285c7b4d1fdd00ada44199 
>   clients/src/main/java/org/apache/kafka/common/requests/MetadataRequest.java 
> f70e8dac70c1a4184ea1fde978bf6d85b0e3c1a6 
>   
> clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java 
> c8f2d087dfc851fe2e040875ef31c7347fbdf132 
>   
> clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitRequest.java
>  d6e63861d02be4fc7a848704e944b4b5f8d9a757 
>   
> clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitResponse.java
>  a1633330dc0c982843742547f17977b6ef6a5408 
>   
> clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
>  6ee75973d64848b13f27b71f419eccf8b8be89f1 
>   
> clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java
>  3dc8521296e3732ffb743a2ace19421d444027b7 
>   clients/src/main/java/org/apache/kafka/common/requests/ProduceRequest.java 
> 715504b32950666e9aa5a260fa99d5f897b2007a 
>   clients/src/main/java/org/apache/kafka/common/requests/ProduceResponse.java 
> 37ec0b79beafcf5735c386b066eb319fb697eff5 
>   clients/src/main/java/org/apache/kafka/common/utils/CollectionUtils.java 
> ba3863734391be4a71db84347902864483d82a46 
>   clients/src/main/java/org/apache/kafka/common/utils/CopyOnWriteMap.java 
> 9c0e81ad806696feb1b6f2478b7bfa98b02e33b7 
>   clients/src/main/java/org/apache/kafka/common/utils/Utils.java 
> af9993cf9b3991f1e61e1201c94e19bc1bf76a68 
>   clients/src/test/java/org/apache/kafka/clients/MockClient.java 
> d9c97e966c0e2fb605b67285f4275abb89f8813e 
>   
> clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
>  738f3ed0757cf3411e9043f91fa9918b957c9cd8 
>   
> clients/src/test/java/org/apache/kafka/clients/consumer/MockConsumerTest.java 
> 26b6b409843b3c37f70beb464d3e83fedae645a8 
>   
> clients/src/test/java/org/apache/kafka/clients/consumer/internals/CoordinatorTest.java
>  d085fe5c9e2a0567893508a1c71f014fae6d7510 
>   
> clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java
>  405efdc7a59438731cbc3630876bda0042a3adb3 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java
>  f3f8334f848be4cc043d5a573975609a3681fe7e 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/MockProducerTest.java 
> 7a46c561b70cd781025c093b1fa6f730ecb9c954 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/ProducerRecordTest.java
>  7bb181e46c4747ddbd38e61b3d39073d747a081a 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/internals/BufferPoolTest.java
>  2c693824fa53db1e38766b8c66a0ef42ef9d0f3a 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
>  5b2e4ffaeab7127648db608c179703b27b577414 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/internals/SenderTest.java
>  8b1805d3d2bcb9fe2bacb37d870c3236aa9532c4 
>   clients/src/test/java/org/apache/kafka/common/config/ConfigDefTest.java 
> 44c2ef0a859de4d0bf40db2da7bf05d3607fa216 
>   clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java 
> 544e120594de78c43581a980b1e4087b4fb98ccb 
>   clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java 
> 158f9829ff64a969008f699e40c51e918287859e 
>   clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsTest.java 
> 8ec610ae4693d7438a3423852c93d45dc9423f31 
>   clients/src/test/java/org/apache/kafka/common/record/RecordTest.java 
> 957fc8fa3999c7dc09e6d78c35144adb4d74dea1 
>   
> clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java
>  8b2aca85fa738180e5420985fddc39a4bf9681ea 
>   
> clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java
>  383bf48989d1c4ba16670990f7294b5453e63658 
>   
> clients/src/test/java/org/apache/kafka/common/utils/AbstractIteratorTest.java 
> c788e66035b2460b8bbe7f38c7898ac863be51af 
>   clients/src/test/java/org/apache/kafka/test/Microbenchmarks.java 
> 8cd19b2edfa75e8b2f83d4c0f9e502b036ffb75c 
>   clients/src/test/java/org/apache/kafka/test/MockSelector.java 
> 51eb9d142f566c94a87add68b8c4f78b56d6ec3e 
>   clients/src/test/java/org/apache/kafka/test/TestUtils.java 
> ccf3a5f5f72db12f904d64f1ffebacad19e92e35 
>   contrib/hadoop-consumer/src/main/java/kafka/etl/KafkaETLContext.java 
> c9b90189884bd07a73a8c63eeb28d87b5ce660a9 
>   contrib/hadoop-consumer/src/main/java/kafka/etl/KafkaETLRecordReader.java 
> f040fbe2114b21a348849b1e7de9fdca336c640d 
>   contrib/hadoop-consumer/src/main/java/kafka/etl/KafkaETLUtils.java 
> 02d79a1884c48a66f9e315aff5e4c9eaa585b11c 
>   contrib/hadoop-consumer/src/main/java/kafka/etl/Props.java 
> 71eb80f313fa24240af55fa52aa44a1ac9dbd418 
>   contrib/hadoop-consumer/src/main/java/kafka/etl/impl/DataGenerator.java 
> d27a511fcdd73f2756600710136f8435d1d0e0df 
>   
> contrib/hadoop-producer/src/main/java/kafka/bridge/hadoop/KafkaOutputFormat.java
>  417b4b39246c956a08d18d3aa43653fb04b23486 
>   
> contrib/hadoop-producer/src/main/java/kafka/bridge/hadoop/KafkaRecordWriter.java
>  72c088dc9d1b4d86a701492b8caa854abe3fb413 
>   core/src/main/scala/kafka/tools/KafkaMigrationTool.java 
> f19df0cf5edd33e56dc501562f57692348135f9b 
>   examples/src/main/java/kafka/examples/Consumer.java 
> 8af64d886d9ff8bf485e806ac6733f60e4f18269 
>   examples/src/main/java/kafka/examples/Producer.java 
> ccc9925caecd98c8be25ca1b09f5c8d5c16aa3c0 
>   examples/src/main/java/kafka/examples/SimpleConsumerDemo.java 
> c43b46144e6d1c02addfb6b699b5305140c5b1cc 
>   
> log4j-appender/src/main/java/org/apache/kafka/log4jappender/KafkaLog4jAppender.java
>  628ff53ff70b8d838efd2c4dbc85bfd39fff073e 
>   
> log4j-appender/src/test/java/org/apache/kafka/log4jappender/MockKafkaLog4jAppender.java
>  c35f26adb33f7e675a66c69687bf5f6bbb2d92a8 
> 
> Diff: https://reviews.apache.org/r/36345/diff/
> 
> 
> Testing
> -------
> 
> Tests passed.
> 
> 
> Thanks,
> 
> Ismael Juma
> 
>

Reply via email to