Commit 618cf361 by Sizhong Du Committed by Madhan Neethiraj

ATLAS-2980: fix HBaseBasedAuditRepository.putEventsV2() to store entity-json string

parent 2b9aa84d
...@@ -117,7 +117,7 @@ public class CassandraBasedAuditRepository extends AbstractStorageBasedAuditRepo ...@@ -117,7 +117,7 @@ public class CassandraBasedAuditRepository extends AbstractStorageBasedAuditRepo
BatchStatement batch = new BatchStatement(); BatchStatement batch = new BatchStatement();
events.forEach(event -> batch.add(stmt.bind(event.getEntityId(), event.getTimestamp(), events.forEach(event -> batch.add(stmt.bind(event.getEntityId(), event.getTimestamp(),
event.getAction().toString(), event.getUser(), event.getDetails(), event.getAction().toString(), event.getUser(), event.getDetails(),
(persistEntityDefinition ? event.getEntity().toString() : null)))); (persistEntityDefinition ? event.getEntityDefinitionString() : null))));
cassSession.execute(batch); cassSession.execute(batch);
} }
......
...@@ -189,7 +189,7 @@ public class HBaseBasedAuditRepository extends AbstractStorageBasedAuditReposito ...@@ -189,7 +189,7 @@ public class HBaseBasedAuditRepository extends AbstractStorageBasedAuditReposito
addColumn(put, COLUMN_TYPE, ENTITY_AUDIT_V2); addColumn(put, COLUMN_TYPE, ENTITY_AUDIT_V2);
if (persistEntityDefinition) { if (persistEntityDefinition) {
addColumn(put, COLUMN_DEFINITION, event.getEntity()); addColumn(put, COLUMN_DEFINITION, event.getEntityDefinitionString());
} }
puts.add(put); puts.add(put);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment