Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: uploadStream exception #213

Merged
merged 2 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,13 @@ public void uploadStream(String stageName, String destPrefix, InputStream inputS
logger.info("upload cost time: " + (uploadEndTime - uploadStartTime) / 1000000.0 + "ms");
}
}
} catch (JsonProcessingException e) {
} catch (RuntimeException e) {
System.out.println(e.getMessage());
// For datax batch insert test, do not throw exception
throw new SQLException(e);
} catch (IOException e) {
logger.warning("failed to upload input stream, file size is:" + fileSize / 1024.0 + e.getMessage());
throw new SQLException(e);
}
}

Expand All @@ -721,7 +722,7 @@ public InputStream downloadStream(String stageName, String sourceFileName, boole
Headers h = ctx.getHeaders();
String presignUrl = ctx.getUrl();
return cli.presignDownloadStream(h, presignUrl);
} catch (JsonProcessingException e) {
} catch (RuntimeException e) {
throw new SQLException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void dropStageIfExists(DatabendConnection connection, String stage
}

public static PresignContext getPresignContext(DatabendConnection connection, PresignMethod method, String stageName, String fileName)
throws SQLException, JsonProcessingException {
throws SQLException {
requireNonNull(connection, "connection is null");
requireNonNull(method, "method is null");
Statement statement = connection.createStatement();
Expand Down
Loading