This is an automated email from the ASF dual-hosted git repository.
pinal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new e9a36e75b ATLAS-4882: Export/Import: Export exits with 'Found 0
entities'
e9a36e75b is described below
commit e9a36e75bc220d7957dd0c1963d74e25d002812d
Author: Pinal Shah <[email protected]>
AuthorDate: Tue Jun 18 13:11:46 2024 +0530
ATLAS-4882: Export/Import: Export exits with 'Found 0 entities'
Signed-off-by: Pinal Shah <[email protected]>
---
.../repository/impexp/StartEntityFetchByExportRequest.java | 2 +-
.../org/apache/atlas/util/AtlasGremlin3QueryProvider.java | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/repository/src/main/java/org/apache/atlas/repository/impexp/StartEntityFetchByExportRequest.java
b/repository/src/main/java/org/apache/atlas/repository/impexp/StartEntityFetchByExportRequest.java
index d01d6775a..07b7023e5 100644
---
a/repository/src/main/java/org/apache/atlas/repository/impexp/StartEntityFetchByExportRequest.java
+++
b/repository/src/main/java/org/apache/atlas/repository/impexp/StartEntityFetchByExportRequest.java
@@ -189,7 +189,7 @@ public class StartEntityFetchByExportRequest {
try {
return (List<String>)
atlasGraph.executeGremlinScript(getScriptEngine(), bindings, query, false);
} catch (ScriptException e) {
- LOG.error("Script execution failed for query: ", query, e);
+ LOG.error("Script execution failed for query: {}, {} ", query, e);
return null;
}
}
diff --git
a/repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java
b/repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java
index 5b10c353e..87bf3d74a 100644
---
a/repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java
+++
b/repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java
@@ -28,15 +28,15 @@ public class AtlasGremlin3QueryProvider extends
AtlasGremlin2QueryProvider {
case ENTITY_DELETED_METRIC:
return "g.V().has('__typeName', within(%s)).has('__state',
'DELETED').groupCount().by('__typeName').toList()";
case EXPORT_TYPE_STARTS_WITH:
- return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).startsWith(attrValue)}).has('__guid').values('__guid').toList()";
+ return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).startsWith(attrValue)}).values('__guid').toList()";
case EXPORT_TYPE_ENDS_WITH:
- return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).endsWith(attrValue)}).has('__guid').values('__guid').toList()";
+ return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).endsWith(attrValue)}).values('__guid').toList()";
case EXPORT_TYPE_CONTAINS:
- return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).contains(attrValue)}).has('__guid').values('__guid').toList()";
+ return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).contains(attrValue)}).values('__guid').toList()";
case EXPORT_TYPE_MATCHES:
- return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).matches(attrValue)}).has('__guid').values('__guid').toList()";
+ return
"g.V().has('__typeName',typeName).filter({it.get().value(attrName).matches(attrValue)}).values('__guid').toList()";
case EXPORT_TYPE_DEFAULT:
- return "g.V().has('__typeName',typeName).has(attrName,
attrValue).has('__guid').values('__guid').toList()";
+ return "g.V().has('__typeName',typeName).has(attrName,
attrValue).values('__guid').toList()";
case EXPORT_BY_GUID_FULL:
return "g.V().has('__guid',
startGuid).bothE().bothV().has('__guid').project('__guid',
'isProcess').by('__guid').by(map
{it.get().values('__superTypeNames').toSet().contains('Process')}).dedup().toList()";
case EXPORT_BY_GUID_CONNECTED_IN_EDGE:
@@ -44,7 +44,7 @@ public class AtlasGremlin3QueryProvider extends
AtlasGremlin2QueryProvider {
case EXPORT_BY_GUID_CONNECTED_OUT_EDGE:
return "g.V().has('__guid',
startGuid).outE().inV().has('__guid').project('__guid',
'isProcess').by('__guid').by(map
{it.get().values('__superTypeNames').toSet().contains('Process')}).dedup().toList()";
case EXPORT_TYPE_ALL_FOR_TYPE:
- return "g.V().has('__typeName',
within(typeName)).has('__guid').values('__guid').toList()";
+ return "g.V().has('__typeName',
within(typeName)).values('__guid').toList()";
case FULL_LINEAGE_DATASET:
return "g.V().has('__guid',
guid).repeat(__.inE(incomingEdgeLabel).as('e1').outV().outE(outgoingEdgeLabel).as('e2').inV()).emit().select('e1',
'e2').toList()";
case PARTIAL_LINEAGE_DATASET: