summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-11-01 10:09:59 +1100
committerOlivier Lamy <olamy@apache.org>2014-11-01 10:09:59 +1100
commitfc29009d8ef6b083f69fa025f734b56f8473acdc (patch)
tree435167fd7f4607532957da9f7d4718eb52cfcb54
parent7c5f1a0acd3fef8dc499c592bb3c8406c61a6631 (diff)
downloadarchiva-fc29009d8ef6b083f69fa025f734b56f8473acdc.tar.gz
archiva-fc29009d8ef6b083f69fa025f734b56f8473acdc.zip
1.7 diamond
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java84
1 files changed, 40 insertions, 44 deletions
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
index ce28c48b9..d102cfe59 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
@@ -125,50 +125,45 @@ public class CassandraMetadataRepository
this.keyspace = cassandraArchivaManager.getKeyspace();
this.projectVersionMetadataTemplate =
- new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getProjectVersionMetadataFamilyName(),
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.projectTemplate = new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getProjectFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.artifactMetadataTemplate =
- new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getArtifactMetadataFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.metadataFacetTemplate =
- new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getMetadataFacetFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.mailingListTemplate =
- new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getMailingListFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.licenseTemplate = new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getLicenseFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
-
- this.dependencyTemplate =
- new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), //
- cassandraArchivaManager.getDependencyFamilyName(),
- //
- StringSerializer.get(), //
- StringSerializer.get() );
+ new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getProjectVersionMetadataFamilyName(), //
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.projectTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getProjectFamilyName(), //
+ //
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.artifactMetadataTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getArtifactMetadataFamilyName(),
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.metadataFacetTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getMetadataFacetFamilyName(),
+ //
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.mailingListTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getMailingListFamilyName(),
+ //
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.licenseTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getLicenseFamilyName(),
+ //
+ StringSerializer.get(), //
+ StringSerializer.get() );
+
+ this.dependencyTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
+ cassandraArchivaManager.getDependencyFamilyName(),
+ //
+ StringSerializer.get(), //
+ StringSerializer.get() );
}
@@ -202,6 +197,7 @@ public class CassandraMetadataRepository
.addInsertion( repositoryId, cf,
CassandraUtils.column( "repositoryName", repository.getName() ) ) //
.execute();
+ logger.debug( "time to insert repository: {}", mutationResult.getExecutionTimeMicro() );
return repository;
}
catch ( HInvalidRequestException e )