1
0
Commit Graph

415 Commits

Author SHA1 Message Date
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
tangyoupeng
def08d703d [MINOR] Support JuiceFileSystem (#3729) 2021-09-30 12:50:46 +08:00
zhangyue19921010
dd1bd62684 [HUDI-2277] HoodieDeltaStreamer reading ORC files directly using ORCDFSSource (#3413)
* add ORCDFSSource to support reading orc file into hudi format && add UTs

* remove ununsed import

* simplify tes

* code review

* code review

* code review

* code review

* code review

* code review

Co-authored-by: yuezhang <yuezhang@freewheel.tv>
2021-09-29 08:54:12 -07:00
Sivabalan Narayanan
f0585facd6 [HUDI-2474] Refreshing timeline for every operation in Hudi when metadata is enabled (#3698) 2021-09-28 05:16:52 -04:00
董可伦
36be287121 [MINOR] Fix typo,'Kakfa' corrected to 'Kafka' & 'parquest' corrected to 'parquet' (#3717) 2021-09-26 21:53:39 +08:00
Carl-Zhou-CN
aa546554ff [HUDI-2451] On windows client with hdfs server for wrong file separator (#3687)
Co-authored-by: yao.zhou <yao.zhou@linkflowtech.com>
2021-09-26 21:51:27 +08:00
Danny Chan
440525ccbb [HUDI-2483] Infer changelog mode for flink compactor (#3706) 2021-09-24 14:52:27 +08:00
Sagar Sumit
eeafd24f4c [HUDI-2395] Metadata tests rewrite (#3695)
- Added commit metadata infra to test table so that we can test entire metadata using test table itself. These tests don't care about the contents of files as such and hence we should be able to test all code paths for metadata using test table.

Co-authored-by: Sivabalan Narayanan <n.siva.b@gmail.com>
2021-09-23 15:40:11 -04:00
Sivabalan Narayanan
5091ab7311 [HUDI-2444] Fixing delete files corner cases wrt cleaning and rollback when applying changes to metadata (#3678) 2021-09-20 11:05:31 -04:00
Sivabalan Narayanan
b8dad628e5 [HUDI-2422] Adding rollback plan and rollback requested instant (#3651)
- This patch introduces rollback plan and rollback.requested instant. Rollback will be done in two phases, namely rollback plan and rollback action. In planning, we prepare the rollback plan and serialize it to rollback.requested. In the rollback action phase, we fetch details from the plan and just delete the files as per the plan. This will ensure final rollback commit metadata will contain all files that got rolled back even if rollback failed midway and retried again.
2021-09-16 11:16:06 -04:00
Y Ethan Guo
916f12b7dd [HUDI-2433] Refactor rollback actions in hudi-client module (#3664) 2021-09-15 18:52:43 -04:00
liujinhui
86a7351c39 [MINOR] Delete Redundant code (#3661) 2021-09-15 14:46:11 +08:00
liujinhui
9f3c4a2a7f [HUDI-2410] Fix getDefaultBootstrapIndexClass logical error (#3633) 2021-09-13 16:10:17 +08:00
Ankush Kanungo
4f991ee352 [HUDI-2398] Collect event time for inserts in DefaultHoodieRecordPayload (#3602) 2021-09-11 20:27:40 -07:00
zhangyue19921010
06240417e9 [HUDI-2354] Fix TimelineServer error because of replacecommit archive (#3536)
* bug fixed

* done

* done

* travis fix

* code reviewed

* code review

* done

* code reviewed

Co-authored-by: yuezhang <yuezhang@freewheel.tv>
2021-09-10 21:26:04 -07:00
rmahindra123
e528dd798a [HUDI-2394] Implement Kafka Sink Protocol for Hudi for Ingesting Immutable Data (#3592)
- Fixing packaging, naming of classes
 - Use of log4j over slf4j for uniformity
- More follow-on fixes
 - Added a version to control/coordinator events.
 - Eliminated the config added to write config
 - Fixed fetching of checkpoints based on table type
 - Clean up of naming, code placement

Co-authored-by: Rajesh Mahindra <rmahindra@Rajeshs-MacBook-Pro.local>
Co-authored-by: Vinoth Chandar <vinoth@apache.org>
2021-09-10 18:20:26 -07:00
Sagar Sumit
bd1d2d4952 [MINOR] Add avro schema evolution test with (non)nullable column and with(out) default value (#3639) 2021-09-10 22:03:35 +08:00
Y Ethan Guo
56d08fbe70 [HUDI-2351] Extract common FS and IO utils for marker mechanism (#3529) 2021-09-09 14:45:28 -04:00
Danny Chan
e9bf1c1186 [HUDI-2380] The default archive folder should be 'archived' (#3568) 2021-09-04 15:53:55 +08:00
Raymond Xu
6bd3ca98d6 [HUDI-1989] Fix flakiness in TestHoodieMergeOnReadTable (#3574)
* [HUDI-1989] Refactor clustering tests for MoR table

* refactor assertion helper

* add CheckedFunction

* SparkClientFunctionalTestHarness.java

* put back original test case

* move testcases out from TestHoodieMergeOnReadTable.java

* add TestHoodieSparkMergeOnReadTableRollback.java

* use SparkClientFunctionalTestHarness

* add tag
2021-09-03 13:17:17 -07:00
rmahindra123
d59c8044f8 [HUDI-2378] Add configs for common and pre validate (#3564)
Co-authored-by: Rajesh Mahindra <rmahindra@Rajeshs-MacBook-Pro.local>
2021-08-30 23:28:35 -04:00
董可伦
562e28f079 [HUDI-2365]Optimizing overwriteField method with Objects.equals (#3542)
Optimizing overwriteField method with Objects.equals
2021-08-27 17:17:22 +08:00
Danny Chan
0f39137ba8 [HUDI-2321] Use the caller classloader for ReflectionUtils (#3535)
Based on the discussion on stackoverflow:
https://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader

The Thread.currentThread().getContextClassLoader() should never be used
because the context classloader is not immutable, user can overwrite it
when thread switches, it is also nullable.

The objection here: https://stackoverflow.com/a/36228195 says the
Thread.currentThread().getContextClassLoader() is a JDK design error
and the context classloader is never suggested to be used. The API that
needs classloader should ask the user to set up the right classloader.
2021-08-26 21:00:30 +08:00
yuzhaojing
73fdcf37df [HUDI-2368] Catch Throwable in BoundedInMemoryExecutor (#3546)
Co-authored-by: 喻兆靖 <yuzhaojing@bilibili.com>
2021-08-26 20:34:05 +08:00
ayachi_nene
be57e42200 [HUDI-2366] fix too many logs (#3543) 2021-08-26 16:45:52 +08:00
Udit Mehrotra
e39d0a2f28 Keep non-conflicting names for common configs between DataSourceOptions and HoodieWriteConfig (#3511) 2021-08-20 02:42:59 -07:00
Udit Mehrotra
c350d05dd3 Restore 0.8.0 config keys with deprecated annotation (#3506)
Co-authored-by: Sagar Sumit <sagarsumit09@gmail.com>
Co-authored-by: Vinoth Chandar <vinoth@apache.org>
2021-08-19 13:36:40 -07:00
Sagar Sumit
b15c3cf9a9 [HUDI-1363] Include _hoodie_operation meta column in removeMetadataFields (#3501) 2021-08-19 07:03:54 -04:00
Udit Mehrotra
3e301196bf Moving to 0.10.0-SNAPSHOT on master branch. 2021-08-14 18:51:09 -07:00
Y Ethan Guo
23dca6c237 [HUDI-2268] Add upgrade and downgrade to and from 0.9.0 (#3470)
- Added upgrade and downgrade step to and from 0.9.0. Upgrade adds few table properties. Downgrade recreates timeline server based marker files if any.
2021-08-14 20:20:23 -04:00
Y Ethan Guo
9056c68744 [HUDI-2305] Add MARKERS.type and fix marker-based rollback (#3472)
- Rollback infers the directory structure and does rollback based on the strategy used while markers were written. "write markers type" in write config is used to determine marker strategy only for new writes.
2021-08-14 08:18:49 -04:00