Skip to content

Commit 64dbe69

Browse files
committed
Eduard's second batch of comments
1 parent de6ce76 commit 64dbe69

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

data/src/main/java/org/apache/iceberg/data/GenericFileWriterFactory.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -150,80 +150,80 @@ static Builder builderFor(Table table) {
150150
}
151151

152152
/**
153-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
154-
* configuration is done by the {@link FormatModelRegistry}.
153+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
154+
* the configuration is done by the {@link FormatModelRegistry}.
155155
*/
156156
@Deprecated
157157
protected void configureDataWrite(Avro.DataWriteBuilder builder) {
158158
builder.createWriterFunc(DataWriter::create);
159159
}
160160

161161
/**
162-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
163-
* configuration is done by the {@link FormatModelRegistry}.
162+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
163+
* the configuration is done by the {@link FormatModelRegistry}.
164164
*/
165165
@Deprecated
166166
protected void configureEqualityDelete(Avro.DeleteWriteBuilder builder) {
167167
builder.createWriterFunc(DataWriter::create);
168168
}
169169

170170
/**
171-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
172-
* configuration is done by the {@link FormatModelRegistry}.
171+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
172+
* the configuration is done by the {@link FormatModelRegistry}.
173173
*/
174174
@Deprecated
175175
protected void configurePositionDelete(Avro.DeleteWriteBuilder builder) {
176176
builder.createWriterFunc(DataWriter::create);
177177
}
178178

179179
/**
180-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
181-
* configuration is done by the {@link FormatModelRegistry}.
180+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
181+
* the configuration is done by the {@link FormatModelRegistry}.
182182
*/
183183
@Deprecated
184184
protected void configureDataWrite(Parquet.DataWriteBuilder builder) {
185185
builder.createWriterFunc(GenericParquetWriter::create);
186186
}
187187

188188
/**
189-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
190-
* configuration is done by the {@link FormatModelRegistry}.
189+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
190+
* the configuration is done by the {@link FormatModelRegistry}.
191191
*/
192192
@Deprecated
193193
protected void configureEqualityDelete(Parquet.DeleteWriteBuilder builder) {
194194
builder.createWriterFunc(GenericParquetWriter::create);
195195
}
196196

197197
/**
198-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
199-
* configuration is done by the {@link FormatModelRegistry}.
198+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
199+
* the configuration is done by the {@link FormatModelRegistry}.
200200
*/
201201
@Deprecated
202202
protected void configurePositionDelete(Parquet.DeleteWriteBuilder builder) {
203203
builder.createWriterFunc(GenericParquetWriter::create);
204204
}
205205

206206
/**
207-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
208-
* configuration is done by the {@link FormatModelRegistry}.
207+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
208+
* the configuration is done by the {@link FormatModelRegistry}.
209209
*/
210210
@Deprecated
211211
protected void configureDataWrite(ORC.DataWriteBuilder builder) {
212212
builder.createWriterFunc(GenericOrcWriter::buildWriter);
213213
}
214214

215215
/**
216-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
217-
* configuration is done by the {@link FormatModelRegistry}.
216+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
217+
* the configuration is done by the {@link FormatModelRegistry}.
218218
*/
219219
@Deprecated
220220
protected void configureEqualityDelete(ORC.DeleteWriteBuilder builder) {
221221
builder.createWriterFunc(GenericOrcWriter::buildWriter);
222222
}
223223

224224
/**
225-
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting 1.11.0 as the
226-
* configuration is done by the {@link FormatModelRegistry}.
225+
* @deprecated Since 1.11.0, will be removed in 1.12.0. It won't be called starting in 1.11.0 as
226+
* the configuration is done by the {@link FormatModelRegistry}.
227227
*/
228228
@Deprecated
229229
protected void configurePositionDelete(ORC.DeleteWriteBuilder builder) {
@@ -241,7 +241,7 @@ public PositionDeleteWriter<Record> newPositionDeleteWriter(
241241
MetricsConfig metricsConfig =
242242
table != null
243243
? MetricsConfig.forPositionDelete(table)
244-
: MetricsConfig.fromProperties(ImmutableMap.of());
244+
: MetricsConfig.forPositionDelete();
245245

246246
try {
247247
return switch (format) {

data/src/main/java/org/apache/iceberg/data/RegistryBasedFileWriterFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ protected S equalityDeleteInputSchema() {
9898
@Override
9999
public DataWriter<T> newDataWriter(
100100
EncryptedOutputFile file, PartitionSpec spec, StructLike partition) {
101-
Preconditions.checkNotNull(dataSchema, "Data schema must not be null");
101+
Preconditions.checkArgument(dataSchema != null, "Invalid data schema: null");
102102
EncryptionKeyMetadata keyMetadata = file.keyMetadata();
103103
Map<String, String> properties = table != null ? table.properties() : ImmutableMap.of();
104104
MetricsConfig metricsConfig =
@@ -127,7 +127,7 @@ public DataWriter<T> newDataWriter(
127127
@Override
128128
public EqualityDeleteWriter<T> newEqualityDeleteWriter(
129129
EncryptedOutputFile file, PartitionSpec spec, StructLike partition) {
130-
Preconditions.checkNotNull(equalityDeleteRowSchema, "Equality delete schema must not be null");
130+
Preconditions.checkArgument(equalityDeleteRowSchema != null, "Invalid delete schema: null");
131131

132132
EncryptionKeyMetadata keyMetadata = file.keyMetadata();
133133
Map<String, String> properties = table != null ? table.properties() : ImmutableMap.of();

0 commit comments

Comments
 (0)