@@ -176,18 +176,18 @@ static int http_put(struct flb_out_doris *ctx,
176176 c -> resp .status , c -> resp .payload );
177177 }
178178
179- if (c -> resp .status == 307 ) { // redict
179+ if (c -> resp .status == 307 ) { // redirect
180180 // example: Location: http://admin:[email protected] :8040/api/d_fb/t_fb/_stream_load? 181181 char * location = strstr (c -> resp .data , "Location:" );
182182 char * start = strstr (location , "@" ) + 1 ;
183183 char * mid = strstr (start , ":" );
184184 char * end = strstr (mid , "/api" );
185- char redict_host [1024 ] = {0 };
186- memcpy (redict_host , start , mid - start );
187- char redict_port [10 ] = {0 };
188- memcpy (redict_port , mid + 1 , end - (mid + 1 ));
185+ char redirect_host [1024 ] = {0 };
186+ memcpy (redirect_host , start , mid - start );
187+ char redirect_port [10 ] = {0 };
188+ memcpy (redirect_port , mid + 1 , end - (mid + 1 ));
189189
190- out_ret = http_put (ctx , redict_host , atoi (redict_port ),
190+ out_ret = http_put (ctx , redirect_host , atoi (redirect_port ),
191191 body , body_len , tag , tag_len , label , label_len );
192192 }
193193 else if (c -> resp .status == 200 && c -> resp .payload_size > 0 ) {
@@ -331,7 +331,7 @@ static void cb_doris_flush(struct flb_event_chunk *event_chunk,
331331 }
332332
333333 if (ctx -> add_label ) {
334- // ` label_prefix`_`db`_` table`_` timestamp`_` uuid`
334+ /* { label_prefix}_{db}_{ table}_{ timestamp}_{ uuid} */
335335 len = snprintf (label , sizeof (label ) - 1 , "%s_%s_%s_%lu_" , ctx -> label_prefix , ctx -> database , ctx -> table , cfl_time_now () / 1000000000L );
336336 flb_utils_uuid_v4_gen (label + len );
337337 len += 36 ;
0 commit comments