Commit Graph

572 Commits

Author SHA1 Message Date
b2a022b348 Add money_format function (#1064) 2019-04-29 18:31:24 +08:00
9a570af9a3 Add insert statement document (#1069) 2019-04-29 14:22:20 +08:00
310a375aec Fix bug that null value is not correctly handled when loading data (#1070)
When partition column's value is NULL, it should be loaded into
    the partition which include MIN VALUE
2019-04-29 13:55:28 +08:00
77ceef6391 Support insert values (#1067)
* Support insert into values

* Fix hll import bug

* Fix insert subquery fail
2019-04-29 10:39:01 +08:00
1662d91877 Change the logic of RoutineLoadTaskScheduler (#1061)
1. TaskScheduler will process one task per round
2. TaskScheduler will be blocked till queue tasks a new task
3. TaskScheduler will submit tasks when queue is empty
4. Add a example of creating a broker table by BOS
5. Change syntax of show routine load job
2019-04-28 20:05:48 +08:00
9c82d41981 Support Doris query ES by HTTP way (#925) 2019-04-28 17:14:44 +08:00
4559bc3558 Change transaction timeout default configuration (#1060) 2019-04-28 16:42:19 +08:00
60df7cdb8d fix ut bug (#1051) 2019-04-28 10:33:50 +08:00
5e36a769a0 Change the way to calculate task num (#1049) 2019-04-28 10:33:50 +08:00
0adb150da7 Fix ut bugs (#1046)
Also fix a metrics collection bug
2019-04-28 10:33:50 +08:00
4e5197ba52 Modify transaction proc info (#1029)
1. Add running/finished state proc to show specified state txns.
2. Add max disk used percent info in backends proc dir.

* add missing file

* fix bug

* Update fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java

Co-Authored-By: morningman <morningman@163.com>

* Update fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java

Co-Authored-By: morningman <morningman@163.com>
2019-04-28 10:33:50 +08:00
4a95c53f07 Fix bug of listener (#1017)
* Fix bug of listener

* Change txnStateChangeListener to txnStateChangeCallback

* Fix the logic of beforeAborted
1. It task is not belong to job, the txn attachment will be set to null.
* Txn will be abort normally without attachment.
* Job will not be updated by this task which attachment is null.
2019-04-28 10:33:50 +08:00
9cd090c96a Modify routine load doc (#1016)
Add config specification
2019-04-28 10:33:50 +08:00
cf1e7aa844 Add close tablet writer log (#1014) 2019-04-28 10:33:50 +08:00
7f39738b08 Change log tips (#1002) 2019-04-28 10:33:50 +08:00
3409ed41ac Reset commit offset if task aborted due to runtime error (#994) 2019-04-28 10:33:50 +08:00
a79bd0c771 Add doc of auto creator of kafka topic (#985)
* Add annotation of show routine load
2019-04-28 10:33:50 +08:00
1b5643c6fb Fix some bugs (#979)
1. Add Config.max_routine_load_concurrent_task_num instead of the old one
2. Fix a bug that SHOW ALTER TABLE COLUMN may throw Nullpointer exception
3. Fix some misspelling of docs
2019-04-28 10:33:50 +08:00
56bec6f22a Add routine load manual (#967) 2019-04-28 10:33:50 +08:00
b7b66527ce Fix some load bugs (#961)
1. Use load job's timeout as its txn timeout
2. Add a new session variable 'forward_to_master' for SHOW PROC and ADMIN stmt
2019-04-28 10:33:50 +08:00
e352a08339 Change tips of show routine load task (#959)
1. Add pauseTimestamp
2. It will be set when job is paused and it will be removed when job is resumed
2019-04-28 10:33:50 +08:00
178757d46c Revert "Use http redirect method instead of old way (#948)" (#949)
This reverts commit 84c720e9e7f4123864a1068cf17d3736468ea528.
2019-04-28 10:33:50 +08:00
1787e7bb05 Use http redirect method instead of old way (#948) 2019-04-28 10:33:50 +08:00
24d22c6f6b Forawrd some stmt to master (#944)
1. SHOW PROC
2. SHOW PROC web action
3. ADMIN SHOW stmt
4. SHOW ROUTINE LOAD stmt
2019-04-28 10:33:50 +08:00
19b34129bb Fix bug when resume a runnning job (#942) 2019-04-28 10:33:50 +08:00
0579540ba2 Fix routine load bugs (#940)
1. Plan for each task in case table schema may changed
2. Add more detail info for txn
2019-04-28 10:33:50 +08:00
f49c53ee5b Change some throwable to userException (#939) 2019-04-28 10:33:50 +08:00
2b4d02b2fa Add error load log url for routine load job (#938) 2019-04-28 10:33:50 +08:00
8e0512e88d Move lock of routine load job (#934)
1. Moving lock of routine load job from inside of lock of txn to outside.
2. The process of routine load task commit or abort is following:
* lock job
      check task
  lock txn
      commit txn
  unlock txn
      commit task
* unlock job
3. The process of checking timeout txn will be ignored when there are related task of txn.
4. The relationship between task and txn will be removed when task timeout.
2019-04-28 10:33:50 +08:00
0cccb5cc9c Fix bugs of routine load job (#917)
1. Uninitialized counter cause endless data consuming.
2. Incorrect handle null value in column mapping.

* fix bug
2019-04-28 10:33:50 +08:00
75674753c2 Add unit test for RoutineLoadManager and RoutineLoadJob (#881)
1. Add ut
2. Show history job when table has been deleted. Checking auth whatever tablename is null or not.
2019-04-28 10:33:50 +08:00
400d8a906f Optimize the consumer assignment of Kafka routine load job (#870)
1. Use a data consumer group to share a single stream load pipe with multi data consumers. This will increase the consuming speed of Kafka messages, as well as reducing the task number of routine
load job. 

Test results:

* 1 consumer, 1 partitions:
    consume time: 4.469s, rows: 990140, bytes: 128737139.  221557 rows/s, 28M/s
* 1 consumer, 3 partitions:
    consume time: 12.765s, rows: 2000143, bytes: 258631271. 156689 rows/s, 20M/s
    blocking get time(us): 12268241, blocking put time(us): 1886431
* 3 consumers, 3 partitions:
    consume time(all 3): 6.095s, rows: 2000503, bytes: 258631576. 328220 rows/s, 42M/s
    blocking get time(us): 1041639, blocking put time(us): 10356581

The next 2 cases show that we can achieve higher speed by adding more consumers. But the bottle neck transfers from Kafka consumer to Doris ingestion, so 3 consumers in a group is enough.

I also add a Backend config `max_consumer_num_per_group` to change the number of consumers in a data consumer group, and default value is 3.

In my test(1 Backend, 2 tablets, 1 replicas), 1 routine load task can achieve 10M/s, which is same as raw stream load.

2. Add OFFSET_BEGINNING and OFFSET_END support for Kafka routine load
2019-04-28 10:33:50 +08:00
22500b672c Add new keyword in ident (#860)
1. new keyword is added in ident in order to avoid syntax error when keyword is a string
2019-04-28 10:33:50 +08:00
cef2078cb8 Fix FE UT (#850) 2019-04-28 10:33:50 +08:00
01e2a8d48d Fix bug that stream load use invalid file type (#835) 2019-04-28 10:33:50 +08:00
5a757ff5b2 Change column order in show routine load (#824)
1. show "/routine_loads/jobname" and show routine load jobname
2. change jobname | id to  id | jobname
2019-04-28 10:33:50 +08:00
e1c6ba8397 Add show proc of routine load and task (#818)
1. add show proc "/routine_loads" to show statistic of all of jobs and tasks
2. add show proc "/routine_loads/jobname" to show info of all of jobs named jobname
3. add show proc "/routine_loads/jobname/jobid" to show tasks belong to jobid
4. fix bug of allocateBeToTask
2019-04-28 10:33:50 +08:00
c577b9397e Add help doc of routine load (#811) 2019-04-28 10:33:50 +08:00
2e250482fd Modify routine load fe unit test (#803) 2019-04-28 10:33:50 +08:00
e8b360d193 Merge master and fix BE ut 2019-04-28 10:33:50 +08:00
9d08be3c5f Add metrics for routine load (#795)
* Add metrics for routine load
* limit the max number of routine load task in backend to 10
* Fix bug that some partitions will no be assigned
2019-04-28 10:33:50 +08:00
8d2de42b36 Fix some routine load bugs (#787)
1. Reserve the column order in load stmt.
2. Fix some replay bugs of routine load task.
2019-04-28 10:33:50 +08:00
d213f922be Implement ShowRoutineLoadStmt and ShowRoutineLoadTaskStmt (#786)
1. ShowRoutineLoadStmt is sames like class description. It does not support show all of routine load job in all of db
2. ShowRoutineLoadTaskStmt is sames like class description. It does not support show all of routine laod task in all of job
3. Init partitionIdsToOffset in constructor of KafkaProgress
4. Change Create/Pause/Resume/Stop routine load job to LabelName such as [db.]name
5. Exclude final job when updating job
6. Catch all of exception when scheduling one job. The exception will not block the another jobs.
2019-04-28 10:33:50 +08:00
9fa5e1b768 Add a cleaner bg thread to clean idle data consumer (#776) 2019-04-28 10:33:50 +08:00
ff6844b7d6 Fix routine load replay bugs (#770) 2019-04-28 10:33:50 +08:00
95d0186e18 Modify some task scheduler logic (#767)
1. add job id and cluster name to Task info
2. Simplify the logic of getting beIdToMaxConcurrentTaskNum
2019-04-28 10:33:50 +08:00
aa7f4c82da modify the replay logic of routine load job (#762) 2019-04-28 10:33:50 +08:00
8f781f95c7 Add persist operations for routine load job (#754) 2019-04-28 10:33:50 +08:00
e1fb02d4c0 Add routine load job cleaner (#742)
1. the stopped and cancelled job will be cleaned after the interval of clean second
2. the interval of clean second * 1000 = current timestamp - end timestamp
3. if job could not fetch topic metadata when need_schedule, job will be cancelled
4. fix the deadlock of job and txn. the lock of txn must be in front of the lock of job
5. the job will be paused or cancelled depend on the abort reason of txn
6. the job will be cancelled immediately if the abort reason named offsets out of range
2019-04-28 10:33:50 +08:00
8b52787114 Stream load with no data will abort txn (#735)
1. stream load executor will abort txn when no correct data in task
2. change txn label to DebugUtil.print(UUID) which is same as task id printed by be
3. change print uuid to hi-lo
2019-04-28 10:33:50 +08:00