Add notes in java stream load sample to avoid wrong use of stream load (#2802)
This commit is contained in:
@ -96,6 +96,8 @@ import java.nio.charset.StandardCharsets;
|
||||
* "LoadBytes": 0,
|
||||
* "LoadTimeMs": 0
|
||||
* }
|
||||
* 3 when the response statusCode is 200, that doesn't mean your stream load is ok, there may be still
|
||||
* some stream problem unless you see the output with 'ok' message
|
||||
*/
|
||||
public class DorisStreamLoad {
|
||||
private final static String DORIS_HOST = "xxx.com";
|
||||
@ -137,6 +139,8 @@ public class DorisStreamLoad {
|
||||
loadResult = EntityUtils.toString(response.getEntity());
|
||||
}
|
||||
final int statusCode = response.getStatusLine().getStatusCode();
|
||||
// statusCode 200 just indicates that doris be service is ok, not stream load
|
||||
// you should see the output content to find whether stream load is success
|
||||
if (statusCode != 200) {
|
||||
throw new IOException(
|
||||
String.format("Stream load failed, statusCode=%s load result=%s", statusCode, loadResult));
|
||||
|
||||
Reference in New Issue
Block a user