Skip to content

Commit

Permalink
KAFKA-7829; Javadoc should show that AdminClient.alterReplicaLogDirs(…
Browse files Browse the repository at this point in the history
…) is supported in Kafka 1.1.0 or later (apache#6157)

Reviewers: Jun Rao <[email protected]>
  • Loading branch information
lindong28 authored and junrao committed Jan 17, 2019
1 parent 2c44e77 commit 6a7eebe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,17 @@ public AlterConfigsResult alterConfigs(Map<ConfigResource, Config> configs) {
public abstract AlterConfigsResult alterConfigs(Map<ConfigResource, Config> configs, AlterConfigsOptions options);

/**
* Change the log directory for the specified replicas. This API is currently only useful if it is used
* before the replica has been created on the broker. It will support moving replicas that have already been created after
* KIP-113 is fully implemented.
* Change the log directory for the specified replicas. If the replica does not exist on the broker, the result
* shows REPLICA_NOT_AVAILABLE for the given replica and the replica will be created in the given log directory on the
* broker when it is created later. If the replica already exists on the broker, the replica will be moved to the given
* log directory if it is not already there.
*
* This operation is not transactional so it may succeed for some replicas while fail for others.
*
* This is a convenience method for #{@link AdminClient#alterReplicaLogDirs(Map, AlterReplicaLogDirsOptions)} with default options.
* See the overload for more details.
*
* This operation is supported by brokers with version 1.0.0 or higher.
* This operation is supported by brokers with version 1.1.0 or higher.
*
* @param replicaAssignment The replicas with their log directory absolute path
* @return The AlterReplicaLogDirsResult
Expand All @@ -406,13 +409,14 @@ public AlterReplicaLogDirsResult alterReplicaLogDirs(Map<TopicPartitionReplica,
}

/**
* Change the log directory for the specified replicas. This API is currently only useful if it is used
* before the replica has been created on the broker. It will support moving replicas that have already been created after
* KIP-113 is fully implemented.
* Change the log directory for the specified replicas. If the replica does not exist on the broker, the result
* shows REPLICA_NOT_AVAILABLE for the given replica and the replica will be created in the given log directory on the
* broker when it is created later. If the replica already exists on the broker, the replica will be moved to the given
* log directory if it is not already there.
*
* This operation is not transactional so it may succeed for some replicas while fail for others.
*
* This operation is supported by brokers with version 1.0.0 or higher.
* This operation is supported by brokers with version 1.1.0 or higher.
*
* @param replicaAssignment The replicas with their log directory absolute path
* @param options The options to use when changing replica dir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,7 @@ object ReassignPartitionsCommand extends Logging {
"The format to use is - \n" +
"{\"partitions\":\n\t[{\"topic\": \"foo\",\n\t \"partition\": 1,\n\t \"replicas\": [1,2,3],\n\t \"log_dirs\": [\"dir1\",\"dir2\",\"dir3\"] }],\n\"version\":1\n}\n" +
"Note that \"log_dirs\" is optional. When it is specified, its length must equal the length of the replicas list. The value in this list " +
"can be either \"any\" or the absolution path of the log directory on the broker. If absolute log directory path is specified, it is currently required that " +
"the replica has not already been created on that broker. The replica will then be created in the specified log directory on the broker later.")
"can be either \"any\" or the absolution path of the log directory on the broker. If absolute log directory path is specified, the replica will be moved to the specified log directory on the broker.")
.withRequiredArg
.describedAs("manual assignment json file path")
.ofType(classOf[String])
Expand Down

0 comments on commit 6a7eebe

Please sign in to comment.