Search in sources :

Example 31 with DBException

use of com.yahoo.ycsb.DBException in project YCSB by brianfrankcooper.

the class RadosClientTest method setupClass.

@BeforeClass
public static void setupClass() throws DBException {
    radosclient = new RadosClient();
    Properties p = new Properties();
    p.setProperty(POOL_PROPERTY, POOL_TEST);
    try {
        radosclient.setProperties(p);
        radosclient.init();
    } catch (DBException | UnsatisfiedLinkError e) {
        assumeNoException("Ceph cluster is not running. Skipping tests.", e);
    }
}
Also used : DBException(com.yahoo.ycsb.DBException) Properties(java.util.Properties) BeforeClass(org.junit.BeforeClass)

Example 32 with DBException

use of com.yahoo.ycsb.DBException in project voltdb by VoltDB.

the class VoltClient4 method init.

@Override
public void init() throws DBException {
    Properties props = getProperties();
    String servers = props.getProperty("voltdb.servers", "localhost");
    String user = props.getProperty("voltdb.user", "");
    String password = props.getProperty("voltdb.password", "");
    String strLimit = props.getProperty("voltdb.ratelimit");
    int ratelimit = strLimit != null ? Integer.parseInt(strLimit) : Integer.MAX_VALUE;
    try {
        m_client = ConnectionHelper.createConnection(Thread.currentThread().getId(), servers, user, password, ratelimit);
    } catch (Exception e) {
        e.printStackTrace();
        throw new DBException(e.getMessage());
    }
    m_workingData = new byte[1024 * 1024];
    m_writeBuf = ByteBuffer.wrap(m_workingData);
}
Also used : DBException(com.yahoo.ycsb.DBException) Properties(java.util.Properties) DBException(com.yahoo.ycsb.DBException) IOException(java.io.IOException) ProcCallException(org.voltdb.client.ProcCallException) NoConnectionsException(org.voltdb.client.NoConnectionsException)

Aggregations

DBException (com.yahoo.ycsb.DBException)32 Properties (java.util.Properties)15 IOException (java.io.IOException)10 TimeoutException (com.stumbleupon.async.TimeoutException)2 Measurements (com.yahoo.ycsb.measurements.Measurements)2 AerospikeException (com.aerospike.client.AerospikeException)1 ClientPolicy (com.aerospike.client.policy.ClientPolicy)1 MongoClientConfiguration (com.allanbank.mongodb.MongoClientConfiguration)1 MongoDbUri (com.allanbank.mongodb.MongoDbUri)1 ClientConfiguration (com.amazonaws.ClientConfiguration)1 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)1 SSECustomerKey (com.amazonaws.services.s3.model.SSECustomerKey)1 ArangoConfigure (com.arangodb.ArangoConfigure)1 ArangoDBException (com.arangodb.ArangoDBException)1 ArangoDriver (com.arangodb.ArangoDriver)1 ArangoException (com.arangodb.ArangoException)1 ArangoHost (com.arangodb.ArangoHost)1 MapBuilder (com.arangodb.util.MapBuilder)1 VPackBuilder (com.arangodb.velocypack.VPackBuilder)1 Rados (com.ceph.rados.Rados)1