public class DataMigration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DataMigration.TypeToTableMapping |
Modifier and Type | Field and Description |
---|---|
protected ArtifactCassandraDao |
artifactCassandraDao |
protected AuditCassandraDao |
auditCassandraDao |
protected ElasticSearchClient |
elasticSearchClient |
Constructor and Description |
---|
DataMigration() |
Modifier and Type | Method and Description |
---|---|
static AuditingGenericEvent |
createAuditRecord(EnumMap<AuditingFieldsKeysEnum,Object> auditingFields) |
boolean |
migrateDataESToCassndra(String appConfigDir,
boolean exportFromEs,
boolean importToCassandra)
the method exports and imports the records from ES to cassandra the flow
will check to see if the files are not empty if the files are not empty
the export will be skiped and the flow will use the existing files.
|
protected ElasticSearchClient elasticSearchClient
@Autowired protected AuditCassandraDao auditCassandraDao
@Autowired protected ArtifactCassandraDao artifactCassandraDao
public boolean migrateDataESToCassndra(String appConfigDir, boolean exportFromEs, boolean importToCassandra)
appConfigDir
- the location of the dir in wich the output files will be
storedexportFromEs
- should the es be exported again and overwrite the old exportimportToCassandra
- should we import the data into cassandrapublic static AuditingGenericEvent createAuditRecord(EnumMap<AuditingFieldsKeysEnum,Object> auditingFields) throws ParseException
ParseException
Copyright © 2017. All rights reserved.