Search in sources :

Example 21 with BeforeClass

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

the class TestFsShellCopy method setup.

@BeforeClass
public static void setup() throws Exception {
    conf = new Configuration();
    shell = new FsShell(conf);
    lfs = FileSystem.getLocal(conf);
    testRootDir = lfs.makeQualified(new Path(GenericTestUtils.getTempPath("testFsShellCopy")));
    lfs.mkdirs(testRootDir);
    lfs.setWorkingDirectory(testRootDir);
    srcPath = new Path(testRootDir, "srcFile");
    dstPath = new Path(testRootDir, "dstFile");
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) BeforeClass(org.junit.BeforeClass)

Example 22 with BeforeClass

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

the class TestFsShellList method setup.

@BeforeClass
public static void setup() throws Exception {
    conf = new Configuration();
    shell = new FsShell(conf);
    lfs = FileSystem.getLocal(conf);
    lfs.setVerifyChecksum(true);
    lfs.setWriteChecksum(true);
    String root = System.getProperty("test.build.data", "test/build/data");
    testRootDir = lfs.makeQualified(new Path(root, "testFsShellList"));
    assertThat(lfs.mkdirs(testRootDir), is(true));
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) BeforeClass(org.junit.BeforeClass)

Example 23 with BeforeClass

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

the class TestFsShellTouch method setup.

@BeforeClass
public static void setup() throws Exception {
    Configuration conf = new Configuration();
    shell = new FsShell(conf);
    lfs = FileSystem.getLocal(conf);
    testRootDir = lfs.makeQualified(new Path(GenericTestUtils.getTempPath("testFsShell")));
    lfs.mkdirs(testRootDir);
    lfs.setWorkingDirectory(testRootDir);
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) BeforeClass(org.junit.BeforeClass)

Example 24 with BeforeClass

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

the class AutoParallelismITCase method setupCluster.

@BeforeClass
public static void setupCluster() {
    Configuration config = new Configuration();
    config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, NUM_TM);
    config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, SLOTS_PER_TM);
    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)

Example 25 with BeforeClass

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

the class MiscellaneousIssuesITCase method startCluster.

@BeforeClass
public static void startCluster() {
    try {
        Configuration config = new Configuration();
        config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, 2);
        config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, 3);
        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) ProgramInvocationException(org.apache.flink.client.program.ProgramInvocationException) 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