Skip to content

Commit 0c4532f

Browse files
committed
[typo] Fix many typos and optimize some code
1 parent 9ec7152 commit 0c4532f

File tree

22 files changed

+34
-34
lines changed

22 files changed

+34
-34
lines changed

fluss-client/src/main/java/org/apache/fluss/client/lookup/LookupType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
public enum LookupType {
2525
LOOKUP,
2626
LOOKUP_WITH_INSERT_IF_NOT_EXISTS,
27-
PREFIX_LOOKUP;
27+
PREFIX_LOOKUP
2828
}

fluss-common/src/test/java/org/apache/fluss/row/BinaryArrayTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public void testToArrayWithNullThrowsException() {
287287
writer.writeInt(2, 30);
288288
writer.complete();
289289

290-
assertThatThrownBy(() -> array.toIntArray())
290+
assertThatThrownBy(array::toIntArray)
291291
.isInstanceOf(RuntimeException.class)
292292
.hasMessageContaining("Primitive array must not contain a null value");
293293
}

fluss-common/src/test/java/org/apache/fluss/row/GenericArrayTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void testNullInObjectArray() {
185185
assertThat(array.isNullAt(1)).isTrue();
186186
assertThat(array.isNullAt(2)).isFalse();
187187

188-
assertThatThrownBy(() -> array.toIntArray())
188+
assertThatThrownBy(array::toIntArray)
189189
.isInstanceOf(RuntimeException.class)
190190
.hasMessageContaining("Primitive array must not contain a null value");
191191
}

fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/TableBucketWriteResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class TableBucketWriteResult<WriteResult> implements Serializable {
5353
private final long maxTimestamp;
5454

5555
// the total number of write results in one round of tiering,
56-
// used for downstream commiter operator to determine when all write results
56+
// used for downstream committer operator to determine when all write results
5757
// for the round of tiering is finished
5858
private final int numberOfWriteResults;
5959

fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ private List<TieringSplit> populateNumberOfTieringSplits(List<TieringSplit> tier
492492

493493
@Override
494494
public TieringSourceEnumeratorState snapshotState(long checkpointId) throws Exception {
495-
// do nothing, the downstream lake commiter will snapshot the state to Fluss Cluster
495+
// do nothing, the downstream lake committer will snapshot the state to Fluss Cluster
496496
return new TieringSourceEnumeratorState();
497497
}
498498

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/catalog/FlinkCatalogTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void beforeEach() throws Exception {
205205
DEFAULT_DB, new CatalogDatabaseImpl(Collections.emptyMap(), null), true);
206206
} catch (CatalogException e) {
207207
// the auto partitioned manager may create the db zk node
208-
// in an another thread, so if exception is NodeExistsException, just ignore
208+
// in another thread, so if exception is NodeExistsException, just ignore
209209
if (!ExceptionUtils.findThrowableWithMessage(e, "KeeperException$NodeExistsException")
210210
.isPresent()) {
211211
throw e;
@@ -275,7 +275,7 @@ void testCreateTable() throws Exception {
275275
this.tableInDefaultDb, CATALOG_NAME));
276276
// should be ok since we set ignoreIfNotExists = true
277277
catalog.dropTable(this.tableInDefaultDb, true);
278-
// create table from an non-exist db
278+
// create table from a non-exist db
279279
ObjectPath nonExistDbPath = ObjectPath.fromString("non.exist");
280280

281281
// remove bucket-key
@@ -300,7 +300,7 @@ void testCreateTable() throws Exception {
300300
resolvedSchema);
301301
catalog.createTable(this.tableInDefaultDb, table2, false);
302302
tableCreated = catalog.getTable(this.tableInDefaultDb);
303-
// need to over write the option
303+
// need to overwrite the option
304304
addedOptions.put(BUCKET_KEY.key(), "third");
305305

306306
expectedTable = addOptions(table2, addedOptions);
@@ -492,7 +492,7 @@ void testCreateAndDropMaterializedTable() throws Exception {
492492
// should be ok since we set ignoreIfNotExists = true
493493
catalog.dropTable(mt1, true);
494494

495-
// create table from an non-exist db
495+
// create table from a non-exist db
496496
ObjectPath nonExistDbPath = ObjectPath.fromString("non.exist");
497497

498498
// remove bucket-key
@@ -658,10 +658,10 @@ void testDatabase() throws Exception {
658658
@Test
659659
void testOperatePartitions() throws Exception {
660660
catalog.createDatabase("db1", new CatalogDatabaseImpl(Collections.emptyMap(), null), false);
661-
assertThatThrownBy(() -> catalog.listPartitions(new ObjectPath("db1", "unkown_table")))
661+
assertThatThrownBy(() -> catalog.listPartitions(new ObjectPath("db1", "unknown_table")))
662662
.isInstanceOf(TableNotExistException.class)
663663
.hasMessage(
664-
"Table (or view) db1.unkown_table does not exist in Catalog test-catalog.");
664+
"Table (or view) db1.unknown_table does not exist in Catalog test-catalog.");
665665

666666
// create a none partitioned table.
667667
CatalogTable table = this.newCatalogTable(Collections.emptyMap());
@@ -843,7 +843,7 @@ void testConnectionFailureHandling() {
843843
Collections::emptyMap);
844844

845845
// Test open() throws proper exception
846-
assertThatThrownBy(() -> badCatalog.open())
846+
assertThatThrownBy(badCatalog::open)
847847
.isInstanceOf(IllegalConfigurationException.class)
848848
.hasMessageContaining("No resolvable bootstrap urls");
849849
}

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ void testTableReachMaxTieringDuration() throws Throwable {
739739
try (FlussMockSplitEnumeratorContext<TieringSplit> context =
740740
new FlussMockSplitEnumeratorContext<>(numSubtasks);
741741
TieringSourceEnumerator enumerator =
742-
createTieringSourceEnumerator(flussConf, context); ) {
742+
createTieringSourceEnumerator(flussConf, context)) {
743743
enumerator.start();
744744

745745
// Register all readers

fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergWriteResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import java.io.Serializable;
2727

28-
/** The write result of Iceberg lake writer to pass to commiter to commit. */
28+
/** The write result of Iceberg lake writer to pass to committer to commit. */
2929
public class IcebergWriteResult implements Serializable {
3030

3131
private static final long serialVersionUID = 1L;

fluss-lake/fluss-lake-lance/src/main/java/org/apache/fluss/lake/lance/tiering/LanceWriteResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.io.Serializable;
2323
import java.util.List;
2424

25-
/** The write result of Lance lake writer to pass to commiter to commit. */
25+
/** The write result of Lance lake writer to pass to committer to commit. */
2626
public class LanceWriteResult implements Serializable {
2727
private static final long serialVersionUID = 1L;
2828

fluss-lake/fluss-lake-lance/src/main/java/org/apache/fluss/lake/lance/tiering/LanceWriteResultSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public int getVersion() {
3737
@Override
3838
public byte[] serialize(LanceWriteResult lanceWriteResult) throws IOException {
3939
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
40-
ObjectOutputStream oos = new ObjectOutputStream(baos); ) {
40+
ObjectOutputStream oos = new ObjectOutputStream(baos)) {
4141
oos.writeObject(lanceWriteResult);
4242
return baos.toByteArray();
4343
}

0 commit comments

Comments
 (0)