Commit Graph

13073 Commits

Author SHA1 Message Date
176e185e18 Add broker doc (#1662)
This broker document introduces the properties for different broker types.
2019-08-20 17:18:54 +08:00
8e6814cfcd Support setting timeout for stream load (#1670) 2019-08-20 15:43:03 +08:00
3b80ea3438 Change WriteLock to ReadLock when report tablet status (#1673) 2019-08-20 12:34:33 +08:00
ccaf39c48f Fix spelling mistake (#1676) 2019-08-20 12:16:55 +08:00
851b2ca3bd Remove unused code in StorageEngine (#1671) 2019-08-20 10:50:07 +08:00
731f78accc Don't persisted the data source info in broker load (#1665) 2019-08-19 15:45:21 +08:00
cd2b8373c2 Fix Stream load double NumberTotalRows (#1664) 2019-08-19 12:23:43 +08:00
acf868c9d0 Support page compression and checksum in BetaRowset (#1646) 2019-08-19 09:40:47 +08:00
ba6d728f26 Enable parsing columns from file path for Broker Load (#1582) (#1635)
Currently, we do not support parsing encoded/compressed columns in file path, eg: extract column k1 from file path /path/to/dir/k1=1/xxx.csv

This patch is able to parse columns from file path like in Spark(Partition Discovery).

This patch parse partition columns at BrokerScanNode.java and save parsing result of each file path as a property of TBrokerRangeDesc, then the broker reader of BE can read the value of specified partition column.
2019-08-19 09:39:21 +08:00
6d73658207 Support checking error data row when doing INSERT (#1597)
If strict mode is true, and at least one row is filtered, the insert operation will fail and a url will be given to get the error rows.

```
ERROR 1064 (HY000): all partitions have no load data. url: http://host:ip/api/_load_error_log?file=__shard_2/error_log_insert_stmt_e0a620e93dc54461-b89ec64768367d25_e0a620e93dc54461_b89ec64768367d25
```

 If all rows are good, insert will return OK with affected rows:

```
Query OK, 1 row affected (0.26 sec)
```

If strict mode is false, and at least one row is good, the insert operation will return OK with affected rows and warnings. If has error row num, a label will be returned:

```
Query OK, 1 row affected, 1 warning (0.32 sec)
{'label':'7d66c457-658b-4a3e-bdcf-8beee872ef2c'}
```
2019-08-16 21:40:29 +08:00
82d0afc1ba FROM_UNIXTIME should only convert timestamp from 0 to 253402271999 (#1658)
which is between 1970-01-01 00:00:00 ~ 9999-12-31 23:59:59, otherwise, return null
2019-08-16 18:29:57 +08:00
57a1a718c7 print logs when parse scroll result failed (#1661) 2019-08-16 17:48:23 +08:00
0e6560ceca Fix document typo (#1657) 2019-08-16 14:52:32 +08:00
1ed25ad83d Add kafka_default_offsets when no partiotion specify
Support read kafka partition from start (#1642)
2019-08-16 13:30:26 +08:00
b85bd334de Remove tempory fail UT (#1659) 2019-08-16 11:26:41 +08:00
4f27129368 Fix get label when use StreamLoad (#1655) 2019-08-16 09:56:20 +08:00
b94892082b Use same dir during schema change (#1653) 2019-08-15 18:20:09 +08:00
a551abba58 Modify timediff documents (#1600) 2019-08-15 12:45:53 +08:00
38c82c039f Prepare _input_row_num and _input_rowsets_size before compaction (#1643) 2019-08-14 22:54:27 +08:00
4cc2285094 Make http server and thrift server backlog num configurable (#1638) 2019-08-14 19:58:48 +08:00
85e89b79d5 Print src tuple in error_sample file (#1641)
The src tuple could not be print in error_sample file when the value is filtered by strict mode.
This commit fix this issue.
2019-08-14 19:58:09 +08:00
cc7a2a3eb8 Check all tablet using partition tablet map during publish version (#1619) 2019-08-14 18:24:52 +08:00
03b99ddd37 Fix bug that bad replica can not be synchronized when report (#1634)
When the replica is recovered from bad on BE, the report process
should change the bad status of replica on FE to false, or the replica
can not be recovered.
2019-08-14 09:49:44 +08:00
199ff968dc Fix time zone compatibility (#1631) 2019-08-13 18:44:35 +08:00
dcb75729db Change cumulative compaction for decoupling storage from compution (#1576)
1. Calculate cumulative point when loading tablet first time.
2. Simplify pick rowsets logic upon delete predicate.
3. Saving meta and modify rowsets only once after cumulative compaction.
2019-08-13 18:25:56 +08:00
582c313190 Fix HLLContext cast error (#1632) 2019-08-13 14:38:21 +08:00
780a255112 Change the prefix of table info apis (#1625)
The pathtrie could not distinguish the different param key with the same prefix path.
So the prefix of table info apis has been change to /api/external which is used by spark-doris-connector.
2019-08-13 11:30:32 +08:00
032d0b41bb Fix compile error (#1630) 2019-08-13 10:00:18 +08:00
c8352a9e4d Insert select Stmt keep the same semantics with mysql (#1626) (#1628) 2019-08-13 09:56:26 +08:00
1e2a4c3b9b Fix tablet restore api in BE(#1623) (#1624) 2019-08-13 09:34:24 +08:00
69af50aa8c Time zone related BE function (#1598)
Details can be found in time-zone.md document
2019-08-12 20:57:59 +08:00
c0253a17fc Add block compression codec and remove not used codec (#1622) 2019-08-12 20:47:16 +08:00
af8256be2a Implement BetaRowsetWriter (#1590)
BetaRowsetWriter is used to write rowset in V2 segment format.

This PR contains several interface changes
1. Rowset.make_snapshot() is renamed to `link_files_to` because hard links are also useful in copy task, linked schema change, etc
2. Rowset.copy_files_to_path() is renamed to `copy_files_to` to be consistent with other names
3. RowsetWriter.mem_pool() is removed because not all rowset writers use MemPool
4. RowsetWriter.garbage_collection() is removed because it's not used by clients
5. SegmentGroup's make_snapshot() is removed because link_segments_to_path() provides similar functionality
2019-08-12 16:41:47 +08:00
3080139e78 Avoid load or query failed when doing alter job
2 cases:

Sometimes a missing version replica can not be repaired. Which may cause query failed
with error: failed to initialize storage reader. tablet=xxx, res=-214

Cancel the rollup job when there are load jobs on that table may cause load job fail.
We should ignore "table not found" exception when committing the txn.
2019-08-12 16:27:34 +08:00
b4ba77a594 Fix bug that encounter "No more data to read" when accessing broker (#1621)
The errorMsg in TBrokerOperationStatus is set to null because of
invalid string joint operation.
2019-08-12 14:06:47 +08:00
2bd01b23c7 Add page cache for column page in BetaRowset (#1607) 2019-08-12 10:42:00 +08:00
cf2155cf45 Add spark-doric-connector overview (#1526) 2019-08-11 13:00:16 +08:00
e3348c46a9 Expose data pruned-filter-scan ability (#1527) 2019-08-11 12:59:24 +08:00
add6266c71 Broker load supports function (#1592)
* Broker load supports function
The commit support the column function in broker load.
The grammar of LoadStmt has not been changed.
Example:
columns terminated by ',' (tmp_c1, tmp_c2) set (c1=tmp_c1+tmp_c2)

Also, the old function is compatible such as default_value, strftime etc.
After this commit, there are no difference in column function between stream load and broker load except old function.
2019-08-09 13:27:31 +08:00
a6d3099a68 Fix bug: localtime is not thread-safe,then changed to localtime_r. (#1614) 2019-08-08 22:00:43 +08:00
69de5df167 Fix bug that cluster balance may cause load job failed (#1581)
The bug is described in issue #1580 . And this patch will fix 2 cases of cluster balance

After finish adding the new replica, the new replica's version may not catch up with
the visible version, so the new replica may be treated as a stale and redundant replica, which
will be deleting at next tablet checking round.

I add a mark named needFurtherRepair to the newly added replica, only mark it when that replica's version does not catch up with visible version. This replica will receive a further repair at next tablet checking round, instead of being deleted.

When deleting the redundant replicas, there may be some load jobs on it. Delete these replicas may cause the load job fail.

Before deleting a redundant replica, I first mark the next txn id on that replica, and set replica's
state to CLONE. The CLONE state will ensure that no more load jobs will be on that replica, and we
will wait all load jobs before the marked txn id to be finished. After that, the replica can be deleted safely.
2019-08-08 18:38:30 +08:00
326d765c64 Add doc of modify replication num upon partition (#1611) 2019-08-08 16:47:32 +08:00
f4ad2381e6 Fix error DCHECK for partition_columns (#1606) 2019-08-08 16:29:08 +08:00
fd2accbcf9 Modify some docs' format to make it work with document website (#1604) 2019-08-08 14:47:38 +08:00
b937887133 Include header file for ‘preadv' which caused break build on ubuntu 18.04 (#1602) 2019-08-08 09:30:21 +08:00
60d997fe67 Fix errors when ES username and passwd is empty (#1601) 2019-08-08 09:29:23 +08:00
4c2a3d6da4 Merge Help document to documentation (#1586)
Help document collation (integration of help and documentation documents)
2019-08-07 21:31:53 +08:00
41cbedf57d Manage tablet by partition id (#1591) 2019-08-07 20:54:50 +08:00
dc4a5e6c10 Support Decimal Type when load Parquet File (#1595) 2019-08-07 19:52:23 +08:00
9402456f5b Fix parquet directory have empty file (#1593) 2019-08-07 15:08:22 +08:00