Uh oh!
There was an error while loading. Please reload this page.
Support SSL authentication with Kafka in routine load job - #1235
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ad-manual.md Co-Authored-By: kangpinghuang <40422952+kangpinghuang@users.noreply.github.com>
…log_file.md Co-Authored-By: kangkaisen <kangkaisen@apache.org>
kangkaisen
left a comment
There was a problem hiding this comment.
Save the small file content to FE metadata is necessary? could we save the small file content in FE disk or BE disk?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,71 @@ | |||
| package org.apache.doris.common.util; | |||
| @@ -0,0 +1,114 @@ | |||
| package org.apache.doris.common.util; | |||
Co-Authored-By: kangkaisen <kangkaisen@apache.org>
Co-Authored-By: kangkaisen <kangkaisen@apache.org>
commented
Jun 4, 2019 •
@kangkaisen I've been considered this problem, here are my thoughts:
|
commented
Jun 4, 2019
Ok. I See. Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| Status.TStatus submit_routine_load_task(1:list<TRoutineLoadTask> tasks); | ||
| // This is used for getting some information via Backend | ||
| TProxyResult get_info(1:TProxyRequest request); |
There was a problem hiding this comment.
Actually, new interface should use Brpc, and old interface should be changed to Brpc.
Because Brpc is better for example it support async, connection reused
| // check md5sum if necessary | ||
| String checksum = Hex.encodeHexString(digest.digest()); | ||
| if (!Strings.isNullOrEmpty(md5sum)) { | ||
| if (!checksum.equals(md5sum)) { |
| throw new DdlException("Failed to check md5 of file: " + file.getName()); | ||
| } | ||
| return md5sum.equals(expectedMd5); |
| SmallFileMgr fileMgr = Catalog.getCurrentCatalog().getSmallFileMgr(); | ||
| String filePath; | ||
| try { | ||
| filePath = fileMgr.saveToFile(fileId); |
There was a problem hiding this comment.
why do we need to save it in a file? I think we can get in memory and send the result.
| if (entry.getValue().startsWith("FILE:")) { | ||
| String file = entry.getValue().substring(entry.getValue().indexOf(":") + 1); | ||
| // check and save file to disk | ||
| smallFileMgr.saveToFile(dbId, KAFKA_FILE_CATALOG, file); |
There was a problem hiding this comment.
I don't know why we should save it to file?
Co-Authored-By: ZHAO Chun <buaa.zhaoc@gmail.com>
Co-Authored-By: ZHAO Chun <buaa.zhaoc@gmail.com>
commented
Jun 5, 2019
temporary close |
| } else { | ||
| errMsg = "process loading finished fail"; | ||
| processCancelled(job, cancelType, errMsg); | ||
| processCancelled(job, cancelType, errMsg, failedMsg); |
| break; | ||
| case CANCELLED: | ||
| processCancelled(job, cancelType, errMsg); | ||
| processCancelled(job, cancelType, errMsg, failedMsg); |
| CREATE FILE "ca.pem" | ||
| PROPERTIES | ||
| ( | ||
| "url" = "https://test.bj.bcebos.com/kafka-key/ca.pem", |
There was a problem hiding this comment.
this is just an example. both https and http is OK
| // this is the kafka consumer which is used to fetch the number of partitions | ||
| private KafkaConsumer<String, String> consumer; | ||
| private Map<String, String> convertedCustomProperties = Maps.newHashMap(); |
There was a problem hiding this comment.
why don't you merge convertedCustomProperties into customKafkaProperties
There was a problem hiding this comment.
convertedCustomProperties is just a temporary data struct, and it should be re-created if file changed
| return result; | ||
| private List<Integer> getAllKafkaPartitions() throws UserException { | ||
| convertCustomProperties(); | ||
| return KafkaUtil.getAllKafkaPartitions(brokerList, topic, convertedCustomProperties); |
There was a problem hiding this comment.
If the convertedCustomProperties is incorrect, the job will not be cancelled? The connection timeout and certification failed need to be distinguish.
There was a problem hiding this comment.
Yes, if convertedCustomProperties is incorrect, the job will be paused.
And it is not easy to distinguish timeout and other failure. for example, if ssl authentication failed, kafka client on BE will retry again and again , while in FE, it looks like timeout.
There was a problem hiding this comment.
Of cause, you remind me that convertedCustomProperties should be re-created when routine load job transfer from PAUSE to NEED_SCHEDULE, because some files may be re-created anytime.
| /* | ||
| * Author: Chenmingyu | ||
| * Date: May 29, 2019 |
There was a problem hiding this comment.
No, this is just the IDE's auto adding
| private static final Logger LOG = LogManager.getLogger(KafkaRoutineLoadJob.class); | ||
| private static final int FETCH_PARTITIONS_TIMEOUT_SECOND = 5; | ||
| public static final String KAFKA_FILE_CATALOG = "kafka"; |
There was a problem hiding this comment.
The catalog is a static param of job while the catalog of file is created by user.
There was a problem hiding this comment.
Yes, in my design , catalog named 'kafka' is a reserved keyword, which is exactly used by kafka client.
Uh oh!
There was an error while loading. Please reload this page.
Implement a Small File Manager which allows user to upload small files, save them in Doris and use them later. Details can be found in
docs/documentation/cn/administrator-guide/small_file_mgr.mdanddocs/help/Contents/Administration/small_files.md.Support SSL authentication with Kafka in routine load job. Details can be found in
docs/documentation/cn/administrator-guide/load-data/routine-load-manual.mdanddocs/help/Contents/Data Manipulation/routine_load.mdRemove Kafka Java client. Now we only use librdkafka on BE to connect Kafka brokers.
Fix bugs that invalid routine load task configuration may cause too many aborted transactions.
Modify the
get_log_filerestful api on FE. Details can be found indocs/documentation/cn/administrator-guide/http-actions/fe_get_log_file.md.Optimize the error messages of CANCEL LOAD operation.
ISSUE #1234