You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "javeme (via GitHub)" <gi...@apache.org> on 2023/03/06 12:39:27 UTC
[GitHub] [incubator-hugegraph-toolchain] javeme commented on a diff in pull request #434: chore: clean store file in all modules
javeme commented on code in PR #434:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/434#discussion_r1126355306
##########
hugegraph-client/src/main/java/org/apache/hugegraph/util/CommonUtil.java:
##########
@@ -41,4 +46,14 @@ public static void checkMapClass(Object object, Class<?> kClass,
"but got '%s'(%s)", vClass, value, value.getClass());
}
}
+
+ public static void downloadFileByUrl(String url, String destPath) {
+ int connectTimeout = 5000;
+ int readTimeout = 5000;
+ try {
+ FileUtils.copyURLToFile(new URL(url), new File(destPath), connectTimeout, readTimeout);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
Review Comment:
add some message to translate the exception
##########
hugegraph-loader/src/test/java/org/apache/hugegraph/loader/test/functional/FileLoadTest.java:
##########
@@ -2426,6 +2427,10 @@ public void testParquetCompressFile() {
};
if (this.ioUtil instanceof HDFSUtil) {
HDFSUtil hdfsUtil = (HDFSUtil) this.ioUtil;
+ String url = "https://github.com/apache/incubator-hugegraph-doc/" +
Review Comment:
define a const var for the base url, may be it may be changed somehow, so that we don't need update everywhere
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org