[
https://issues.apache.org/jira/browse/GOBBLIN-1035?focusedWorklogId=379148&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-379148
]
ASF GitHub Bot logged work on GOBBLIN-1035:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jan/20 04:46
Start Date: 30/Jan/20 04:46
Worklog Time Spent: 10m
Work Description: sv2000 commented on pull request #2877: [GOBBLIN-1035]
make hive dataset descriptor accepts regexed db and tables
URL: https://github.com/apache/incubator-gobblin/pull/2877#discussion_r372757288
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/dataset/HiveDatasetDescriptor.java
##########
@@ -102,25 +112,33 @@ protected boolean isPathContaining(DatasetDescriptor
other) {
String otherDbName = parts.get(0);
String otherTableNames = parts.get(1);
- if(!Pattern.compile(this.databaseName).matcher(otherDbName).matches()) {
+ if (!isDbAccepted(otherDbName)) {
return false;
}
List<String> tables = Splitter.on(",").splitToList(otherTableNames);
for (String table : tables) {
- if (!isPathContaining(table)) {
+ if (!isTableAccepted(table)) {
return false;
}
}
return true;
}
- private boolean isPathContaining(String tableName) {
- if (tableName == null) {
- return false;
+ private boolean isDbAccepted(String otherDbName) {
+ List<String> dbs = Splitter.on(",").splitToList(this.databaseName);
+
+ for (String db : dbs) {
+ if (new GlobPattern(db).matches(otherDbName)) {
Review comment:
Should we use java.util.regex patterns for contains() checks, instead of
Hadoop GlobPattern which is more restrictive.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 379148)
Time Spent: 0.5h (was: 20m)
> make hive dataset descriptor accepts regexed db and tables
> ----------------------------------------------------------
>
> Key: GOBBLIN-1035
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1035
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)