@@ -180,7 +180,7 @@ public LoadJobRowResult executeMySqlLoadJobFromStmt(ConnectContext context, Data
180180 boolean clientLocal = dataDesc .isClientLocal ();
181181 MySqlLoadContext loadContext = new MySqlLoadContext ();
182182 loadContextMap .put (loadId , loadContext );
183- LOG .info ("execute MySqlLoadJob for id: {}." , loadId );
183+ LOG .info ("Executing mysql load with id: {}." , loadId );
184184 try (final CloseableHttpClient httpclient = HttpClients .createDefault ()) {
185185 for (String file : filePaths ) {
186186 InputStreamEntity entity = getInputStreamEntity (context , clientLocal , file , loadId );
@@ -193,18 +193,19 @@ public LoadJobRowResult executeMySqlLoadJobFromStmt(ConnectContext context, Data
193193 String errorUrl = Optional .ofNullable (result .get ("ErrorURL" ))
194194 .map (JsonElement ::getAsString ).orElse ("" );
195195 failedRecords .offer (new MySqlLoadFailRecord (loadId , errorUrl ));
196- LOG .warn ("Execute mysql data load failed with request: {} and response: {}" , request , body );
196+ LOG .warn ("Execute mysql load failed with request: {} and response: {}, job id: {}" ,
197+ request , body , loadId );
197198 throw new LoadException (result .get ("Message" ).getAsString () + " with load id " + loadId );
198199 }
199200 loadResult .incRecords (result .get ("NumberLoadedRows" ).getAsLong ());
200201 loadResult .incSkipped (result .get ("NumberFilteredRows" ).getAsInt ());
201202 }
202203 }
203204 } catch (Throwable t ) {
204- LOG .warn ("Execute mysql load {} failed" , loadId , t );
205+ LOG .warn ("Execute mysql load {} failed, msg: {} " , loadId , t );
205206 // drain the data from client conn util empty packet received, otherwise the connection will be reset
206207 if (clientLocal && loadContextMap .containsKey (loadId ) && !loadContextMap .get (loadId ).isFinished ()) {
207- LOG .warn ("not drained yet, try reading left data from client connection for load {}." , loadId );
208+ LOG .warn ("Not drained yet, try reading left data from client connection for load {}." , loadId );
208209 ByteBuffer buffer = context .getMysqlChannel ().fetchOnePacket ();
209210 // MySql client will send an empty packet when eof
210211 while (buffer != null && buffer .limit () != 0 ) {
@@ -219,6 +220,7 @@ public LoadJobRowResult executeMySqlLoadJobFromStmt(ConnectContext context, Data
219220 throw t ;
220221 }
221222 } finally {
223+ LOG .info ("Mysql load job {} finished, loaded records: {}" , loadId , loadResult .getRecords ());
222224 loadContextMap .remove (loadId );
223225 }
224226 return loadResult ;
0 commit comments