Package io.lumify.core.model.audit

Examples of io.lumify.core.model.audit.Audit


        // actor 1 vertex
        Vertex actorVertex = importActor(actor, context);

        // audit actor 1
        Text key = new Text(Audit.TABLE_NAME);
        Audit auditActor = auditRepository.createAudit(AuditAction.CREATE, actorVertex.getId(), "GDELT MR", "", user, visibility);
        context.write(key, AccumuloSession.createMutationFromRow(auditActor));

        context.getCounter(GDELTImportCounters.EDGES_ATTEMPTED).increment(1);

        // actor 1 to event edge
        EdgeBuilder actor1EdgeBuilder = prepareEdge(generateActor1ToEventEdgeId(actorVertex, eventVertex), actorVertex, eventVertex, GDELTProperties.ACTOR1_TO_EVENT_EDGE, visibility);
        Edge actor1ToEventEdge = actor1EdgeBuilder.save(authorizations);

        // audit actor 1 to event edge
        Text actor1ToEventEdgeKey = new Text(Audit.TABLE_NAME);
        Audit auditActor1ToEventEdge = auditRepository.createAudit(AuditAction.CREATE, actor1ToEventEdge.getId(), "GDELT MR", "", user, visibility);
        context.write(actor1ToEventEdgeKey, AccumuloSession.createMutationFromRow(auditActor1ToEventEdge));

        context.getCounter(GDELTImportCounters.EDGES_PROCESSED).increment(1);
    }
View Full Code Here


        // actor 2
        Vertex actorVertex = importActor(actor, context);

        // audit actor 2
        Text key = new Text(Audit.TABLE_NAME);
        Audit auditActor = auditRepository.createAudit(AuditAction.CREATE, actorVertex.getId(), "GDELT MR", "", user, visibility);
        context.write(key, AccumuloSession.createMutationFromRow(auditActor));

        context.getCounter(GDELTImportCounters.EDGES_ATTEMPTED).increment(1);

        // event to actor 2 edge
        EdgeBuilder eventToActor2EdgeBuilder = prepareEdge(generateEventToActor2EdgeId(actorVertex, eventVertex), eventVertex, actorVertex, GDELTProperties.EVENT_TO_ACTOR2_EDGE, visibility);
        Edge eventToActor2Edge = eventToActor2EdgeBuilder.save(authorizations);

        // audit event to actor 2 edge
        Text eventToActor2EdgeKey = new Text(Audit.TABLE_NAME);
        Audit auditEventToActor2Edge = auditRepository.createAudit(AuditAction.CREATE, eventToActor2Edge.getId(), "GDELT MR", "", user, visibility);
        context.write(eventToActor2EdgeKey, AccumuloSession.createMutationFromRow(auditEventToActor2Edge));

        context.getCounter(GDELTImportCounters.EDGES_PROCESSED).increment(1);
    }
View Full Code Here

        }

        Vertex pageVertex = pageVertexBuilder.save(authorizations);

        // audit vertex
        Audit audit = auditRepository.createAudit(AuditAction.CREATE, pageVertex.getId(), "Wikipedia MR", "", user, visibility);
        context.write(auditTableNameText, AccumuloSession.createMutationFromRow(audit));

        // because save above will cause the StreamingPropertyValue to be read we need to reset the position to 0 for search indexing
        rawPropertyValue.getInputStream().reset();
        textPropertyValue.getInputStream().reset();
View Full Code Here

        Vertex userVertex = createUserVertex(userId);

        // audit vertex
        Text key = ImportMR.getKey(Audit.TABLE_NAME, userVertex.getId().toString().getBytes());
        Audit audit = auditRepository.createAudit(AuditAction.CREATE, userVertex.getId(), "Friendster MR", "", user, visibility);
        context.write(key, AccumuloSession.createMutationFromRow(audit));

        String friends = lineString.substring(colonOffet + 1).trim();
        if ("notfound".equals(friends) || "private".equals(friends)) {
            // do nothing?
View Full Code Here

        setGeolocationProperty(event, eventVertexBuilder);
        Vertex eventVertex = eventVertexBuilder.save(authorizations);

        // audit event
        Text eventKey = new Text(Audit.TABLE_NAME);
        Audit auditEvent = auditRepository.createAudit(AuditAction.CREATE, eventVertex.getId(), "GDELT MR", "", user, visibility);
        context.write(eventKey, AccumuloSession.createMutationFromRow(auditEvent));

        context.getCounter(GDELTImportCounters.EVENTS_PROCESSED).increment(1);
        return eventVertex;
    }
View Full Code Here

TOP

Related Classes of io.lumify.core.model.audit.Audit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.