Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix split package org.elasticsearch.client #82010

Merged
merged 8 commits into from
Dec 22, 2021

Conversation

ChrisHegarty
Copy link
Contributor

@ChrisHegarty ChrisHegarty commented Dec 21, 2021

Fixes split packages between server and the LLRC (and HLRC), by renaming
the server package to a more appropriate name that represents the fact
that is in an internal client. That is, rename server's
org.elasticsearch.client to org.elasticsearch.client.internal.

Offline comments have indicated a preference to retain the disassociation
between the internal client and transport. While many of the actions
of the internal client end up sending transport requests, not all do. For this
reason org.elasticsearch.client.internal was chosen.

The package is a perfect split, so the changes largely amount to
import and package statements.

closed #81984

@ChrisHegarty ChrisHegarty added modularization Java Modules related v8.1.0 labels Dec 21, 2021
@ChrisHegarty ChrisHegarty self-assigned this Dec 21, 2021
@ChrisHegarty ChrisHegarty changed the title Fix split package with org.elasticsearch.client Fix split package org.elasticsearch.client Dec 21, 2021
@ChrisHegarty
Copy link
Contributor Author

ChrisHegarty commented Dec 21, 2021

Note to reviewers. Much of the changes are related to the shimmer in package and import statements. There are no semantic changes. To more easily see changes not related to the aforementioned shimmer, one can run a cross branch diff, see below.

Highlights (if there are any):

  • fix-up javadoc link and at see comments
  • reflow a few long lines to fit into < 140
$ git diff -w master..split_package_client | egrep -v '^(\s|diff|rename|similarity|index\s[a-z0-9]{11}\.\.[a-z0-9]{11}|@@|---|\+\+\+)' | egrep -v '^[\+|-]{1}[import|package]{1}'
-     * part of the reindex. For example, a {@link org.elasticsearch.client.FilterClient} can be provided to transform bulk index requests
-     * before they are fully performed.
+     * part of the reindex. For example, a {@link org.elasticsearch.client.internal.FilterClient} can be provided to transform bulk index
+     * requests before they are fully performed.
-            org.elasticsearch.client.transport.NoNodeAvailableException.class,
-            org.elasticsearch.client.transport.NoNodeAvailableException::new,
+            org.elasticsearch.client.internal.transport.NoNodeAvailableException.class,
+            org.elasticsearch.client.internal.transport.NoNodeAvailableException::new,
- * A request to create an index. Best created with {@link org.elasticsearch.client.Requests#createIndexRequest(String)}.
+ * A request to create an index. Best created with {@link org.elasticsearch.client.internal.Requests#createIndexRequest(String)}.
- * @see org.elasticsearch.client.IndicesAdminClient#create(CreateIndexRequest)
- * @see org.elasticsearch.client.Requests#createIndexRequest(String)
+ * @see org.elasticsearch.client.internal.IndicesAdminClient#create(CreateIndexRequest)
+ * @see org.elasticsearch.client.internal.Requests#createIndexRequest(String)
- * A request to delete an index. Best created with {@link org.elasticsearch.client.Requests#deleteIndexRequest(String)}.
+ * A request to delete an index. Best created with {@link org.elasticsearch.client.internal.Requests#deleteIndexRequest(String)}.
- * Best created with {@link org.elasticsearch.client.Requests#flushRequest(String...)}.
+ * Best created with {@link org.elasticsearch.client.internal.Requests#flushRequest(String...)}.
- * @see org.elasticsearch.client.Requests#flushRequest(String...)
- * @see org.elasticsearch.client.IndicesAdminClient#flush(FlushRequest)
+ * @see org.elasticsearch.client.internal.Requests#flushRequest(String...)
+ * @see org.elasticsearch.client.internal.IndicesAdminClient#flush(FlushRequest)
- * @see org.elasticsearch.client.Requests#forceMergeRequest(String...)
- * @see org.elasticsearch.client.IndicesAdminClient#forceMerge(ForceMergeRequest)
+ * @see org.elasticsearch.client.internal.Requests#forceMergeRequest(String...)
+ * @see org.elasticsearch.client.internal.IndicesAdminClient#forceMerge(ForceMergeRequest)
- * {@link org.elasticsearch.client.Requests#putMappingRequest(String...)}.
+ * {@link org.elasticsearch.client.internal.Requests#putMappingRequest(String...)}.
- * @see org.elasticsearch.client.Requests#putMappingRequest(String...)
- * @see org.elasticsearch.client.IndicesAdminClient#putMapping(PutMappingRequest)
+ * @see org.elasticsearch.client.internal.Requests#putMappingRequest(String...)
+ * @see org.elasticsearch.client.internal.IndicesAdminClient#putMapping(PutMappingRequest)
- * @see org.elasticsearch.client.Requests#refreshRequest(String...)
- * @see org.elasticsearch.client.IndicesAdminClient#refresh(RefreshRequest)
+ * @see org.elasticsearch.client.internal.Requests#refreshRequest(String...)
+ * @see org.elasticsearch.client.internal.IndicesAdminClient#refresh(RefreshRequest)
-     * with client::bulk as the first argument, or {@link #builder(org.elasticsearch.client.Client,
+     * with client::bulk as the first argument, or {@link #builder(org.elasticsearch.client.internal.Client,
- * @see org.elasticsearch.client.Client#bulk(BulkRequest)
+ * @see org.elasticsearch.client.internal.Client#bulk(BulkRequest)
- * {@link org.elasticsearch.client.Requests#deleteRequest(String)}.
+ * {@link org.elasticsearch.client.internal.Requests#deleteRequest(String)}.
- * @see org.elasticsearch.client.Client#delete(DeleteRequest)
- * @see org.elasticsearch.client.Requests#deleteRequest(String)
+ * @see org.elasticsearch.client.internal.Client#delete(DeleteRequest)
+ * @see org.elasticsearch.client.internal.Requests#deleteRequest(String)
- * @see org.elasticsearch.client.Client#delete(DeleteRequest)
+ * @see org.elasticsearch.client.internal.Client#delete(DeleteRequest)
- * {@link org.elasticsearch.client.Requests#getRequest(String)}.
+ * {@link org.elasticsearch.client.internal.Requests#getRequest(String)}.
- * @see org.elasticsearch.client.Requests#getRequest(String)
- * @see org.elasticsearch.client.Client#get(GetRequest)
+ * @see org.elasticsearch.client.internal.Requests#getRequest(String)
+ * @see org.elasticsearch.client.internal.Client#get(GetRequest)
- * @see org.elasticsearch.client.Client#get(GetRequest)
+ * @see org.elasticsearch.client.internal.Client#get(GetRequest)
- * created using {@link org.elasticsearch.client.Requests#indexRequest(String)}.
+ * created using {@link org.elasticsearch.client.internal.Requests#indexRequest(String)}.
- * @see org.elasticsearch.client.Requests#indexRequest(String)
- * @see org.elasticsearch.client.Client#index(IndexRequest)
+ * @see org.elasticsearch.client.internal.Requests#indexRequest(String)
+ * @see org.elasticsearch.client.internal.Client#index(IndexRequest)
- * @see org.elasticsearch.client.Client#index(IndexRequest)
+ * @see org.elasticsearch.client.internal.Client#index(IndexRequest)
- * {@link org.elasticsearch.client.Requests#searchRequest(String...)}.
+ * {@link org.elasticsearch.client.internal.Requests#searchRequest(String...)}.
- * @see org.elasticsearch.client.Requests#searchRequest(String...)
- * @see org.elasticsearch.client.Client#search(SearchRequest)
+ * @see org.elasticsearch.client.internal.Requests#searchRequest(String...)
+ * @see org.elasticsearch.client.internal.Client#search(SearchRequest)
- * @see org.elasticsearch.client.Client#admin()
+ * @see org.elasticsearch.client.internal.Client#admin()
-     * @see org.elasticsearch.client.Requests#bulkRequest()
+     * @see org.elasticsearch.client.internal.Requests#bulkRequest()
-     * @see org.elasticsearch.client.Requests#bulkRequest()
+     * @see org.elasticsearch.client.internal.Requests#bulkRequest()
-     * @see org.elasticsearch.client.Requests#nodesInfoRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesInfoRequest(String...)
-     * @see org.elasticsearch.client.Requests#nodesInfoRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesInfoRequest(String...)
-     * @see org.elasticsearch.client.Requests#clusterStatsRequest
+     * @see org.elasticsearch.client.internal.Requests#clusterStatsRequest
-     * @see org.elasticsearch.client.Requests#clusterStatsRequest()
+     * @see org.elasticsearch.client.internal.Requests#clusterStatsRequest()
-     * @see org.elasticsearch.client.Requests#nodesStatsRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesStatsRequest(String...)
-     * @see org.elasticsearch.client.Requests#nodesStatsRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesStatsRequest(String...)
-     * @see org.elasticsearch.client.Requests#nodesUsageRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesUsageRequest(String...)
-     * @see org.elasticsearch.client.Requests#nodesUsageRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#nodesUsageRequest(String...)
-     * @see org.elasticsearch.client.Requests#listTasksRequest()
+     * @see org.elasticsearch.client.internal.Requests#listTasksRequest()
-     * @see org.elasticsearch.client.Requests#listTasksRequest()
+     * @see org.elasticsearch.client.internal.Requests#listTasksRequest()
-     * @see org.elasticsearch.client.Requests#getTaskRequest()
+     * @see org.elasticsearch.client.internal.Requests#getTaskRequest()
-     * @see org.elasticsearch.client.Requests#getTaskRequest()
+     * @see org.elasticsearch.client.internal.Requests#getTaskRequest()
-     * @see org.elasticsearch.client.Requests#cancelTasksRequest()
+     * @see org.elasticsearch.client.internal.Requests#cancelTasksRequest()
-     * @see org.elasticsearch.client.Requests#cancelTasksRequest()
+     * @see org.elasticsearch.client.internal.Requests#cancelTasksRequest()
-     * @see org.elasticsearch.client.Requests#createIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#createIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#createIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#createIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#deleteIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#deleteIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#deleteIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#deleteIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#closeIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#closeIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#closeIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#closeIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#openIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#openIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#openIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#openIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#openIndexRequest(String)
+     * @see org.elasticsearch.client.internal.Requests#openIndexRequest(String)
-     * @see org.elasticsearch.client.Requests#refreshRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#refreshRequest(String...)
-     * @see org.elasticsearch.client.Requests#refreshRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#refreshRequest(String...)
-     * @see org.elasticsearch.client.Requests#flushRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#flushRequest(String...)
-     * @see org.elasticsearch.client.Requests#flushRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#flushRequest(String...)
-     * @see org.elasticsearch.client.Requests#forceMergeRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#forceMergeRequest(String...)
-     * @see org.elasticsearch.client.Requests#forceMergeRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#forceMergeRequest(String...)
-     * @see org.elasticsearch.client.Requests#putMappingRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#putMappingRequest(String...)
-     * @see org.elasticsearch.client.Requests#putMappingRequest(String...)
+     * @see org.elasticsearch.client.internal.Requests#putMappingRequest(String...)
-     * @see org.elasticsearch.client.Client#index(org.elasticsearch.action.index.IndexRequest)
+     * @see org.elasticsearch.client.internal.Client#index(org.elasticsearch.action.index.IndexRequest)
-     * @see org.elasticsearch.client.Client#delete(org.elasticsearch.action.delete.DeleteRequest)
+     * @see org.elasticsearch.client.internal.Client#delete(org.elasticsearch.action.delete.DeleteRequest)
-     * @see org.elasticsearch.client.Client#get(org.elasticsearch.action.get.GetRequest)
+     * @see org.elasticsearch.client.internal.Client#get(org.elasticsearch.action.get.GetRequest)
-     * @see org.elasticsearch.client.Client#search(org.elasticsearch.action.search.SearchRequest)
+     * @see org.elasticsearch.client.internal.Client#search(org.elasticsearch.action.search.SearchRequest)
-     * @see org.elasticsearch.client.Client#searchScroll(org.elasticsearch.action.search.SearchScrollRequest)
+     * @see org.elasticsearch.client.internal.Client#searchScroll(org.elasticsearch.action.search.SearchScrollRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#shardStores(IndicesShardStoresRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#shardStores(IndicesShardStoresRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#create(org.elasticsearch.action.admin.indices.create.CreateIndexRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#create(org.elasticsearch.action.admin.indices.create.CreateIndexRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#delete(org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#delete(org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#close(org.elasticsearch.action.admin.indices.close.CloseIndexRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#close(org.elasticsearch.action.admin.indices.close.CloseIndexRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#open(org.elasticsearch.action.admin.indices.open.OpenIndexRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#open(org.elasticsearch.action.admin.indices.open.OpenIndexRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#putMapping(org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#putMapping(PutMappingRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#refresh(org.elasticsearch.action.admin.indices.refresh.RefreshRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#refresh(org.elasticsearch.action.admin.indices.refresh.RefreshRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#flush(org.elasticsearch.action.admin.indices.flush.FlushRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#flush(org.elasticsearch.action.admin.indices.flush.FlushRequest)
-     * @see org.elasticsearch.client.IndicesAdminClient#forceMerge(org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest)
+     * @see org.elasticsearch.client.internal.IndicesAdminClient#forceMerge(ForceMergeRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#state(org.elasticsearch.action.admin.cluster.state.ClusterStateRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#state(ClusterStateRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#health(org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#health(ClusterHealthRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#nodesInfo(org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#nodesInfo(NodesInfoRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#nodesStats(org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#nodesStats(NodesStatsRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#nodesStats(org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#nodesStats(NodesStatsRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#nodesUsage(org.elasticsearch.action.admin.cluster.node.usage.NodesUsageRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#nodesUsage(NodesUsageRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#clusterStats(org.elasticsearch.action.admin.cluster.stats.ClusterStatsRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#clusterStats(ClusterStatsRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#listTasks(ListTasksRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#listTasks(ListTasksRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#getTask(GetTaskRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#getTask(GetTaskRequest)
-     * @see org.elasticsearch.client.ClusterAdminClient#cancelTasks(CancelTasksRequest)
+     * @see org.elasticsearch.client.internal.ClusterAdminClient#cancelTasks(CancelTasksRequest)
-     * @param client A {@link org.elasticsearch.client.ParentTaskAssigningClient} with the parent task set to the upgrade task. Does not set
-     *               the origin header, so implementors of this method will likely want to wrap it in an
-     *               {@link org.elasticsearch.client.OriginSettingClient}.
+     * @param client A {@link org.elasticsearch.client.internal.ParentTaskAssigningClient} with the parent task set to the upgrade task.
+     *               Does not set the origin header, so implementors of this method will likely want to wrap it in an
+     *               {@link org.elasticsearch.client.internal.OriginSettingClient}.
-     * @param client A {@link org.elasticsearch.client.ParentTaskAssigningClient} with the parent task set to the upgrade task. Does not set
-     *               the origin header, so implementors of this method will likely want to wrap it in an
-     *               {@link org.elasticsearch.client.OriginSettingClient}.
+     * @param client A {@link org.elasticsearch.client.internal.ParentTaskAssigningClient} with the parent task set to the upgrade task.
+     *               Does not set the origin header, so implementors of this method will likely want to wrap it in an
+     *               {@link org.elasticsearch.client.internal.OriginSettingClient}.
-        ids.put(94, org.elasticsearch.client.transport.NoNodeAvailableException.class);
+        ids.put(94, org.elasticsearch.client.internal.transport.NoNodeAvailableException.class);
- * See also {@link NoOpNodeClient} if you need to mock a {@link org.elasticsearch.client.node.NodeClient}.
+ * See also {@link NoOpNodeClient} if you need to mock a {@link org.elasticsearch.client.internal.node.NodeClient}.
-     * A mocked {@link org.elasticsearch.client.node.NodeClient} which can be easily reconfigured to verify arbitrary verification
+     * A mocked {@link org.elasticsearch.client.internal.node.NodeClient} which can be easily reconfigured to verify arbitrary verification

@ChrisHegarty
Copy link
Contributor Author

@elasticmachine retest this please

@ChrisHegarty
Copy link
Contributor Author

BWC failure is unrelated and has an issue #82014 already.

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it is an automated refactoring so no point reviewing every file. Chrome will crash anyway.
the new name is good to me

@pgomulka
Copy link
Contributor

@elasticmachine update branch

@ChrisHegarty
Copy link
Contributor Author

@elasticmachine update branch

@ChrisHegarty
Copy link
Contributor Author

@elasticmachine retest this please

@ChrisHegarty ChrisHegarty merged commit a2bc485 into elastic:master Dec 22, 2021
@ChrisHegarty ChrisHegarty deleted the split_package_client branch December 22, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modularization Java Modules related v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix split package org.elasticsearch.client
3 participants