htran1 commented on a change in pull request #2863: GOBBLIN-1016: Allow Gobblin
Application Master to join Helix cluster …
URL: https://github.com/apache/incubator-gobblin/pull/2863#discussion_r366516926
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixMessagingService.java
##########
@@ -173,13 +173,19 @@ public GobblinHelixMessagingService(HelixManager
manager) {
* @param row row of currently persisted data
* @return true if it matches, false otherwise
*/
+
private boolean rowMatches(Criteria criteria, ZNRecordRow row) {
String instanceName = normalizePattern(criteria.getInstanceName());
String resourceName = normalizePattern(criteria.getResource());
String partitionName = normalizePattern(criteria.getPartition());
String partitionState = normalizePattern(criteria.getPartitionState());
- return stringMatches(instanceName, row.getMapSubKey()) &&
stringMatches(resourceName, row.getRecordId())
- && stringMatches(partitionName, row.getMapKey()) &&
stringMatches(partitionState, row.getMapValue());
+ return (stringMatches(instanceName,
Strings.nullToEmpty(row.getMapSubKey())) ||
+ stringMatches(instanceName, Strings.nullToEmpty(row.getRecordId())))
+ && stringMatches(resourceName,
Strings.nullToEmpty(row.getRecordId()))
+ && stringMatches(partitionName, Strings.nullToEmpty(row.getMapKey()))
+ && stringMatches(partitionState,
Strings.nullToEmpty(row.getMapValue()));
+ //return stringMatches(instanceName, row.getMapSubKey()) &&
stringMatches(resourceName, row.getRecordId())
Review comment:
Remove the commented out lines.
----------------------------------------------------------------
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]
With regards,
Apache Git Services