kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akihito Nakano (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-6063) StreamsException is thrown after the changing `partitions`
Date Sun, 15 Oct 2017 08:58:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-6063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Akihito Nakano updated KAFKA-6063:
----------------------------------
    Description: 
Hi.
"org.apache.kafka.streams.errors.StreamsException" is thrown in following case.

h3. Create topic

{code:java}
$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions
6 --topic word-count-input
{code}

h3. Create Kafka Streams Application

{code:java}
public class WordCountApp {
    public static void main(String[] args) {
        Properties config = new Properties();
        config.put(StreamsConfig.APPLICATION_ID_CONFIG, "wordcount-application");
...
...
{code}



h3.  Ensure that it works fine

{code:java}
$ java -jar wordcount.jar

KafkaStreams processID: b4a559cb-7075-4ece-a718-5043a432900b
        StreamsThread appId: wordcount-application
...
...
{code}



h3.  Change "partitions"

{code:java}
$ bin/kafka-topics.sh --alter --zookeeper localhost:2181 --partitions 8 --topic word-count-input
Adding partitions succeeded!
{code}


h3.  When I start Application, StreamsException is thrown

{code:java}
$ java -jar wordcount.jar

KafkaStreams processID: 8a9cbf03-b841-4cb2-9d44-6456b4520522
        StreamsThread appId: wordcount-applicationn
...
...

Exception in thread "wordcount-application-8a9cbf03-b841-4cb2-9d44-6456b4520522-StreamThread-1"
org.apache.kafka.streams.errors.StreamsException: Could not create internal topics.
{code}


If I change the application id, Application works again.

Thank you.

  was:
"org.apache.kafka.streams.errors.StreamsException" is thrown in following case.

h3. Create topic

```
$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions
6 --topic word-count-input
```

h3. Create Kafka Streams Application

```
public class WordCountApp {
    public static void main(String[] args) {
        Properties config = new Properties();
        config.put(StreamsConfig.APPLICATION_ID_CONFIG, "wordcount-application");
...
...
```

h3.  Ensure that it works fine

```
$ java -jar wordcount.jar

KafkaStreams processID: b4a559cb-7075-4ece-a718-5043a432900b
        StreamsThread appId: wordcount-application
...
...
```

h3.  Change "partitions"

```
$ bin/kafka-topics.sh --alter --zookeeper localhost:2181 --partitions 8 --topic word-count-input
Adding partitions succeeded!
```

h3.  When I start Application, StreamsException is thrown

```
$ java -jar wordcount.jar

KafkaStreams processID: 8a9cbf03-b841-4cb2-9d44-6456b4520522
        StreamsThread appId: wordcount-applicationn
...
...

Exception in thread "wordcount-application-8a9cbf03-b841-4cb2-9d44-6456b4520522-StreamThread-1"
org.apache.kafka.streams.errors.StreamsException: Could not create internal topics.
```

If I change the application id, Application works again.


> StreamsException is thrown after the changing `partitions`
> ----------------------------------------------------------
>
>                 Key: KAFKA-6063
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6063
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.11.0.0
>         Environment: macOS 10.12
> kafka 0.11.0.1
>            Reporter: Akihito Nakano
>
> Hi.
> "org.apache.kafka.streams.errors.StreamsException" is thrown in following case.
> h3. Create topic
> {code:java}
> $ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions
6 --topic word-count-input
> {code}
> h3. Create Kafka Streams Application
> {code:java}
> public class WordCountApp {
>     public static void main(String[] args) {
>         Properties config = new Properties();
>         config.put(StreamsConfig.APPLICATION_ID_CONFIG, "wordcount-application");
> ...
> ...
> {code}
> h3.  Ensure that it works fine
> {code:java}
> $ java -jar wordcount.jar
> KafkaStreams processID: b4a559cb-7075-4ece-a718-5043a432900b
>         StreamsThread appId: wordcount-application
> ...
> ...
> {code}
> h3.  Change "partitions"
> {code:java}
> $ bin/kafka-topics.sh --alter --zookeeper localhost:2181 --partitions 8 --topic word-count-input
> Adding partitions succeeded!
> {code}
> h3.  When I start Application, StreamsException is thrown
> {code:java}
> $ java -jar wordcount.jar
> KafkaStreams processID: 8a9cbf03-b841-4cb2-9d44-6456b4520522
>         StreamsThread appId: wordcount-applicationn
> ...
> ...
> Exception in thread "wordcount-application-8a9cbf03-b841-4cb2-9d44-6456b4520522-StreamThread-1"
org.apache.kafka.streams.errors.StreamsException: Could not create internal topics.
> {code}
> If I change the application id, Application works again.
> Thank you.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message