Search in sources :

Example 26 with BeforeClass

use of org.junit.BeforeClass in project flink by apache.

the class AbstractQueryableStateITCase method setup.

@BeforeClass
public static void setup() {
    try {
        Configuration config = new Configuration();
        config.setInteger(ConfigConstants.TASK_MANAGER_MEMORY_SIZE_KEY, 4);
        config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, NUM_TMS);
        config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, NUM_SLOTS_PER_TM);
        config.setInteger(QueryableStateOptions.CLIENT_NETWORK_THREADS, 1);
        config.setBoolean(QueryableStateOptions.SERVER_ENABLE, true);
        config.setInteger(QueryableStateOptions.SERVER_NETWORK_THREADS, 1);
        cluster = new TestingCluster(config, false);
        cluster.start(true);
        TEST_ACTOR_SYSTEM = AkkaUtils.createDefaultActorSystem();
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
}
Also used : TestingCluster(org.apache.flink.runtime.testingUtils.TestingCluster) Configuration(org.apache.flink.configuration.Configuration) BeforeClass(org.junit.BeforeClass)

Example 27 with BeforeClass

use of org.junit.BeforeClass in project flink by apache.

the class BlobClientSslTest method startNonSSLServer.

/**
	 * Starts the SSL disabled BLOB server.
	 */
@BeforeClass
public static void startNonSSLServer() {
    try {
        Configuration config = new Configuration();
        config.setBoolean(ConfigConstants.SECURITY_SSL_ENABLED, true);
        config.setBoolean(ConfigConstants.BLOB_SERVICE_SSL_ENABLED, false);
        config.setString(ConfigConstants.SECURITY_SSL_KEYSTORE, "src/test/resources/local127.keystore");
        config.setString(ConfigConstants.SECURITY_SSL_KEYSTORE_PASSWORD, "password");
        config.setString(ConfigConstants.SECURITY_SSL_KEY_PASSWORD, "password");
        BLOB_SERVER = new BlobServer(config);
    } catch (IOException e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
    clientConfig = new Configuration();
    clientConfig.setBoolean(ConfigConstants.SECURITY_SSL_ENABLED, true);
    clientConfig.setBoolean(ConfigConstants.BLOB_SERVICE_SSL_ENABLED, false);
    clientConfig.setString(ConfigConstants.SECURITY_SSL_TRUSTSTORE, "src/test/resources/local127.truststore");
    clientConfig.setString(ConfigConstants.SECURITY_SSL_TRUSTSTORE_PASSWORD, "password");
}
Also used : Configuration(org.apache.flink.configuration.Configuration) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 28 with BeforeClass

use of org.junit.BeforeClass in project flink by apache.

the class BlobClientTest method startServer.

/**
	 * Starts the BLOB server.
	 */
@BeforeClass
public static void startServer() {
    try {
        blobServiceConfig = new Configuration();
        BLOB_SERVER = new BlobServer(blobServiceConfig);
    } catch (IOException e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
}
Also used : Configuration(org.apache.flink.configuration.Configuration) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 29 with BeforeClass

use of org.junit.BeforeClass in project flink by apache.

the class StreamFaultToleranceTestBase method startCluster.

@BeforeClass
public static void startCluster() {
    try {
        Configuration config = new Configuration();
        config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, NUM_TASK_MANAGERS);
        config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, NUM_TASK_SLOTS);
        config.setInteger(ConfigConstants.TASK_MANAGER_MEMORY_SIZE_KEY, 12);
        cluster = new LocalFlinkMiniCluster(config, false);
        cluster.start();
    } catch (Exception e) {
        e.printStackTrace();
        fail("Failed to start test cluster: " + e.getMessage());
    }
}
Also used : Configuration(org.apache.flink.configuration.Configuration) LocalFlinkMiniCluster(org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster) BeforeClass(org.junit.BeforeClass)

Example 30 with BeforeClass

use of org.junit.BeforeClass in project flink by apache.

the class WindowCheckpointingITCase method startTestCluster.

@BeforeClass
public static void startTestCluster() {
    Configuration config = new Configuration();
    config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, 2);
    config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, PARALLELISM / 2);
    config.setInteger(ConfigConstants.TASK_MANAGER_MEMORY_SIZE_KEY, 48);
    cluster = new LocalFlinkMiniCluster(config, false);
    cluster.start();
}
Also used : Configuration(org.apache.flink.configuration.Configuration) LocalFlinkMiniCluster(org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster) BeforeClass(org.junit.BeforeClass)

Aggregations

BeforeClass (org.junit.BeforeClass)2454 File (java.io.File)331 Configuration (org.apache.hadoop.conf.Configuration)275 Connection (java.sql.Connection)111 IOException (java.io.IOException)109 Properties (java.util.Properties)100 Reader (java.io.Reader)99 SqlSessionFactoryBuilder (org.apache.ibatis.session.SqlSessionFactoryBuilder)98 Provisioning (com.zimbra.cs.account.Provisioning)93 ScriptRunner (org.apache.ibatis.jdbc.ScriptRunner)91 MockProvisioning (com.zimbra.cs.account.MockProvisioning)77 URI (java.net.URI)73 HiveConf (org.apache.hadoop.hive.conf.HiveConf)73 Path (org.apache.hadoop.fs.Path)70 SqlSession (org.apache.ibatis.session.SqlSession)62 HashMap (java.util.HashMap)58 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)58 Injector (com.google.inject.Injector)57 CConfiguration (co.cask.cdap.common.conf.CConfiguration)56 DeploymentInfo (io.undertow.servlet.api.DeploymentInfo)55