You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by ro...@apache.org on 2024/06/21 03:10:29 UTC
(incubator-uniffle) branch support-annotations updated (ac86f27f4 -> 86268b5eb)
This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a change to branch support-annotations
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
discard ac86f27f4 [#289] feat(operator): support annotations
add 69f439334 [#1794] improvement(netty): TransportClientFactory should check whether handler is null when creating client (#1795)
add 5ba2df86e [MINOR] refactor: Check debug enabled (#1793)
add 8eff38e29 [#1778] improvement(dashboard): Dashboard adds the ability to automatically format code. (#1779)
add 430046040 [#1708] feat(server): support use skip list to store shuffleBuffer in memory (#1763)
add 7aa95ce9d [#1807] improvement(server): Optimize judgment of partition whether is huge (#1808)
add a22f95a50 [#1799] improvement(spark): Rename shuffleManager rpc to reassignOnStageResubmit (#1800)
add e3ec90f5c [#1802] improvement(netty): Allow sharing Netty's memory allocators (#1803)
add 7794f0f91 [#1791] feat(spark)(coordinator): Take more infos on getting assignment to track app reassign/stageRetry (#1792)
add 38dcff19a [#1608] feat(spark3): Ensure the compatiblity of reassign and stageRetry (#1783)
add ea1070c6b [#1805][part-1] build: Support Scala 2.13 (#1806)
add a4d8c8f9d [#288] feat(operator): Supports mounting PVC for shuffleserver (#1813)
add e37a09ce5 [#1811] improvement(netty): Print received Netty ByteBuf readable bytes in clients (#1812)
add 496982261 [#1787] feat(spark): Fine grained stage retry switch for fetch/write failure (#1788)
new 86268b5eb [#289] feat(operator): support annotations
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (ac86f27f4)
\
N -- N -- N refs/heads/support-annotations (86268b5eb)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/parallel.yml | 1 +
.../hadoop/mapred/SortWriteBufferManagerTest.java | 6 +-
.../hadoop/mapreduce/task/reduce/FetcherTest.java | 6 +-
.../org/apache/spark/shuffle/RssSparkConfig.java | 30 +-
.../apache/spark/shuffle/RssSparkShuffleUtils.java | 4 +-
.../spark/shuffle/writer/BufferManagerOptions.java | 11 +-
.../shuffle/manager/RssShuffleManagerBase.java | 117 +++++--
.../manager/RssShuffleManagerInterface.java | 5 +-
.../shuffle/manager/ShuffleManagerGrpcService.java | 4 +-
.../shuffle/manager/DummyRssShuffleManager.java | 5 +-
.../apache/spark/shuffle/RssShuffleManager.java | 44 ++-
.../spark/shuffle/reader/RssShuffleReader.java | 4 +-
.../spark/shuffle/writer/RssShuffleWriter.java | 6 +-
.../apache/spark/shuffle/RssShuffleManager.java | 52 +++-
.../spark/shuffle/reader/RssShuffleReader.java | 3 +-
.../spark/shuffle/writer/RssShuffleWriter.java | 5 +-
.../spark/shuffle/RssShuffleManagerTest.java | 60 ++++
.../spark/shuffle/writer/RssShuffleWriterTest.java | 53 ++--
.../common/sort/buffer/WriteBufferManagerTest.java | 6 +-
.../uniffle/client/api/ShuffleWriteClient.java | 43 ++-
.../client/impl/ShuffleWriteClientImpl.java | 30 +-
.../apache/uniffle/common/config/ConfigOption.java | 2 +-
.../uniffle/common/config/RssClientConf.java | 10 +
.../netty/client/TransportClientFactory.java | 36 ++-
.../uniffle/common/netty/client/TransportConf.java | 4 +
.../uniffle/common/netty/protocol/Decoders.java | 2 +-
.../apache/uniffle/common/util/GrpcNettyUtils.java | 4 +-
.../org/apache/uniffle/common/util/NettyUtils.java | 71 ++++-
.../uniffle/common}/web/resource/BaseResource.java | 4 +-
.../uniffle/common/web/resource}/Response.java | 2 +-
.../coordinator/CoordinatorGrpcService.java | 10 +-
.../coordinator/web/resource/AdminResource.java | 3 +-
.../web/resource/ApplicationResource.java | 3 +-
.../web/resource/CoordinatorServerResource.java | 3 +-
.../coordinator/web/resource/ServerResource.java | 3 +-
.../coordinator/web/UniffleServicesRESTTest.java | 2 +-
.../dashboard/web/resource/BaseResource.java | 36 ---
.../web/resource/CoordinatorResource.java | 3 +
.../uniffle/dashboard/web/resource/Response.java | 70 -----
.../src/main/webapp/.eslintignore | 5 +-
.../main/webapp/{babel.config.js => .eslintrc.js} | 17 +-
.../webapp/{jsconfig.json => .prettierrc.json} | 22 +-
dashboard/src/main/webapp/babel.config.js | 4 +-
dashboard/src/main/webapp/jsconfig.json | 11 +-
dashboard/src/main/webapp/package.json | 33 +-
.../src/main/webapp/packagescript/cleanfile.js | 12 +-
.../src/main/webapp/packagescript/fileutils.js | 106 +++----
dashboard/src/main/webapp/public/index.html | 15 +-
dashboard/src/main/webapp/src/App.vue | 2 +-
dashboard/src/main/webapp/src/api/api.js | 54 ++--
.../src/main/webapp/src/components/LayoutPage.vue | 44 +--
dashboard/src/main/webapp/src/main.js | 10 +-
.../src/main/webapp/src/pages/ApplicationPage.vue | 48 ++-
.../webapp/src/pages/CoordinatorServerPage.vue | 59 ++--
.../main/webapp/src/pages/ShuffleServerPage.vue | 40 +--
.../src/pages/serverstatus/ActiveNodeListPage.vue | 67 ++--
.../serverstatus/DecommissionednodeListPage.vue | 69 +++--
.../serverstatus/DecommissioningNodeListPage.vue | 71 +++--
.../src/pages/serverstatus/ExcludeNodeList.vue | 22 +-
.../webapp/src/pages/serverstatus/LostNodeList.vue | 71 +++--
.../pages/serverstatus/UnhealthyNodeListPage.vue | 70 +++--
dashboard/src/main/webapp/src/router/index.js | 98 +++---
.../main/webapp/src/store/useCurrentServerStore.js | 8 +-
dashboard/src/main/webapp/src/utils/common.js | 26 +-
dashboard/src/main/webapp/src/utils/http.js | 63 ++--
dashboard/src/main/webapp/src/utils/request.js | 66 ++--
dashboard/src/main/webapp/vue.config.js | 24 +-
.../uniffle/v1alpha1/remoteshuffleservice_types.go | 23 ++
.../api/uniffle/v1alpha1/zz_generated.deepcopy.go | 28 ++
.../uniffle.apache.org_remoteshuffleservices.yaml | 199 ++++++++++++
.../{full-restart => pvc-example}/README.md | 21 +-
.../examples/pvc-example/gce-storage-class.yml | 9 +-
.../rss-pvc-on-gce.yaml} | 50 ++-
.../controller/sync/shuffleserver/shuffleserver.go | 17 +
.../sync/shuffleserver/shuffleserver_test.go | 49 +++
docs/client_guide/client_guide.md | 23 +-
.../uniffle/test/CoordinatorAdminServiceTest.java | 2 +-
.../java/org/apache/uniffle/test/ServletTest.java | 2 +-
.../org/apache/uniffle/test/GetReaderTest.java | 2 +-
...mesTest.java => ReassignAndStageRetryTest.java} | 70 +----
.../uniffle/client/api/ShuffleManagerClient.java | 2 +-
.../client/impl/grpc/CoordinatorGrpcClient.java | 13 +-
.../uniffle/client/impl/grpc/GrpcClient.java | 4 +-
.../client/impl/grpc/ShuffleManagerGrpcClient.java | 4 +-
.../impl/grpc/ShuffleServerGrpcNettyClient.java | 13 +-
.../request/RssGetShuffleAssignmentsRequest.java | 26 +-
pom.xml | 7 +
proto/src/main/proto/Rss.proto | 7 +-
.../apache/uniffle/server/ShuffleServerConf.java | 13 +
.../org/apache/uniffle/server/ShuffleTaskInfo.java | 6 +
.../server/buffer/AbstractShuffleBuffer.java | 188 +++++++++++
.../uniffle/server/buffer/ShuffleBuffer.java | 343 +--------------------
.../server/buffer/ShuffleBufferManager.java | 17 +-
.../uniffle/server/buffer/ShuffleBufferType.java | 8 +-
...uffer.java => ShuffleBufferWithLinkedList.java} | 159 +---------
.../server/buffer/ShuffleBufferWithSkipList.java | 230 ++++++++++++++
.../apache/uniffle/server/netty/StreamServer.java | 4 +-
.../server/MockedShuffleServerGrpcService.java | 15 +
.../apache/uniffle/server/ShuffleTaskInfoTest.java | 12 +
.../uniffle/server/buffer/BufferTestBase.java | 19 +-
...t.java => ShuffleBufferWithLinkedListTest.java} | 34 +-
.../buffer/ShuffleBufferWithSkipListTest.java | 208 +++++++++++++
102 files changed, 2292 insertions(+), 1435 deletions(-)
rename {coordinator/src/main/java/org/apache/uniffle/coordinator => common/src/main/java/org/apache/uniffle/common}/web/resource/BaseResource.java (91%)
rename {coordinator/src/main/java/org/apache/uniffle/coordinator/web => common/src/main/java/org/apache/uniffle/common/web/resource}/Response.java (97%)
delete mode 100644 dashboard/src/main/java/org/apache/uniffle/dashboard/web/resource/BaseResource.java
delete mode 100644 dashboard/src/main/java/org/apache/uniffle/dashboard/web/resource/Response.java
copy common/src/test/resources/server.conf => dashboard/src/main/webapp/.eslintignore (94%)
copy dashboard/src/main/webapp/{babel.config.js => .eslintrc.js} (76%)
copy dashboard/src/main/webapp/{jsconfig.json => .prettierrc.json} (76%)
copy deploy/kubernetes/operator/examples/{full-restart => pvc-example}/README.md (59%)
copy common/src/test/resources/server.conf => deploy/kubernetes/operator/examples/pvc-example/gce-storage-class.yml (85%)
copy deploy/kubernetes/operator/examples/{full-restart/rss-full-restart.yaml => pvc-example/rss-pvc-on-gce.yaml} (62%)
copy integration-test/spark3/src/test/java/org/apache/uniffle/test/{PartitionBlockDataReassignMultiTimesTest.java => ReassignAndStageRetryTest.java} (50%)
create mode 100644 server/src/main/java/org/apache/uniffle/server/buffer/AbstractShuffleBuffer.java
copy common/src/main/java/org/apache/uniffle/common/ClientType.java => server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferType.java (88%)
copy server/src/main/java/org/apache/uniffle/server/buffer/{ShuffleBuffer.java => ShuffleBufferWithLinkedList.java} (63%)
create mode 100644 server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
rename server/src/test/java/org/apache/uniffle/server/buffer/{ShuffleBufferTest.java => ShuffleBufferWithLinkedListTest.java} (96%)
create mode 100644 server/src/test/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipListTest.java
(incubator-uniffle) 01/01: [#289] feat(operator): support annotations
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch support-annotations
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
commit 86268b5eb5dcb37ed69d4978cd5d7a0722e050c9
Author: Rory <ro...@apache.org>
AuthorDate: Fri Jun 21 10:27:05 2024 +0800
[#289] feat(operator): support annotations
---
.../uniffle/v1alpha1/remoteshuffleservice_types.go | 5 +++++
.../api/uniffle/v1alpha1/zz_generated.deepcopy.go | 7 ++++++
.../uniffle.apache.org_remoteshuffleservices.yaml | 14 ++++++++++++
.../pkg/controller/sync/coordinator/coordinator.go | 7 ++++++
.../controller/sync/shuffleserver/shuffleserver.go | 25 +++++++++++++++-------
5 files changed, 50 insertions(+), 8 deletions(-)
diff --git a/deploy/kubernetes/operator/api/uniffle/v1alpha1/remoteshuffleservice_types.go b/deploy/kubernetes/operator/api/uniffle/v1alpha1/remoteshuffleservice_types.go
index 978695343..2903f0932 100644
--- a/deploy/kubernetes/operator/api/uniffle/v1alpha1/remoteshuffleservice_types.go
+++ b/deploy/kubernetes/operator/api/uniffle/v1alpha1/remoteshuffleservice_types.go
@@ -309,6 +309,11 @@ type RSSPodSpec struct {
// Affinity is a group of affinity scheduling rules.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata.
+ // +optional
+ Annotations map[string]string `json:"annotations,omitempty"`
}
// MainContainer stores information of the main container of coordinators or shuffle servers,
diff --git a/deploy/kubernetes/operator/api/uniffle/v1alpha1/zz_generated.deepcopy.go b/deploy/kubernetes/operator/api/uniffle/v1alpha1/zz_generated.deepcopy.go
index 0c7389f29..c9e15d7a5 100644
--- a/deploy/kubernetes/operator/api/uniffle/v1alpha1/zz_generated.deepcopy.go
+++ b/deploy/kubernetes/operator/api/uniffle/v1alpha1/zz_generated.deepcopy.go
@@ -274,6 +274,13 @@ func (in *RSSPodSpec) DeepCopyInto(out *RSSPodSpec) {
*out = new(v1.Affinity)
(*in).DeepCopyInto(*out)
}
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RSSPodSpec.
diff --git a/deploy/kubernetes/operator/config/crd/bases/uniffle.apache.org_remoteshuffleservices.yaml b/deploy/kubernetes/operator/config/crd/bases/uniffle.apache.org_remoteshuffleservices.yaml
index 9dca5b422..46e3e23b8 100644
--- a/deploy/kubernetes/operator/config/crd/bases/uniffle.apache.org_remoteshuffleservices.yaml
+++ b/deploy/kubernetes/operator/config/crd/bases/uniffle.apache.org_remoteshuffleservices.yaml
@@ -937,6 +937,13 @@ spec:
type: array
type: object
type: object
+ annotations:
+ additionalProperties:
+ type: string
+ description: Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata.
+ type: object
args:
description: Args represents args used by coordinators or shuffle
servers.
@@ -5899,6 +5906,13 @@ spec:
type: array
type: object
type: object
+ annotations:
+ additionalProperties:
+ type: string
+ description: Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata.
+ type: object
args:
description: Args represents args used by coordinators or shuffle
servers.
diff --git a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
index dad46ed5a..f1b62b8b4 100644
--- a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
+++ b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
@@ -235,6 +235,13 @@ func GenerateDeploy(rss *unifflev1alpha1.RemoteShuffleService, index int) *appsv
deploy.Spec.Template.Spec.RuntimeClassName = rss.Spec.Coordinator.RuntimeClassName
}
+ // add custom annotations
+ annotations := map[string]string{}
+ for key, value := range rss.Spec.ShuffleServer.Annotations {
+ annotations[key] = value
+ }
+ deploy.Spec.Template.Annotations = annotations
+
// add init containers, the main container and other containers.
deploy.Spec.Template.Spec.InitContainers = util.GenerateInitContainers(rss.Spec.Coordinator.RSSPodSpec)
containers := []corev1.Container{*generateMainContainer(rss)}
diff --git a/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver.go b/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver.go
index 867a40386..9c4f14f70 100644
--- a/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver.go
+++ b/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver.go
@@ -173,14 +173,6 @@ func GenerateSts(kubeClient kubernetes.Interface, rss *unifflev1alpha1.RemoteShu
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: make(map[string]string),
- Annotations: map[string]string{
- constants.AnnotationRssName: rss.Name,
- constants.AnnotationRssUID: string(rss.UID),
- constants.AnnotationMetricsServerPort: fmt.Sprintf("%v",
- *rss.Spec.ShuffleServer.HTTPPort),
- constants.AnnotationShuffleServerPort: fmt.Sprintf("%v",
- *rss.Spec.ShuffleServer.RPCPort),
- },
},
Spec: podSpec,
},
@@ -209,6 +201,23 @@ func GenerateSts(kubeClient kubernetes.Interface, rss *unifflev1alpha1.RemoteShu
})
}
+ // add custom annotation, and default annotation used by rss
+ annotations := map[string]string{
+ constants.AnnotationRssName: rss.Name,
+ constants.AnnotationRssUID: string(rss.UID),
+ constants.AnnotationMetricsServerPort: fmt.Sprintf("%v",
+ *rss.Spec.ShuffleServer.HTTPPort),
+ constants.AnnotationShuffleServerPort: fmt.Sprintf("%v",
+ *rss.Spec.ShuffleServer.RPCPort),
+ }
+
+ for key, value := range rss.Spec.ShuffleServer.Annotations {
+ if key != constants.AnnotationRssName && key != constants.AnnotationRssUID && key != constants.AnnotationMetricsServerPort && key != constants.AnnotationShuffleServerPort {
+ annotations[key] = value
+ }
+ }
+ sts.Spec.Template.Annotations = annotations
+
// add init containers, the main container and other containers.
sts.Spec.Template.Spec.InitContainers = util.GenerateInitContainers(rss.Spec.ShuffleServer.RSSPodSpec)
containers := []corev1.Container{*generateMainContainer(rss)}