|
1 | 1 | /**
|
2 |
| - * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE |
3 |
| - * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file |
4 |
| - * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the |
5 |
| - * License. You may obtain a copy of the License at |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
6 | 8 | * <p>
|
7 | 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
8 | 10 | * <p>
|
9 |
| - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
10 |
| - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
11 |
| - * specific language governing permissions and limitations under the License. |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
12 | 16 | */
|
13 |
| -package org.apache.kafka.tools; |
| 17 | +package kafka.tools; |
14 | 18 |
|
15 | 19 | import joptsimple.OptionException;
|
16 | 20 | import joptsimple.OptionParser;
|
|
21 | 25 | import org.apache.kafka.clients.consumer.ConsumerConfig;
|
22 | 26 | import org.apache.kafka.clients.consumer.KafkaConsumer;
|
23 | 27 | import org.apache.kafka.common.TopicPartition;
|
| 28 | +import org.apache.kafka.common.annotation.InterfaceStability; |
24 | 29 | import org.apache.kafka.common.security.JaasUtils;
|
25 | 30 | import org.apache.kafka.common.serialization.ByteArrayDeserializer;
|
26 | 31 |
|
|
34 | 39 | /**
|
35 | 40 | * {@link StreamsResetter} resets the processing state of a Kafka Streams application so that, for example, you can reprocess its input from scratch.
|
36 | 41 | * <p>
|
| 42 | + * <strong>This class is not part of public API. For backward compatibility, use the provided script in "bin/" instead of calling this class directly from your code.</strong> |
| 43 | + * <p> |
37 | 44 | * Resetting the processing state of an application includes the following actions:
|
38 | 45 | * <ol>
|
39 | 46 | * <li>setting the application's consumer offsets for input and internal topics to zero</li>
|
|
50 | 57 | * User output topics will not be deleted or modified by this tool.
|
51 | 58 | * If downstream applications consume intermediate or output topics, it is the user's responsibility to adjust those applications manually if required.
|
52 | 59 | */
|
| 60 | +@InterfaceStability.Unstable |
53 | 61 | public class StreamsResetter {
|
54 | 62 | private static final int EXIT_CODE_SUCCESS = 0;
|
55 | 63 | private static final int EXIT_CODE_ERROR = 1;
|
|
0 commit comments