Skip to content

Commit 85c149c

Browse files
razvanmaltesander
andauthored
Apply suggestions from code review
Co-authored-by: Malte Sander <[email protected]>
1 parent 5d176aa commit 85c149c

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

rust/operator-binary/src/connect/crd.rs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,14 @@ pub const DUMMY_SPARK_CONNECT_GROUP_NAME: &str = "default";
5050

5151
#[derive(Snafu, Debug)]
5252
pub enum Error {
53-
#[snafu(display("failed to transform configs"))]
54-
ProductConfigTransform {
55-
source: stackable_operator::product_config_utils::Error,
56-
},
57-
58-
#[snafu(display("invalid product config"))]
59-
InvalidProductConfig {
60-
source: stackable_operator::product_config_utils::Error,
61-
},
62-
6353
#[snafu(display("fragment validation failure"))]
6454
FragmentValidationFailure { source: ValidationError },
65-
66-
#[snafu(display("the role group {role_group} is not defined"))]
67-
CannotRetrieveRoleGroup { role_group: String },
68-
69-
#[snafu(display("failed to construct JVM arguments"))]
70-
ConstructJvmArguments,
7155
}
7256

7357
#[versioned(version(name = "v1alpha1"))]
7458
pub mod versioned {
7559

76-
/// A Spark cluster connect server component. This resource is managed by the Stackable operator
60+
/// An Apache Spark Connect server component. This resource is managed by the Stackable operator
7761
/// for Apache Spark. Find more information on how to use it in the
7862
/// [operator documentation](DOCS_BASE_URL_PLACEHOLDER/spark-k8s/usage-guide/connect-server).
7963
#[versioned(k8s(
@@ -94,7 +78,7 @@ pub mod versioned {
9478
pub struct SparkConnectServerSpec {
9579
pub image: ProductImage,
9680

97-
/// Global Spark connect server configuration that applies to all roles and role groups.
81+
/// Global Spark Connect server configuration that applies to all roles.
9882
#[serde(default)]
9983
pub cluster_config: v1alpha1::SparkConnectServerClusterConfig,
10084

@@ -111,11 +95,11 @@ pub mod versioned {
11195
#[serde(skip_serializing_if = "Option::is_none")]
11296
pub vector_aggregator_config_map_name: Option<String>,
11397

114-
/// A spark connect server definition.
98+
/// A Spark Connect server definition.
11599
#[serde(default, skip_serializing_if = "Option::is_none")]
116100
pub server: Option<CommonConfiguration<ServerConfigFragment, JavaCommonConfig>>,
117101

118-
/// Spark connect executor properties.
102+
/// Spark Connect executor properties.
119103
#[serde(default, skip_serializing_if = "Option::is_none")]
120104
pub executor: Option<CommonConfiguration<ExecutorConfigFragment, JavaCommonConfig>>,
121105
}

rust/operator-binary/src/connect/server.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ pub enum Error {
5555
#[snafu(display("vector agent is enabled but vector aggregator ConfigMap is missing"))]
5656
VectorAggregatorConfigMapMissing,
5757

58-
#[snafu(display("failed to merge jvm argument overrides"))]
59-
MergeJvmArgumentOverrides {
60-
source: stackable_operator::role_utils::Error,
61-
},
62-
6358
#[snafu(display("spark connect object has no namespace"))]
6459
ObjectHasNoNamespace,
6560

@@ -92,11 +87,6 @@ pub enum Error {
9287
#[snafu(display("server metrics properties for spark connect {name}",))]
9388
MetricsProperties { source: common::Error, name: String },
9489

95-
#[snafu(display("failed to serialize [{SPARK_DEFAULTS_FILE_NAME}] for the connect server",))]
96-
SparkDefaultsProperties {
97-
source: product_config::writer::PropertiesWriterError,
98-
},
99-
10090
#[snafu(display("failed to build Labels"))]
10191
LabelBuild {
10292
source: stackable_operator::kvp::LabelError,

0 commit comments

Comments
 (0)