You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by yi...@apache.org on 2024/05/15 00:13:19 UTC
(hudi) 18/28: [MINOR] Remove redundant lines in StreamSync and TestStreamSyncUnitTests (#11027)
This is an automated email from the ASF dual-hosted git repository.
yihua pushed a commit to branch branch-0.x
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 862575a546b0e02d2be312e64fb12a07f08aba09
Author: Y Ethan Guo <et...@gmail.com>
AuthorDate: Mon Apr 15 21:41:41 2024 -0700
[MINOR] Remove redundant lines in StreamSync and TestStreamSyncUnitTests (#11027)
---
.../apache/hudi/utilities/streamer/StreamSync.java | 4 ----
.../utilities/streamer/TestStreamSyncUnitTests.java | 20 --------------------
2 files changed, 24 deletions(-)
diff --git a/hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java b/hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java
index 2b0d94da74a..7e0b97ef570 100644
--- a/hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java
+++ b/hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java
@@ -278,7 +278,6 @@ public class StreamSync implements Serializable, Closeable {
this.formatAdapter = formatAdapter;
this.transformer = transformer;
this.useRowWriter = useRowWriter;
-
}
@Deprecated
@@ -500,7 +499,6 @@ public class StreamSync implements Serializable, Closeable {
* @return Pair<InputBatch and Boolean> Input data read from upstream source, and boolean is true if empty.
* @throws Exception in case of any Exception
*/
-
public InputBatch readFromSource(String instantTime, HoodieTableMetaClient metaClient) throws IOException {
// Retrieve the previous round checkpoints, if any
Option<String> resumeCheckpointStr = Option.empty();
@@ -563,7 +561,6 @@ public class StreamSync implements Serializable, Closeable {
// handle empty batch with change in checkpoint
hoodieSparkContext.setJobStatus(this.getClass().getSimpleName(), "Checking if input is empty: " + cfg.targetTableName);
-
if (useRowWriter) { // no additional processing required for row writer.
return inputBatch;
} else {
@@ -1297,5 +1294,4 @@ public class StreamSync implements Serializable, Closeable {
return writeStatusRDD;
}
}
-
}
diff --git a/hudi-utilities/src/test/java/org/apache/hudi/utilities/streamer/TestStreamSyncUnitTests.java b/hudi-utilities/src/test/java/org/apache/hudi/utilities/streamer/TestStreamSyncUnitTests.java
index 99148eb4b07..c0169ae64b8 100644
--- a/hudi-utilities/src/test/java/org/apache/hudi/utilities/streamer/TestStreamSyncUnitTests.java
+++ b/hudi-utilities/src/test/java/org/apache/hudi/utilities/streamer/TestStreamSyncUnitTests.java
@@ -17,25 +17,6 @@
* under the License.
*/
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
package org.apache.hudi.utilities.streamer;
import org.apache.hudi.DataSourceWriteOptions;
@@ -75,7 +56,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class TestStreamSyncUnitTests {
-
@ParameterizedTest
@MethodSource("testCasesFetchNextBatchFromSource")
void testFetchNextBatchFromSource(Boolean useRowWriter, Boolean hasTransformer, Boolean hasSchemaProvider,