JackyYangPassion commented on code in PR #571:
URL:
https://github.com/apache/incubator-hugegraph-toolchain/pull/571#discussion_r1529653526
##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/reader/hdfs/HDFSFileReader.java:
##########
@@ -62,7 +65,20 @@ public HDFSFileReader(HDFSSource source) {
} catch (IOException e) {
throw new LoadException("Failed to create HDFS file system", e);
}
- Path path = new Path(source.path());
+ String input = source.path();
+ if (input.contains("*")) {
+ int lastSlashIndex = input.lastIndexOf('/');
+ if (lastSlashIndex != -1) {
+ input_path = input.substring(0, lastSlashIndex);
+ prefix = input.substring(lastSlashIndex + 1, input.length() -
1);
Review Comment:
Data warehouse files have a characteristic of having a unified prefix, such
as part*, so I believe there's no need to consider regular expression matching
in the scenarios adapted to this PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]