Skip to content

Commit ea205d2

Browse files
committed
[connector] Support spark catalog and introduce some basic classes to support spark read and write
1 parent 4a83b9b commit ea205d2

File tree

19 files changed

+35
-80
lines changed

19 files changed

+35
-80
lines changed

fluss-common/src/main/java/org/apache/fluss/cluster/Cluster.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ public ServerNode getCoordinatorServer() {
147147
return coordinatorServer;
148148
}
149149

150-
/**
151-
* @return The known set of alive tablet servers.
152-
*/
150+
/** @return The known set of alive tablet servers. */
153151
public Map<Integer, ServerNode> getAliveTabletServers() {
154152
return aliveTabletServersById;
155153
}

fluss-common/src/main/java/org/apache/fluss/memory/MemorySegmentPool.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,10 @@ public interface MemorySegmentPool {
6666
*/
6767
void returnAll(List<MemorySegment> memory);
6868

69-
/**
70-
* @return Free page number.
71-
*/
69+
/** @return Free page number. */
7270
int freePages();
7371

74-
/**
75-
* @return the available memory size in bytes.
76-
*/
72+
/** @return the available memory size in bytes. */
7773
long availableMemory();
7874

7975
void close();

fluss-common/src/main/java/org/apache/fluss/predicate/Predicate.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public interface Predicate extends Serializable {
4747
*/
4848
boolean test(long rowCount, InternalRow minValues, InternalRow maxValues, Long[] nullCounts);
4949

50-
/**
51-
* @return the negation predicate of this predicate if possible.
52-
*/
50+
/** @return the negation predicate of this predicate if possible. */
5351
Optional<Predicate> negate();
5452

5553
<T> T visit(PredicateVisitor<T> visitor);

fluss-common/src/main/java/org/apache/fluss/record/DefaultValueRecordBatch.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,7 @@ public void append(short schemaId, BinaryRow row) throws IOException {
257257
currentRecordNumber++;
258258
}
259259

260-
/**
261-
* @param valueBytes consisted of schema id and the row encoded in the value bytes
262-
*/
260+
/** @param valueBytes consisted of schema id and the row encoded in the value bytes */
263261
public void append(byte[] valueBytes) throws IOException {
264262
if (isClosed) {
265263
throw new IllegalStateException(

fluss-common/src/main/java/org/apache/fluss/record/send/SendWritableOutput.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ public class SendWritableOutput extends ByteBufWritableOutput {
3434
/** The current reader index of the underlying {@link #buf} for building next {@link Send}. */
3535
private int currentReaderIndex = 0;
3636

37-
/**
38-
* @param buf The ByteBuf that has capacity of data size excluding zero-copy.
39-
*/
37+
/** @param buf The ByteBuf that has capacity of data size excluding zero-copy. */
4038
public SendWritableOutput(ByteBuf buf) {
4139
super(buf);
4240
this.sends = new ArrayDeque<>(1);

fluss-common/src/main/java/org/apache/fluss/remote/RemoteLogSegment.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,12 @@ public UUID remoteLogSegmentId() {
9393
return remoteLogSegmentId;
9494
}
9595

96-
/**
97-
* @return Remote log start offset of this segment (inclusive).
98-
*/
96+
/** @return Remote log start offset of this segment (inclusive). */
9997
public long remoteLogStartOffset() {
10098
return remoteLogStartOffset;
10199
}
102100

103-
/**
104-
* @return Remote log end offset of this segment (inclusive).
105-
*/
101+
/** @return Remote log end offset of this segment (inclusive). */
106102
public long remoteLogEndOffset() {
107103
return remoteLogEndOffset;
108104
}

fluss-common/src/main/java/org/apache/fluss/utils/types/Either.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ public static <L, R> Either<L, R> right(R value) {
6060
*/
6161
public abstract R right() throws IllegalStateException;
6262

63-
/**
64-
* @return true if this is a Left value, false if this is a Right value
65-
*/
63+
/** @return true if this is a Left value, false if this is a Right value */
6664
public final boolean isLeft() {
6765
return getClass() == Left.class;
6866
}
6967

70-
/**
71-
* @return true if this is a Right value, false if this is a Left value
72-
*/
68+
/** @return true if this is a Right value, false if this is a Left value */
7369
public final boolean isRight() {
7470
return getClass() == Right.class;
7571
}

fluss-common/src/test/java/org/apache/fluss/security/auth/AuthenticationFactoryTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ void testIdentifierCaseInsensitive() {
8080
.isInstanceOf(TestIdentifierClientAuthenticator.class);
8181
assertThat(
8282
AuthenticationFactory.loadServerAuthenticatorSuppliers(configuration)
83-
.values()
84-
.stream()
83+
.values().stream()
8584
.findAny()
8685
.get()
8786
.get())
@@ -94,8 +93,7 @@ void testIdentifierCaseInsensitive() {
9493
.isInstanceOf(TestIdentifierClientAuthenticator.class);
9594
assertThat(
9695
AuthenticationFactory.loadServerAuthenticatorSuppliers(configuration)
97-
.values()
98-
.stream()
96+
.values().stream()
9997
.findAny()
10098
.get()
10199
.get())

fluss-filesystems/fluss-fs-gs/src/test/java/org/apache/fluss/fs/gs/GSFileSystemBehaviorITCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ private static void applyInMemoryStorage(FileSystem fileSystem) throws IOExcepti
9393
GoogleCloudStorageFileSystem googleCloudStorageFileSystem =
9494
new GoogleCloudStorageFileSystem(
9595
googleCloudStorageOptions -> inMemoryGoogleCloudStorage,
96-
GoogleCloudStorageFileSystemOptions.DEFAULT.toBuilder()
96+
GoogleCloudStorageFileSystemOptions.DEFAULT
97+
.toBuilder()
9798
.setCloudStorageOptions(inMemoryGoogleCloudStorage.getOptions())
9899
.build());
99100

fluss-filesystems/fluss-fs-s3/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -924,16 +924,12 @@ public static class ListAllMyBucketsHandler extends AbstractHandler {
924924

925925
private Bucket currentBucket = null;
926926

927-
/**
928-
* @return the buckets listed in the document.
929-
*/
927+
/** @return the buckets listed in the document. */
930928
public List<Bucket> getBuckets() {
931929
return buckets;
932930
}
933931

934-
/**
935-
* @return the owner of the buckets.
936-
*/
932+
/** @return the owner of the buckets. */
937933
public Owner getOwner() {
938934
return bucketsOwner;
939935
}
@@ -990,9 +986,7 @@ public static class AccessControlListHandler extends AbstractHandler {
990986
private Grantee currentGrantee = null;
991987
private Permission currentPermission = null;
992988

993-
/**
994-
* @return an object representing the ACL document.
995-
*/
989+
/** @return an object representing the ACL document. */
996990
public AccessControlList getAccessControlList() {
997991
return accessControlList;
998992
}
@@ -1073,9 +1067,7 @@ public static class BucketLoggingConfigurationHandler extends AbstractHandler {
10731067
private final BucketLoggingConfiguration bucketLoggingConfiguration =
10741068
new BucketLoggingConfiguration();
10751069

1076-
/**
1077-
* @return an object representing the bucket's LoggingStatus document.
1078-
*/
1070+
/** @return an object representing the bucket's LoggingStatus document. */
10791071
public BucketLoggingConfiguration getBucketLoggingConfiguration() {
10801072
return bucketLoggingConfiguration;
10811073
}
@@ -1105,9 +1097,7 @@ public static class BucketLocationHandler extends AbstractHandler {
11051097

11061098
private String location = null;
11071099

1108-
/**
1109-
* @return the bucket's location.
1110-
*/
1100+
/** @return the bucket's location. */
11111101
public String getLocation() {
11121102
return location;
11131103
}

0 commit comments

Comments
 (0)