KAFKA-2807: Move ThroughputThrottler back to tools jar to fix upgrade tests.

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Gwen Shapira

Closes #499 from ewencp/kafka-2807-relocate-throughput-throttler
This commit is contained in:
Ewen Cheslack-Postava 2015-11-11 15:55:12 -08:00 committed by Gwen Shapira
parent a8ccdc6154
commit c6b8de4e68
6 changed files with 27 additions and 28 deletions

View File

@ -230,7 +230,7 @@ for ( sv in ['2_10_5', '2_11_7'] ) {
} }
} }
def connectPkgs = ['connect:api', 'connect:runtime', 'connect:json', 'connect:file', 'connect:tools'] def connectPkgs = ['connect-api', 'connect-runtime', 'connect-json', 'connect-file', 'connect-tools']
def pkgs = ['clients', 'examples', 'log4j-appender', 'tools', 'streams'] + connectPkgs def pkgs = ['clients', 'examples', 'log4j-appender', 'tools', 'streams'] + connectPkgs
tasks.create(name: "jarConnect", dependsOn: connectPkgs.collect { it + ":jar" }) {} tasks.create(name: "jarConnect", dependsOn: connectPkgs.collect { it + ":jar" }) {}
@ -321,7 +321,7 @@ project(':core') {
standardOutput = new File('docs/kafka_config.html').newOutputStream() standardOutput = new File('docs/kafka_config.html').newOutputStream()
} }
task siteDocsTar(dependsOn: ['genProducerConfigDocs', 'genConsumerConfigDocs', 'genKafkaConfigDocs', ':connect:runtime:genConnectConfigDocs'], type: Tar) { task siteDocsTar(dependsOn: ['genProducerConfigDocs', 'genConsumerConfigDocs', 'genKafkaConfigDocs', ':connect-runtime:genConnectConfigDocs'], type: Tar) {
classifier = 'site-docs' classifier = 'site-docs'
compression = Compression.GZIP compression = Compression.GZIP
from project.file("../docs") from project.file("../docs")
@ -342,16 +342,16 @@ project(':core') {
from(project.siteDocsTar) { into("site-docs/") } from(project.siteDocsTar) { into("site-docs/") }
from(project(':tools').jar) { into("libs/") } from(project(':tools').jar) { into("libs/") }
from(project(':tools').configurations.runtime) { into("libs/") } from(project(':tools').configurations.runtime) { into("libs/") }
from(project(':connect:api').jar) { into("libs/") } from(project(':connect-api').jar) { into("libs/") }
from(project(':connect:api').configurations.runtime) { into("libs/") } from(project(':connect-api').configurations.runtime) { into("libs/") }
from(project(':connect:runtime').jar) { into("libs/") } from(project(':connect-runtime').jar) { into("libs/") }
from(project(':connect:runtime').configurations.runtime) { into("libs/") } from(project(':connect-runtime').configurations.runtime) { into("libs/") }
from(project(':connect:json').jar) { into("libs/") } from(project(':connect-json').jar) { into("libs/") }
from(project(':connect:json').configurations.runtime) { into("libs/") } from(project(':connect-json').configurations.runtime) { into("libs/") }
from(project(':connect:file').jar) { into("libs/") } from(project(':connect-file').jar) { into("libs/") }
from(project(':connect:file').configurations.runtime) { into("libs/") } from(project(':connect-file').configurations.runtime) { into("libs/") }
from(project(':connect:tools').jar) { into("libs/") } from(project(':connect-tools').jar) { into("libs/") }
from(project(':connect:tools').configurations.runtime) { into("libs/") } from(project(':connect-tools').configurations.runtime) { into("libs/") }
} }
jar { jar {
@ -638,7 +638,7 @@ project(':log4j-appender') {
test.dependsOn('checkstyleMain', 'checkstyleTest') test.dependsOn('checkstyleMain', 'checkstyleTest')
} }
project(':connect:api') { project(':connect-api') {
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
archivesBaseName = "connect-api" archivesBaseName = "connect-api"
@ -695,12 +695,12 @@ project(':connect:api') {
test.dependsOn('checkstyleMain', 'checkstyleTest') test.dependsOn('checkstyleMain', 'checkstyleTest')
} }
project(':connect:json') { project(':connect-json') {
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
archivesBaseName = "connect-json" archivesBaseName = "connect-json"
dependencies { dependencies {
compile project(':connect:api') compile project(':connect-api')
compile "$slf4japi" compile "$slf4japi"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
@ -756,12 +756,12 @@ project(':connect:json') {
test.dependsOn('checkstyleMain', 'checkstyleTest') test.dependsOn('checkstyleMain', 'checkstyleTest')
} }
project(':connect:runtime') { project(':connect-runtime') {
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
archivesBaseName = "connect-runtime" archivesBaseName = "connect-runtime"
dependencies { dependencies {
compile project(':connect:api') compile project(':connect-api')
compile project(':clients') compile project(':clients')
compile "$slf4japi" compile "$slf4japi"
@ -776,7 +776,7 @@ project(':connect:runtime') {
testCompile "$powermock_easymock" testCompile "$powermock_easymock"
testCompile project(':clients').sourceSets.test.output testCompile project(':clients').sourceSets.test.output
testRuntime "$slf4jlog4j" testRuntime "$slf4jlog4j"
testRuntime project(":connect:json") testRuntime project(":connect-json")
} }
task testJar(type: Jar) { task testJar(type: Jar) {
@ -830,12 +830,12 @@ project(':connect:runtime') {
} }
} }
project(':connect:file') { project(':connect-file') {
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
archivesBaseName = "connect-file" archivesBaseName = "connect-file"
dependencies { dependencies {
compile project(':connect:api') compile project(':connect-api')
compile "$slf4japi" compile "$slf4japi"
testCompile "$junit" testCompile "$junit"
@ -890,12 +890,13 @@ project(':connect:file') {
test.dependsOn('checkstyleMain', 'checkstyleTest') test.dependsOn('checkstyleMain', 'checkstyleTest')
} }
project(':connect:tools') { project(':connect-tools') {
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
archivesBaseName = "connect-tools" archivesBaseName = "connect-tools"
dependencies { dependencies {
compile project(':connect:api') compile project(':connect-api')
compile project(':tools')
compile "$slf4japi" compile "$slf4japi"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"

View File

@ -19,11 +19,11 @@ package org.apache.kafka.connect.tools;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.kafka.common.utils.ThroughputThrottler;
import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.errors.ConnectException; import org.apache.kafka.connect.errors.ConnectException;
import org.apache.kafka.connect.source.SourceRecord; import org.apache.kafka.connect.source.SourceRecord;
import org.apache.kafka.connect.source.SourceTask; import org.apache.kafka.connect.source.SourceTask;
import org.apache.kafka.tools.ThroughputThrottler;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -15,4 +15,4 @@
apply from: file('scala.gradle') apply from: file('scala.gradle')
include 'core', 'examples', 'clients', 'tools', 'streams', 'log4j-appender', include 'core', 'examples', 'clients', 'tools', 'streams', 'log4j-appender',
'connect:api', 'connect:runtime', 'connect:json', 'connect:file', 'connect:tools' 'connect-api', 'connect-runtime', 'connect-json', 'connect-file', 'connect-tools'

View File

@ -24,7 +24,6 @@ import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace; import net.sourceforge.argparse4j.inf.Namespace;
import org.apache.kafka.clients.producer.*; import org.apache.kafka.clients.producer.*;
import org.apache.kafka.common.utils.ThroughputThrottler;
public class ProducerPerformance { public class ProducerPerformance {

View File

@ -13,9 +13,9 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ **/
package org.apache.kafka.common.utils; package org.apache.kafka.tools;
/** /**

View File

@ -41,7 +41,6 @@ import net.sourceforge.argparse4j.ArgumentParsers;
import net.sourceforge.argparse4j.inf.ArgumentParser; import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException; import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace; import net.sourceforge.argparse4j.inf.Namespace;
import org.apache.kafka.common.utils.ThroughputThrottler;
/** /**
* Primarily intended for use with system testing, this producer prints metadata * Primarily intended for use with system testing, this producer prints metadata