You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by si...@apache.org on 2023/04/11 16:03:55 UTC

[hudi] branch release-0.12.3 updated (d8be3dd39a5 -> 18f438577f4)

This is an automated email from the ASF dual-hosted git repository.

sivabalan pushed a change to branch release-0.12.3
in repository https://gitbox.apache.org/repos/asf/hudi.git


    omit d8be3dd39a5 Adding more logs to debug
    omit fbf69477d3b Minor fixes
    omit cdea97dce38 Fixing cleaning up of DFS in test
    omit 4774e965c1e Init embedded timeline server only when needed
    omit 19ce00538b4 Fixing remote table file system tests
    omit 3b500e4e48e [HUDI-5482] Nulls should be counted in the value count stats for mor table (#7482)
    omit 266936114d1 Fixing closing of resourcs in TestHoodieLogFormat
    omit 0f56b71b23e Fixing hdfs mini cluster
    omit c5321b260b2 Fixing test log format tests
     new 18f438577f4 [HUDI-3900] Closing resources in TestHoodieLogRecord (#6995)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d8be3dd39a5)
            \
             N -- N -- N   refs/heads/release-0.12.3 (18f438577f4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/hudi/client/BaseHoodieClient.java   |  1 -
 .../embedded/EmbeddedTimelineServerHelper.java     |  4 +-
 .../TestRemoteFileSystemViewWithMetadataTable.java | 50 +++++---------
 .../hudi/testutils/HoodieClientTestHarness.java    | 17 ++---
 .../hudi/common/table/HoodieTableMetaClient.java   |  5 --
 .../view/RemoteHoodieTableFileSystemView.java      |  2 +-
 .../hudi/exception/TableNotFoundException.java     |  7 +-
 .../hudi/metadata/HoodieTableMetadataUtil.java     |  4 +-
 .../common/functional/TestHoodieLogFormat.java     | 79 ++++++++++------------
 .../common/testutils/HoodieCommonTestHarness.java  | 19 ++----
 .../testutils/minicluster/HdfsTestService.java     | 39 +++++++----
 .../hudi/functional/TestColumnStatsIndex.scala     | 50 +-------------
 12 files changed, 97 insertions(+), 180 deletions(-)


[hudi] 01/01: [HUDI-3900] Closing resources in TestHoodieLogRecord (#6995)

Posted by si...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sivabalan pushed a commit to branch release-0.12.3
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit 18f438577f444c75e8060a20b7fdf59e40e9ab7e
Author: Sivabalan Narayanan <n....@gmail.com>
AuthorDate: Tue Oct 18 20:49:59 2022 -0700

    [HUDI-3900] Closing resources in TestHoodieLogRecord (#6995)
---
 .../hudi/common/functional/TestHoodieLogFormat.java | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/hudi-common/src/test/java/org/apache/hudi/common/functional/TestHoodieLogFormat.java b/hudi-common/src/test/java/org/apache/hudi/common/functional/TestHoodieLogFormat.java
index 154c9e341ac..88966ea4190 100755
--- a/hudi-common/src/test/java/org/apache/hudi/common/functional/TestHoodieLogFormat.java
+++ b/hudi-common/src/test/java/org/apache/hudi/common/functional/TestHoodieLogFormat.java
@@ -146,6 +146,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
     assertEquals(0, writer.getCurrentSize(), "Just created this log, size should be 0");
     assertTrue(writer.getLogFile().getFileName().startsWith("."), "Check all log files should start with a .");
     assertEquals(1, writer.getLogFile().getLogVersion(), "Version should be 1 for new log created");
+    writer.close();
   }
 
   @ParameterizedTest
@@ -404,6 +405,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
   public void testHugeLogFileWrite() throws IOException, URISyntaxException, InterruptedException {
     Writer writer =
         HoodieLogFormat.newWriterBuilder().onParentPath(partitionPath).withFileExtension(HoodieLogFile.DELTA_EXTENSION)
+
             .withFileId("test-fileid1").overBaseCommit("100").withFs(fs).withSizeThreshold(3L * 1024 * 1024 * 1024)
             .build();
     Schema schema = getSimpleSchema();
@@ -600,7 +602,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
 
     assertEquals(scannedRecords.size(), allRecords.stream().mapToLong(Collection::size).sum(),
         "Scanner records count should be the same as appended records");
-
+    scanner.close();
   }
 
   @Test
@@ -833,6 +835,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         copyOfRecords1.stream().map(s -> ((GenericRecord) s).get(HoodieRecord.RECORD_KEY_METADATA_FIELD).toString())
             .collect(Collectors.toSet());
     assertEquals(originalKeys, readKeys, "CompositeAvroLogReader should return 200 records from 2 versions");
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -911,6 +914,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         copyOfRecords1.stream().map(s -> ((GenericRecord) s).get(HoodieRecord.RECORD_KEY_METADATA_FIELD).toString())
             .collect(Collectors.toSet());
     assertEquals(originalKeys, readKeys, "CompositeAvroLogReader should return 200 records from 2 versions");
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -998,6 +1002,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         copyOfRecords1.stream().map(s -> ((GenericRecord) s).get(HoodieRecord.RECORD_KEY_METADATA_FIELD).toString())
             .collect(Collectors.toSet());
     assertEquals(originalKeys, readKeys, "CompositeAvroLogReader should return 200 records from 2 versions");
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1099,6 +1104,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
     FileCreateUtils.deleteDeltaCommit(basePath, "102", fs);
 
     readKeys.clear();
+    scanner.close();
     scanner = HoodieMergedLogRecordScanner.newBuilder()
         .withFileSystem(fs)
         .withBasePath(basePath)
@@ -1232,6 +1238,8 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
     Collections.sort(originalKeys);
     Collections.sort(readKeys);
     assertEquals(originalKeys, readKeys, "HoodieMergedLogRecordScanner should return 180 records from 4 versions");
+    writer.close();
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1317,6 +1325,8 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
     scanner.forEach(s -> readKeys.add(s.getKey().getRecordKey()));
     assertEquals(0, readKeys.size(), "Stream collect should return all 0 records");
     FileCreateUtils.deleteDeltaCommit(basePath, "100", fs);
+    writer.close();
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1381,6 +1391,8 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         .build();
     assertEquals(0, scanner.getTotalLogRecords(), "We would read 0 records");
     FileCreateUtils.deleteDeltaCommit(basePath, "100", fs);
+    writer.close();
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1434,6 +1446,8 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
     final List<String> readKeys = new ArrayList<>(100);
     scanner.forEach(s -> readKeys.add(s.getKey().getRecordKey()));
     assertEquals(100, readKeys.size(), "Stream collect should return all 150 records");
+    writer.close();
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1501,6 +1515,8 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         .withBitCaskDiskMapCompressionEnabled(isCompressionEnabled)
         .build();
     assertEquals(0, scanner.getTotalLogRecords(), "We would read 0 records");
+    writer.close();
+    scanner.close();
   }
 
   @ParameterizedTest
@@ -1608,6 +1624,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
         .build();
     assertEquals(0, scanner.getTotalLogRecords(), "We would read 0 records");
     FileCreateUtils.deleteDeltaCommit(basePath, "100", fs);
+    scanner.close();
   }
 
   /*
@@ -1683,7 +1700,7 @@ public class TestHoodieLogFormat extends HoodieCommonTestHarness {
 
       assertEquals(Math.max(numRecordsInLog1, numRecordsInLog2), scanner.getNumMergedRecordsInLog(),
           "We would read 100 records");
-
+      scanner.close();
     } catch (Exception e) {
       e.printStackTrace();
     }