1
0
Commit Graph

445 Commits

Author SHA1 Message Date
vinoth chandar
ae0c67d9fc [HUDI-2795] Add mechanism to safely update,delete and recover table properties (#4038)
* [HUDI-2795] Add mechanism to safely update,delete and recover table properties

  - Fail safe mechanism, that lets queries succeed off a backup file
  - Readers who are not upgraded to this version of code will just fail until recovery is done.
  - Added unit tests that exercises all these scenarios.
  - Adding CLI for recovery, updation to table command.
  - [Pending] Add some hash based verfication to ensure any rare partial writes for HDFS

* Fixing upgrade/downgrade infrastructure to use new updation method
2021-11-20 08:07:40 -08:00
wenningd
3dc6262437 [HUDI-2242] Add configuration inference logic for few options (#3359)
Co-authored-by: Wenning Ding <wenningd@amazon.com>
2021-11-19 19:38:38 -08:00
Manoj Govindassamy
c8617d9390 [HUDI-2472] Enabling metadata table for TestHoodieMergeOnReadTable and TestHoodieCompactor (#4023) 2021-11-19 20:02:21 -05:00
Manoj Govindassamy
459b34240b [HUDI-2593] Virtual keys support for metadata table (#3968)
- Metadata table today has virtual keys disabled, thereby populating the metafields
  for each record written out and increasing the overall storage space used. Hereby
  adding virtual keys support for metadata table so that metafields are disabled
  for metadata table records.

- Adding a custom KeyGenerator for Metadata table so as to not rely on the
  default Base/SimpleKeyGenerators which currently look for record key
  and partition field set in the table config.

- AbstractHoodieLogRecordReader's version of processing next data block and
  createHoodieRecord() will be a generic version and making the derived class
  HoodieMetadataMergedLogRecordReader take care of the special creation of
  records from explictly passed in partition names.
2021-11-19 18:11:29 -05:00
Sagar Sumit
eba354e922 [HUDI-2731] Make clustering work regardless of whether there are base… (#3970) 2021-11-19 11:09:08 -05:00
Danny Chan
7a00f867ae [HUDI-2791] Allows duplicate files for metadata commit (#4033) 2021-11-19 14:30:17 +08:00
wenningd
24def0b30d [HUDI-2362] Add external config file support (#3416)
Co-authored-by: Wenning Ding <wenningd@amazon.com>
2021-11-18 01:59:26 -08:00
Sivabalan Narayanan
2d3f2a3275 [HUDI-2734] Setting default metadata enable as false for Java (#4003) 2021-11-17 14:43:00 -05:00
Manoj Govindassamy
f715cf607f [HUDI-2716] InLineFS support for S3FS logs (#3977) 2021-11-17 13:59:38 -05:00
wenningd
1ee12cfa6f [HUDI-2314] Add support for DynamoDb based lock provider (#3486)
- Co-authored-by: Wenning Ding <wenningd@amazon.com>
- Co-authored-by: Sivabalan Narayanan <n.siva.b@gmail.com>
2021-11-17 12:09:31 -05:00
卢波
826414cff5 [MINOR] Add the Schema for GooseFS to StorageSchemes (#3982)
Co-authored-by: lubo <bollu@tencent.com>
2021-11-17 22:47:52 +08:00
zhangyue19921010
38b6934352 [HUDI-2683] Parallelize deleting archived hoodie commits (#3920)
Co-authored-by: yuezhang <yuezhang@freewheel.tv>
2021-11-15 22:36:54 +08:00
Sivabalan Narayanan
53d2d6ae24 [HUDI-2744] Fix parsing of metadadata table compaction timestamp when metrics are enabled (#3976) 2021-11-15 07:27:35 -05:00
Yann Byron
0bb6d8ff80 [HUDI-2706] refactor spark-sql to make consistent with DataFrame api (#3936) 2021-11-14 15:44:39 -08:00
Manoj Govindassamy
9720820975 [HUDI-2718] ExternalSpillableMap payload size re-estimation throws ArithmeticException (#3955)
- ExternalSpillableMap does the payload/value size estimation on the first put to
  determine when to spill over to disk map. The payload size re-estimation also
  happens after a minimum threshold of puts. This size re-estimation goes my the
  current in-memory map size for calculating average payload size and does attempts
  divide by zero operation when the map is size is empty. Avoiding the
  ArithmeticException during the payload size re-estimate by checking the map size
  upfront.
2021-11-12 08:18:40 -05:00
Sivabalan Narayanan
4f217fe718 [HUDI-2151] Part1 Setting default parallelism to 200 for some of write configs (#3948) 2021-11-12 07:29:37 -05:00
Yann Byron
90529aa552 [HUDI-2495] Resolve inconsistent key generation for timestamp types by GenericRecord and Row (#3944) 2021-11-11 11:54:34 +08:00
Prashant Wason
77b0440eb4 [HUDI-2634] Improved the metadata table bootstrap for very large tables. (#3873)
* [HUDI-2634] Improved the metadata table bootstrap for very large tables.

Following improvements are implemented:
1. Memory overhead reduction:
  - Existing code caches FileStatus for each file in memory.
  - Created a new class DirectoryInfo which is used to cache a director's file list with parts of the FileStatus (only filename and file len). This reduces the memory requirements.

2. Improved parallelism:
  - Existing code collects all the listing to the Driver and then creates HoodieRecord on the Driver.
  - This takes a long time for large tables (11million HoodieRecords to be created)
  - Created a new function in SparkRDDWriteClient specifically for bootstrap commit. In it, the HoodieRecord creation is parallelized across executors so it completes fast.

3. Fixed setting to limit the number of parallel listings:
  - Existing code had a bug wherein 1500 executors were hardcoded to perform listing. This leads to exception due to limit in the spark's result memory.
  - Corrected the use of the config.

Result:
Dataset has 1299 partitions and 12Million files.
file listing time=1.5mins
HoodieRecord creation time=13seconds
deltacommit duration=2.6mins

Co-authored-by: Sivabalan Narayanan <n.siva.b@gmail.com>
2021-11-10 22:37:48 -05:00
yuzhaojing
2d362af00a [HUDI-2730] Move EventTimeAvroPayload into hudi-common module (#3959)
Co-authored-by: yuzhaojing <yuzhaojing@bytedance.com>
2021-11-10 20:22:24 +08:00
Shawy Geng
fd0f5df26d [HUDI-2297] Estimate available memory size for spillable map accurately. (#3455) 2021-11-10 14:05:12 +08:00
Danny Chan
e057a10499 [HUDI-2715] The BitCaskDiskMap iterator may cause memory leak (#3951) 2021-11-09 15:40:00 +08:00
manasaks
e0285800fb HUDI-1827 : Add ORC support in Bootstrap Op (#3457)
Co-authored-by: Sivabalan Narayanan <n.siva.b@gmail.com>
2021-11-06 12:23:20 -04:00
Prashant Wason
b7ee341e14 [HUDI-1794] Moved static COMMIT_FORMATTER to thread local variable as SimpleDateFormat is not thread safe. (#2819) 2021-11-05 09:31:42 -04:00
peanut-chenzhong
f2fb1aac26 [HUDI-2509] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column (#3761)
Co-authored-by: 502395931@qq.com <lzyadam315>
2021-11-03 08:23:40 -04:00
Yann Byron
6351e5f4d0 [HUDI-2538] persist some configs to hoodie.properties when the first write (#3823) 2021-11-03 10:04:23 +08:00
Yann Byron
1f17467f73 [HUDI-1869] Upgrading Spark3 To 3.1 (#3844)
Co-authored-by: pengzhiwei <pengzhiwei2015@icloud.com>
2021-11-02 18:25:12 -07:00
xiarixiaoyao
d194643b49 [HUDI-2101][RFC-28] support z-order for hudi (#3330)
* [HUDI-2101]support z-order for hudi

* Renaming some configs for consistency/simplicity.

* Minor code cleanups

Co-authored-by: Vinoth Chandar <vinoth@apache.org>
2021-11-02 09:31:57 -07:00
董可伦
f239187da8 [HUDI-2515] Add close when producing records failed (#3746) 2021-11-02 07:43:20 -04:00
Sivabalan Narayanan
35111131c3 [HUDI-2005] Fixing partition path creation in AbstractTableFileSystemView (#3769) 2021-11-02 00:16:45 -04:00
Sagar Sumit
5302b9a4ef [HUDI-2662] Downloads from Nexus Pentaho repo taking too long (#3901)
Co-authored-by: Sivabalan Narayanan <n.siva.b@gmail.com>
2021-11-01 19:14:48 -04:00
Manoj Govindassamy
f6326693ef [HUDI-1295] Hash ID generator util for Hudi table columns, partition and files (#3884)
* [HUDI-1295] Hash ID generator util for Hudi table columns, partition and files

- Adding a new utility class HashID to generate 32,64,128 bits hashes for any
  given message of string or byte array type. This class internally uses
  MessageDigest and xxhash libraries.

- Adding stateful hash holders for Hudi table columns, partition and files to
  pass around for metaindex and to convert to base64encoded strings whenever
  needed
2021-10-29 19:19:38 -04:00
Sivabalan Narayanan
69ee790a47 [HUDI-1294] Adding inline read and seek based read(batch get) for hfile log blocks in metadata table (#3762) 2021-10-29 12:12:44 -04:00
Y Ethan Guo
0223c442ec [HUDI-2502] Refactor index in hudi-client module (#3778)
- Refactor Index to reduce Line of Code and re-use across engines.
2021-10-28 04:16:00 -04:00
Pratyaksh Sharma
ae000795d7 [HUDI-1475]: fixed java doc for precombine api (#3867) 2021-10-26 15:15:20 -07:00
Sivabalan Narayanan
e3fc74668f [HUDI-2625] Revert "[HUDI-2005] Avoiding direct fs calls in HoodieLogFileReader (#3757)" (#3863)
This reverts commit 1bb0532563.
2021-10-25 21:43:15 -04:00
董可伦
4b5512e685 [MINOR] Fix typo,'deseralized' corrected to 'deserialized' & 'Kyro' corrected to 'Kryo' (#3846) 2021-10-25 09:56:47 -04:00
Sivabalan Narayanan
1bb0532563 [HUDI-2005] Avoiding direct fs calls in HoodieLogFileReader (#3757) 2021-10-25 01:21:08 -04:00
Raymond Xu
d8560377c3 [HUDI-2077] Fix TestHoodieDeltaStreamerWithMultiWriter (#3849)
Remove the logic of using deltastreamer to prep test table. Use fixture (compressed test table) instead.
2021-10-24 21:14:39 -07:00
Y Ethan Guo
5ed35bff83 [HUDI-2501] Add HoodieData abstraction and refactor compaction actions in hudi-client module (#3741) 2021-10-22 15:58:51 -04:00
Matrix42
499af7c039 [HUDI-2592] Fix write empty array when write.precombine.field is decimal type (#3837) 2021-10-22 19:42:13 +08:00
Manoj Govindassamy
84ca981cd0 [HUDI-2553] Metadata table compaction trigger max delta commits (#3794)
-  Setting the max delta commits default value from 24 to 10 to trigger the compaction in metadata table.
2021-10-21 13:09:37 -04:00
Manoj Govindassamy
b68c5a68f9 [HUDI-2472] Fix few Cleaner tests with metadata table enabled (#3825) 2021-10-20 18:57:00 -04:00
Manoj Govindassamy
335e80ea1b [HUDI-2561] BitCaskDiskMap - avoiding hostname resolution when logging messages (#3811)
- InetAddress.getLocalHost() can take up as much as 30+seconds if the network
   configurations are not done right. This might be due to local hostname
   missing IPv6 address mapping in /etc/hosts or network configs slowing down
   any IPv6 name resolutions. If this API is used for logging verbose messages
   and that too in the hot code path, it can lead to order of magnitude
   slowness in the overall task completion.
2021-10-18 10:07:53 -07:00
Danny Chan
2eda3de7f9 [HUDI-2562] Embedded timeline server on JobManager (#3812) 2021-10-18 10:45:39 +08:00
Danny Chan
abf3e3fe71 [HUDI-2548] Flink streaming reader misses the rolling over file handles (#3787) 2021-10-14 10:36:18 +08:00
Sivabalan Narayanan
cff384d23f [HUDI-2552] Fixing some test failures to unblock broken CI master (#3793) 2021-10-13 18:44:43 -04:00
Manoj Govindassamy
252c4ed380 [HUDI-2532] Metadata table compaction trigger max delta commits (#3784)
-  Setting the max delta commits default value from 24 to 10 to trigger the
     compaction in metadata table.
2021-10-12 09:49:42 -04:00
Yann Byron
e91e611afb [HUDI-2456] support 'show partitions' sql (#3693) 2021-10-06 15:46:49 +08:00
Sivabalan Narayanan
5f32162a2f [HUDI-2285][HUDI-2476] Metadata table synchronous design. Rebased and Squashed from pull/3426 (#3590)
* [HUDI-2285] Adding Synchronous updates to metadata before completion of commits in data timelime.

- This patch adds synchronous updates to metadata table. In other words, every write is first committed to metadata table followed by data table. While reading metadata table, we ignore any delta commits that are present only in metadata table and not in data table timeline.
- Compaction of metadata table is fenced by the condition that we trigger compaction only when there are no inflight requests in datatable. This ensures that all base files in metadata table is always in sync with data table(w/o any holes) and only there could be some extra invalid commits among delta log files in metadata table.
- Due to this, archival of data table also fences itself up until compacted instant in metadata table.
All writes to metadata table happens within the datatable lock. So, metadata table works in one writer mode only. This might be tough to loosen since all writers write to same FILES partition and so, will result in a conflict anyways.
- As part of this, have added acquiring locks in data table for those operations which were not before while committing (rollback, clean, compaction, cluster). To note, we were not doing any conflict resolution. All we are doing here is to commit by taking a lock. So that all writes to metadata table is always a single writer. 
- Also added building block to add buckets for partitions, which will be leveraged by other indexes like record level index, etc. For now, FILES partition has only one bucket. In general, any number of buckets per partition is allowed and each partition has a fixed fileId prefix with incremental suffix for each bucket within each partition.
Have fixed [HUDI-2476]. This fix is about retrying a failed compaction if it succeeded in metadata for first time, but failed w/ data table.
- Enabling metadata table by default.
- Adding more tests for metadata table

Co-authored-by: Prashant Wason <pwason@uber.com>
2021-10-06 00:17:52 -04:00
Y Ethan Guo
46808dcb1f [HUDI-2497] Refactor clean and restore actions in hudi-client module (#3734) 2021-09-30 18:20:25 -04:00