Commit Graph

139 Commits

Author SHA1 Message Date
cb7e8ff2bb Fix compile failure in ScanNode (#384) 2018-12-04 16:51:48 +08:00
31d1630149 Support 'NO_BACKSLASH_ESCAPES' sql_mode (#382) 2018-12-04 11:33:04 +08:00
d9eb8a2ca1 Fix cast error in BrokerScanNode (#383) 2018-12-04 11:30:03 +08:00
c556ed13f6 Support TRUNCATE TABLE stmt (#377)
* Support TRUNCATE TABLE stmt

User can use TRUNCATE TABLE stmt to empties a table
or partitions completely.
Unlike DELETE, it will drop the tablets directly, and
without any performance impact.

* Fix bugs that new partition should use new ID

* Use equals() to compare Integer

* Fix compile bug

* Fix bug on single range parititon

* Check table's state again after creating partition
2018-12-01 21:18:27 +08:00
9447a349ec Subsititue ColumnType to Type (#366)
* Subsititue ColumnType to Type
2018-11-30 16:30:30 +08:00
5694bcbd78 Fix stream load failure when target table contains HLL and insert failure when it contains subquery (#359) 2018-11-29 15:40:04 +08:00
f1718578f3 Fix insert error when it contains HLL (#358) 2018-11-27 17:10:41 +08:00
cfefa71daa Fix cast error in StreamLoadScanNodeush (#356) 2018-11-27 16:03:33 +08:00
b2d89dfee9 Add connection id to CurrentQueryStatisticsProcDir (#355) 2018-11-27 14:28:39 +08:00
cddd864d83 Avoid 'No more data to read' error when handling stream load RPC (#354)
* Avoid 'No more data to read' error when handling stream load rpc

1. Catch throwable of all stream load rpc.
2. Avoid setting null string as error msg of rpc result status.

* Change setError_msgs to addToError_msgs
2018-11-27 14:18:41 +08:00
dedfccfaf5 Optimize the publish logic of streaming load (#350)
1. Only collect all error replicas if publish task is timeout.
2. Add 2 metrics to monitor the success of failure of txn.
3. Change publish timeout to Config.load_straggler_wait_second
2018-11-26 19:01:50 +08:00
bbdf4fba4a Add distributor which schedule task to be fairly, for routine load job (#333)
Step1: updateBeIdTaskMaps, remove unavailable BE and add new alive BE
Step2: process timeout tasks, if a task has already been allocated to BE but not finished before DEFAULT_TASK_TIMEOUT, it will be discarded.
       At the same time, the partitions belong to old tasks will be allocated to a new task. The new task with a signature will be added in the queue of needSchedulerRoutineLoadTask.
Step3: process all needSchedulerRoutineLoadTasks, allocate task to BE. The task will be executed by BE.
2018-11-23 10:35:10 +08:00
485db34f1e Modify partition's version name to what it means (#334)
* Modify partition's version name to what it means.

1. committedVersion(Hash) -> visibleVersion(Hash)
2. currentVersion(Hash) -> committedVersion(Hash)
3. add some comment to make the code more readable

* Check if editlog is null in CatalogIdGenerator
    To avoid unit test failure
2018-11-21 19:21:16 +08:00
791e89568e Change PaloMetrics' name and Catalog's Id generator (#329)
* Change PaloMetrics' name and Catalog's Id generator
1. Remove 'Palo' prefix of class Metric.
2. Add a new CatalogIdGenerator to replace the old AtomicLong, to avoid too many edit logs.
3. Add a new histogram to monitor write letency of edit log write.

* modify next id logic

* fix a bug that Metric is not init before using HISTO_EDIT_LOG_WRITE_LATENCY

* fix a problem
2018-11-20 18:59:18 +08:00
9a2ad18428 Add path info of replica in catalog (#327)
Add path info of replica in catalog

Also fix a bug that when calling check_none_row_oriented_table,
store is null, it cannot be used to create table.
Instead, OLAPHeader can be used to get storage type information.
2018-11-19 17:42:46 +08:00
44029937e4 Add scheduler routine load job for stream load (#313)
1. fetch need_scheduler routine load job
2. caculate current concurrent task number of job
3. divide kafka partition into tasks
2018-11-15 21:04:22 +08:00
8ac9492b11 Fix SHOW BACKENDS return ERROR (#320)
In some case, errMsg in Backend maybe null. we change it when check it
nut null

Issue: #317
2018-11-15 20:14:39 +08:00
d7ee57e881 Optimize quota unit (#309)
Originally, we can only set quota in bytes unit. This commit add quota unit:K/KB/M/MB/G/GB/T/TB/P/PB
for convenience.
2018-11-15 14:03:52 +08:00
063f7d7a9a Fix code LICENSE for file modified from LevelDB. (#300) 2018-11-12 16:09:40 +08:00
ae8d16c81e Fix failed cases in regression test (#299) 2018-11-12 11:15:39 +08:00
2081b7fea5 Be compatible with old RPC (#296)
Add palo.PInternalService which can server old version palo's client.

Issue: #293
2018-11-10 15:46:45 +08:00
6f206ae9c6 Fix some license (#290) 2018-11-09 14:30:09 +08:00
1d8fc4bb69 Improve cardinality, avgRowSize, numNodes stat info in OlapScanNode (#256)
Currently, the cardinality, avgRowSize, numNodes stat info in OlapScanNode is none, So the broadcastCost and partitionCost are both wrong and Doris couldn't auto choose a best join strategy.

So we should make the statistical information in OlapScanNode more precise.
2018-11-07 13:59:05 +08:00
fc8f78d81c Fix unit test failure (#286) 2018-11-07 12:53:11 +08:00
0c4edc2b3c Fix BE can't be grayscale upgraded (#285) 2018-11-07 09:34:39 +08:00
370e73ce5d Fix truncation error in CastExpr (#283) 2018-11-06 18:57:13 +08:00
8d7bd01a71 Simplify constant Expr (#255)
Simplify constant Expr could improve Partition Pruning. The examples for constant Expr Simplifing:

1 + 1 + 1 --> 3
date_add('2018-08-08', 1) --> 2018-08-09
year('2018-07-24')*12 + month('2018-07-24') -> 24223
2018-11-06 17:24:54 +08:00
acb332833a Fix view missed parenthesis bug (#253) 2018-11-06 15:25:40 +08:00
cb36e411e9 Support AnalyticExpr in View (#248) 2018-11-05 20:39:21 +08:00
8b665a41c8 Support NULLS LAST and NULLS FIRST syntax (#252)
Allow User specify the null ordering

NULLS FIRST: specifies that NULL values should be returned before
non-NULL values.
NULLS LAST: specifies that NULL values should be returned after
non-NULL values.
2018-11-05 20:35:10 +08:00
9ae631adb6 Fix InsertStmt reAnalyze bug (#251) 2018-11-05 15:36:40 +08:00
69f3b02485 Fix a bug that user can not kill it own connection (#276) 2018-11-02 16:36:59 +08:00
312dfd10bb Change SQL built-in function's symbol (#274) 2018-11-02 16:24:21 +08:00
847d29e394 Delete useless debug log (#250) 2018-11-02 16:06:01 +08:00
c92892bbb9 Fix UnionStmt toSql bug (#249) 2018-11-02 14:50:09 +08:00
ad12d907da Failed to register equal conjuncts which refer more than three tuples (#266)
Change-Id: I7eaf28ee6db35671971108f3edefe908d46ae87f
2018-11-01 20:34:48 +08:00
cccd1292fe Make class name compatible with the old name (#267)
We wrote the old name 'com.baidu.palo.xxx' in bdbje as meta journal.
So we need to make it compatible with 'org.apache.doris.xxx'.
2018-11-01 19:23:10 +08:00
2a290048c7 Change the lock type of Catalog lock (#265)
* Change the lock type of Catalog lock

Implement a QueryableReentrantLock to see which thread held the lock.

* Key in empty version has no min/max value

It should be ignored to reconstruct min/max statistics upon restart.
2018-11-01 16:33:09 +08:00
2868793b6b Change license to Apache License 2.0 (#262) 2018-11-01 09:06:01 +08:00
06413999e5 Fix some compile and script errors (#259)
1. Fix error class in start_fe.sh and start_broker.sh.
2. Add log4j2.xml in fe/src/test/resources/ to run fe ut without log4j warnings.
3. Reduce the test file size in be ut.
2018-10-31 19:45:21 +08:00
2be7991561 Change com.baidu.palo to org.apache.doris
Change some package names in fe/fs_brokers/gensrc dir.
2018-10-31 17:07:16 +08:00
051aced48d Missing many files in last commit
In last commit, a lot of files has been missed
2018-10-31 16:19:21 +08:00
5d3fc80067 Added:
* Add streaming load feature. You can execute 'help stream load;' to see more information.

Changed:
* Loading phase of a certain table can be parallelized, to reduce the load job execution time when multi load jobs to a single table.
* Using RocksDB to save the header info of tablets in Backends, to reduce the IO operations and increate speeding of restarting.

Fixed:
* A lot of bugs fixed.
2018-10-31 14:46:22 +08:00
ae9ce81453 Changed: change build.sh to use environment variable to get thirdparty's
path, and change PALO_HOME to DORIS_HOME
2018-10-30 16:29:06 +08:00
68d663fe7a Changed: change the compilation method of Frontend and Apache hdfs broker from ANT to MAVEN 2018-10-27 11:35:20 +08:00
4f6f8572de Added: Add 3 new metrics of Backends: host_fd_metrics, process_fd_metrics and process_thread_metrics, to monitor open file number and thread number.
Added: Support getting column size and precision info of table or view using JDBC.

Updated: Change the promethues type name GAUGE to lowercase, to fit the latest promethues version.
Updated: Backend ip saved in FE will be compared with BE's local ip when doing heartbeat, to avoid false positive heartbeat response.
Updated: Using version_num of tablet instead of calculating nice value to select cumulative compaction candicates.

Fixed: Predicates should not be pushed down to subquery which contains limit clause.
Fixed: Fix the formula of calculating BE load score.
Fixed: Fix a bug that in some edge cases, non-master Fontend may wait for a unnecessary long timeout after forwarding cmd to Master FE.
Fixed: A bug that granting privs on more than one table does not work.
Fixed: Support 'Insert into' table which contains HLL columns.
Fixed: ExportStmt' toSql() method may throw NullPointer Exception if table does not exist.
Fixed: Remove unnecessary 'get capacity' operation to avoid IO impact.

Internal commit id: merge to c16bd603a53dfe2089ff95704c698a738c317792
2018-10-26 14:48:21 +08:00
65fe7f65c1 Fixed: privilege logic error:
1. No one can set root password expect for root user itself
    2. NODE_PRIV cannot be granted.
    3. ADMIN_PRIV and GRANT_PRIV can only be granted or revoked on *.*
    4. No one can modifly privs of default role 'operator' and 'admin'.
    5. No user can be granted to role 'operator'.
Fixed: the running load limit should not be applied to replay logic. It will cause replay or loading image fail.
Changed: optimize the problem of too many directories under mini load directory.
Fixed: missing password and auth check when handling mini load request in Frontend.
Fixed: DomainResolver should start after Frontends transfer to a certain ROLE, not in Catalog construction methods.
Fixed: a stupid bug that no one can set password for root user... fix it: only root user can set password for root.
Fixed: read null data twice
    When reading data with a null value, in some cases, the same data will be read twice by the storage engine,
    resulting in a wrong result.The reason for this problem is that when splitting,
    and the start key is the minimum value, the data with null is read.
Fixed: add a flag to prevent DomainResovler thread start twice.
Fixed: fixed a mem leak of using ByteBuf when parsing auth info of http request.
Fixed: add a new config 'disable_hadoop_load', default is false, set to true to disable hadoop load.
Changed: add detail error msg of submitting hadoop load job in show load result.
Fixed: Backend process should be crashed if failed to saving header.
Added: exposure backend info to user when encounter error on Backend. for debugging it more convenient.
Fixed: Should remove fd from map when inputstream or outputstream is closed in Broker process.
Fixed: Change all files' LF to unix format.

Internal commit id: merge from dfcd0aca18eed9ff99d188eb3d01c60d419be1b8
2018-10-01 19:58:41 +08:00
bea10e4f06 1. hide password and other sensitive information in log and audit log
2. add 2 new proc '/current_queries' and '/current_backend_instances' to monitor the current running queries.
3. add a manual compaction api on Backend to trigger cumulative or base compaction manually.
4. add Frontend config 'max_bytes_per_broker_scanner' to limit to bytes per one broker scanner. This is to limit the memory cost of a single broker load job
5. add Frontend config 'max_unfinished_load_job' to limit load job number: if number of running load jobs exceed the limit, no more load job is allowed to be submmitted.
6. a log of bug fixed
2018-09-19 20:04:01 +08:00
f3a6f23da8 merge to 055ce846df2efc25ac32b1fa486f83af91341a04 (#225)
change backends proc column title name FreeSpace to UsedSpace
2018-08-24 17:53:48 +08:00
cc74efb3c5 merge to ddb65b69f9c788e359e191889cb31f15279c41ec (#224)
1. Apache HDFS broker support HDFS HA and Hadoop kerberos authentication.
2. New Backup and Restore function. Use Fs Broker to backup your data to HDFS or restore them from HDFS.
3. Table-Level Privileges. Grant fine-grained privileges on table-level to specified user.
4. A lot of bugs fixed.
5. Performance improvement.
2018-08-24 17:12:26 +08:00