Skip to content

Commit

Permalink
KAFKA-2807: Move ThroughputThrottler back to tools jar to fix upgrade…
Browse files Browse the repository at this point in the history
… tests.

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

Reviewers: Gwen Shapira

Closes #499 from ewencp/kafka-2807-relocate-throughput-throttler
  • Loading branch information
ewencp authored and gwenshap committed Nov 11, 2015
1 parent a8ccdc6 commit c6b8de4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
45 changes: 23 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

tasks.create(name: "jarConnect", dependsOn: connectPkgs.collect { it + ":jar" }) {}
Expand Down Expand Up @@ -321,7 +321,7 @@ project(':core') {
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'
compression = Compression.GZIP
from project.file("../docs")
Expand All @@ -342,16 +342,16 @@ project(':core') {
from(project.siteDocsTar) { into("site-docs/") }
from(project(':tools').jar) { into("libs/") }
from(project(':tools').configurations.runtime) { into("libs/") }
from(project(':connect:api').jar) { into("libs/") }
from(project(':connect:api').configurations.runtime) { into("libs/") }
from(project(':connect:runtime').jar) { into("libs/") }
from(project(':connect:runtime').configurations.runtime) { into("libs/") }
from(project(':connect:json').jar) { into("libs/") }
from(project(':connect:json').configurations.runtime) { into("libs/") }
from(project(':connect:file').jar) { into("libs/") }
from(project(':connect:file').configurations.runtime) { into("libs/") }
from(project(':connect:tools').jar) { into("libs/") }
from(project(':connect:tools').configurations.runtime) { into("libs/") }
from(project(':connect-api').jar) { into("libs/") }
from(project(':connect-api').configurations.runtime) { into("libs/") }
from(project(':connect-runtime').jar) { into("libs/") }
from(project(':connect-runtime').configurations.runtime) { into("libs/") }
from(project(':connect-json').jar) { into("libs/") }
from(project(':connect-json').configurations.runtime) { into("libs/") }
from(project(':connect-file').jar) { into("libs/") }
from(project(':connect-file').configurations.runtime) { into("libs/") }
from(project(':connect-tools').jar) { into("libs/") }
from(project(':connect-tools').configurations.runtime) { into("libs/") }
}

jar {
Expand Down Expand Up @@ -638,7 +638,7 @@ project(':log4j-appender') {
test.dependsOn('checkstyleMain', 'checkstyleTest')
}

project(':connect:api') {
project(':connect-api') {
apply plugin: 'checkstyle'
archivesBaseName = "connect-api"

Expand Down Expand Up @@ -695,12 +695,12 @@ project(':connect:api') {
test.dependsOn('checkstyleMain', 'checkstyleTest')
}

project(':connect:json') {
project(':connect-json') {
apply plugin: 'checkstyle'
archivesBaseName = "connect-json"

dependencies {
compile project(':connect:api')
compile project(':connect-api')
compile "$slf4japi"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"

Expand Down Expand Up @@ -756,12 +756,12 @@ project(':connect:json') {
test.dependsOn('checkstyleMain', 'checkstyleTest')
}

project(':connect:runtime') {
project(':connect-runtime') {
apply plugin: 'checkstyle'
archivesBaseName = "connect-runtime"

dependencies {
compile project(':connect:api')
compile project(':connect-api')
compile project(':clients')
compile "$slf4japi"

Expand All @@ -776,7 +776,7 @@ project(':connect:runtime') {
testCompile "$powermock_easymock"
testCompile project(':clients').sourceSets.test.output
testRuntime "$slf4jlog4j"
testRuntime project(":connect:json")
testRuntime project(":connect-json")
}

task testJar(type: Jar) {
Expand Down Expand Up @@ -830,12 +830,12 @@ project(':connect:runtime') {
}
}

project(':connect:file') {
project(':connect-file') {
apply plugin: 'checkstyle'
archivesBaseName = "connect-file"

dependencies {
compile project(':connect:api')
compile project(':connect-api')
compile "$slf4japi"

testCompile "$junit"
Expand Down Expand Up @@ -890,12 +890,13 @@ project(':connect:file') {
test.dependsOn('checkstyleMain', 'checkstyleTest')
}

project(':connect:tools') {
project(':connect-tools') {
apply plugin: 'checkstyle'
archivesBaseName = "connect-tools"

dependencies {
compile project(':connect:api')
compile project(':connect-api')
compile project(':tools')
compile "$slf4japi"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import com.fasterxml.jackson.core.JsonProcessingException;
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.errors.ConnectException;
import org.apache.kafka.connect.source.SourceRecord;
import org.apache.kafka.connect.source.SourceTask;
import org.apache.kafka.tools.ThroughputThrottler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

apply from: file('scala.gradle')
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'
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import net.sourceforge.argparse4j.inf.Namespace;

import org.apache.kafka.clients.producer.*;
import org.apache.kafka.common.utils.ThroughputThrottler;

public class ProducerPerformance {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
**/

package org.apache.kafka.common.utils;
package org.apache.kafka.tools;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace;
import org.apache.kafka.common.utils.ThroughputThrottler;

/**
* Primarily intended for use with system testing, this producer prints metadata
Expand Down

0 comments on commit c6b8de4

Please sign in to comment.