summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-03-20 23:22:05 +0000
committerOlivier Lamy <olamy@apache.org>2014-03-20 23:22:05 +0000
commit44880ea190e6532f24a5166dfbe426342b3e2abc (patch)
treed2db1b279169f595ac24bb48a84c02a4485ee7d2 /archiva-modules
parent0feaefa6cb598fc5781022835456a2203eba6ac9 (diff)
downloadarchiva-44880ea190e6532f24a5166dfbe426342b3e2abc.tar.gz
archiva-44880ea190e6532f24a5166dfbe426342b3e2abc.zip
use a better name
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1579817 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/pom.xml32
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraArchivaManager.java (renamed from archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraEntityManagerFactory.java)2
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java18
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java4
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java (renamed from archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraEntityManagerFactory.java)8
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java11
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java12
7 files changed, 50 insertions, 37 deletions
diff --git a/archiva-modules/plugins/metadata-store-cassandra/pom.xml b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
index c5747e53b..8a6d19929 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/pom.xml
+++ b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
@@ -167,9 +167,35 @@
</dependency>
<dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.1</version>
+ <groupId>org.hectorclient</groupId>
+ <artifactId>hector-core</artifactId>
+ <version>1.1-4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.ecyrd.speed4j</groupId>
+ <artifactId>speed4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.yammer.metrics</groupId>
+ <artifactId>metrics-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cassandra</groupId>
+ <artifactId>cassandra-thrift</artifactId>
+ <version>1.2.15</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraEntityManagerFactory.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraArchivaManager.java
index aaa04d945..e53e4e608 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraEntityManagerFactory.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraArchivaManager.java
@@ -32,7 +32,7 @@ import org.apache.archiva.metadata.repository.cassandra.model.Repository;
* @author Olivier Lamy
* @since 2.0.0
*/
-public interface CassandraEntityManagerFactory
+public interface CassandraArchivaManager
{
Keyspace getKeyspace();
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 4db61b0c8..157a7920e 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
@@ -71,46 +71,46 @@ public class CassandraMetadataRepository
private final Map<String, MetadataFacetFactory> metadataFacetFactories;
- private CassandraEntityManagerFactory cassandraEntityManagerFactory;
+ private CassandraArchivaManager cassandraArchivaManager;
public CassandraMetadataRepository( Map<String, MetadataFacetFactory> metadataFacetFactories,
ArchivaConfiguration configuration,
- CassandraEntityManagerFactory cassandraEntityManagerFactory )
+ CassandraArchivaManager cassandraArchivaManager )
{
this.metadataFacetFactories = metadataFacetFactories;
this.configuration = configuration;
- this.cassandraEntityManagerFactory = cassandraEntityManagerFactory;
+ this.cassandraArchivaManager = cassandraArchivaManager;
}
public EntityManager<Repository, String> getRepositoryEntityManager()
{
- return this.cassandraEntityManagerFactory.getRepositoryEntityManager();
+ return this.cassandraArchivaManager.getRepositoryEntityManager();
}
public EntityManager<Namespace, String> getNamespaceEntityManager()
{
- return this.cassandraEntityManagerFactory.getNamespaceEntityManager();
+ return this.cassandraArchivaManager.getNamespaceEntityManager();
}
public EntityManager<Project, String> getProjectEntityManager()
{
- return this.cassandraEntityManagerFactory.getProjectEntityManager();
+ return this.cassandraArchivaManager.getProjectEntityManager();
}
public EntityManager<ArtifactMetadataModel, String> getArtifactMetadataModelEntityManager()
{
- return cassandraEntityManagerFactory.getArtifactMetadataModelEntityManager();
+ return cassandraArchivaManager.getArtifactMetadataModelEntityManager();
}
public EntityManager<MetadataFacetModel, String> getMetadataFacetModelEntityManager()
{
- return this.cassandraEntityManagerFactory.getMetadataFacetModelEntityManager();
+ return this.cassandraArchivaManager.getMetadataFacetModelEntityManager();
}
public EntityManager<ProjectVersionMetadataModel, String> getProjectVersionMetadataModelEntityManager()
{
- return this.cassandraEntityManagerFactory.getProjectVersionMetadataModelEntityManager();
+ return this.cassandraArchivaManager.getProjectVersionMetadataModelEntityManager();
}
@Override
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java
index 3d96609ee..f9f1580fd 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java
@@ -56,7 +56,7 @@ public class CassandraRepositorySessionFactory
private ApplicationContext applicationContext;
@Inject
- private CassandraEntityManagerFactory cassandraEntityManagerFactory;
+ private CassandraArchivaManager cassandraArchivaManager;
@PostConstruct
public void initialize()
@@ -80,7 +80,7 @@ public class CassandraRepositorySessionFactory
public RepositorySession createSession()
{
CassandraMetadataRepository metadataRepository =
- new CassandraMetadataRepository( metadataFacetFactories, configuration, cassandraEntityManagerFactory );
+ new CassandraMetadataRepository( metadataFacetFactories, configuration, cassandraArchivaManager );
return new RepositorySession( metadataRepository, metadataResolver );
}
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraEntityManagerFactory.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java
index 24150e6ef..e46415be0 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraEntityManagerFactory.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java
@@ -28,10 +28,7 @@ import com.netflix.astyanax.connectionpool.exceptions.NotFoundException;
import com.netflix.astyanax.connectionpool.impl.ConnectionPoolConfigurationImpl;
import com.netflix.astyanax.connectionpool.impl.ConnectionPoolType;
import com.netflix.astyanax.connectionpool.impl.Slf4jConnectionPoolMonitorImpl;
-import com.netflix.astyanax.ddl.ColumnDefinition;
-import com.netflix.astyanax.ddl.ColumnFamilyDefinition;
import com.netflix.astyanax.ddl.KeyspaceDefinition;
-import com.netflix.astyanax.entitystore.CompositeEntityManager;
import com.netflix.astyanax.entitystore.DefaultEntityManager;
import com.netflix.astyanax.entitystore.EntityManager;
import com.netflix.astyanax.impl.AstyanaxConfigurationImpl;
@@ -51,7 +48,6 @@ import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.persistence.PersistenceException;
-import java.util.Map;
import java.util.Properties;
/**
@@ -61,8 +57,8 @@ import java.util.Properties;
* @since 2.0.0
*/
@Service( "archivaEntityManagerFactory#cassandra" )
-public class DefaultCassandraEntityManagerFactory
- implements CassandraEntityManagerFactory
+public class DefaultCassandraArchivaManager
+ implements CassandraArchivaManager
{
private Logger logger = LoggerFactory.getLogger( getClass() );
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
index 1361585db..0e73da67f 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
@@ -21,12 +21,6 @@ package org.apache.archiva.metadata.repository.cassandra;
import org.apache.archiva.metadata.model.MetadataFacetFactory;
import org.apache.archiva.metadata.repository.AbstractMetadataRepositoryTest;
-import org.apache.archiva.metadata.repository.cassandra.model.ArtifactMetadataModel;
-import org.apache.archiva.metadata.repository.cassandra.model.MetadataFacetModel;
-import org.apache.archiva.metadata.repository.cassandra.model.Namespace;
-import org.apache.archiva.metadata.repository.cassandra.model.Project;
-import org.apache.archiva.metadata.repository.cassandra.model.ProjectVersionMetadataModel;
-import org.apache.archiva.metadata.repository.cassandra.model.Repository;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
@@ -36,7 +30,6 @@ import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
-import java.util.List;
import java.util.Map;
/**
@@ -49,7 +42,7 @@ public class CassandraMetadataRepositoryTest
@Inject
@Named( value = "archivaEntityManagerFactory#cassandra" )
- CassandraEntityManagerFactory cassandraEntityManagerFactory;
+ CassandraArchivaManager cassandraArchivaManager;
CassandraMetadataRepository cmr;
@@ -67,7 +60,7 @@ public class CassandraMetadataRepositoryTest
Map<String, MetadataFacetFactory> factories = createTestMetadataFacetFactories();
- this.cmr = new CassandraMetadataRepository( factories, null, cassandraEntityManagerFactory );
+ this.cmr = new CassandraMetadataRepository( factories, null, cassandraArchivaManager );
this.repository = this.cmr;
clearReposAndNamespace();
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java
index 32fb9eb18..a0637d229 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java
@@ -20,7 +20,6 @@ package org.apache.archiva.metadata.repository.cassandra;
*/
import org.apache.archiva.metadata.repository.cassandra.model.Namespace;
-import org.apache.archiva.metadata.repository.cassandra.model.Project;
import org.apache.archiva.metadata.repository.cassandra.model.Repository;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.fest.assertions.api.Assertions;
@@ -34,7 +33,6 @@ import org.springframework.test.context.ContextConfiguration;
import javax.inject.Inject;
import javax.inject.Named;
-import java.util.List;
/**
* @author Olivier Lamy
@@ -48,7 +46,7 @@ public class RepositoriesNamespaceTest
@Inject
@Named(value = "archivaEntityManagerFactory#cassandra")
- CassandraEntityManagerFactory cassandraEntityManagerFactory;
+ CassandraArchivaManager cassandraArchivaManager;
CassandraMetadataRepository cmr;
@@ -57,10 +55,10 @@ public class RepositoriesNamespaceTest
public void setup()
throws Exception
{
- cmr = new CassandraMetadataRepository( null, null, cassandraEntityManagerFactory );
- if ( !cassandraEntityManagerFactory.started() )
+ cmr = new CassandraMetadataRepository( null, null, cassandraArchivaManager );
+ if ( !cassandraArchivaManager.started() )
{
- cassandraEntityManagerFactory.start();
+ cassandraArchivaManager.start();
}
clearReposAndNamespace();
}
@@ -70,7 +68,7 @@ public class RepositoriesNamespaceTest
throws Exception
{
clearReposAndNamespace();
- cassandraEntityManagerFactory.shutdown();
+ cassandraArchivaManager.shutdown();
}