1.7 diamond

This commit is contained in:
Olivier Lamy 2014-11-01 10:09:59 +11:00
parent 7c5f1a0acd
commit fc29009d8e
1 changed files with 34 additions and 38 deletions

View File

@ -125,50 +125,45 @@ public class CassandraMetadataRepository
this.keyspace = cassandraArchivaManager.getKeyspace(); this.keyspace = cassandraArchivaManager.getKeyspace();
this.projectVersionMetadataTemplate = this.projectVersionMetadataTemplate =
new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
cassandraArchivaManager.getProjectVersionMetadataFamilyName(), cassandraArchivaManager.getProjectVersionMetadataFamilyName(), //
StringSerializer.get(), // StringSerializer.get(), //
StringSerializer.get() ); StringSerializer.get() );
this.projectTemplate = new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // this.projectTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
cassandraArchivaManager.getProjectFamilyName(), cassandraArchivaManager.getProjectFamilyName(), //
// //
StringSerializer.get(), // StringSerializer.get(), //
StringSerializer.get() ); StringSerializer.get() );
this.artifactMetadataTemplate = this.artifactMetadataTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // cassandraArchivaManager.getArtifactMetadataFamilyName(),
cassandraArchivaManager.getArtifactMetadataFamilyName(), StringSerializer.get(), //
// StringSerializer.get() );
StringSerializer.get(), //
StringSerializer.get() );
this.metadataFacetTemplate = this.metadataFacetTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // cassandraArchivaManager.getMetadataFacetFamilyName(),
cassandraArchivaManager.getMetadataFacetFamilyName(), //
// StringSerializer.get(), //
StringSerializer.get(), // StringSerializer.get() );
StringSerializer.get() );
this.mailingListTemplate = this.mailingListTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // cassandraArchivaManager.getMailingListFamilyName(),
cassandraArchivaManager.getMailingListFamilyName(), //
// StringSerializer.get(), //
StringSerializer.get(), // StringSerializer.get() );
StringSerializer.get() );
this.licenseTemplate = new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // this.licenseTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
cassandraArchivaManager.getLicenseFamilyName(), cassandraArchivaManager.getLicenseFamilyName(),
// //
StringSerializer.get(), // StringSerializer.get(), //
StringSerializer.get() ); StringSerializer.get() );
this.dependencyTemplate = this.dependencyTemplate = new ThriftColumnFamilyTemplate<>( cassandraArchivaManager.getKeyspace(), //
new ThriftColumnFamilyTemplate<String, String>( cassandraArchivaManager.getKeyspace(), // cassandraArchivaManager.getDependencyFamilyName(),
cassandraArchivaManager.getDependencyFamilyName(), //
// StringSerializer.get(), //
StringSerializer.get(), // StringSerializer.get() );
StringSerializer.get() );
} }
@ -202,6 +197,7 @@ public class CassandraMetadataRepository
.addInsertion( repositoryId, cf, .addInsertion( repositoryId, cf,
CassandraUtils.column( "repositoryName", repository.getName() ) ) // CassandraUtils.column( "repositoryName", repository.getName() ) ) //
.execute(); .execute();
logger.debug( "time to insert repository: {}", mutationResult.getExecutionTimeMicro() );
return repository; return repository;
} }
catch ( HInvalidRequestException e ) catch ( HInvalidRequestException e )