• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ConfigVars类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.github.sakserv.minicluster.config.ConfigVars的典型用法代码示例。如果您正苦于以下问题:Java ConfigVars类的具体用法?Java ConfigVars怎么用?Java ConfigVars使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ConfigVars类属于com.github.sakserv.minicluster.config包,在下文中一共展示了ConfigVars类的40个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testMissingKdcKrbInstance

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingKdcKrbInstance() {
    exception.expect(IllegalArgumentException.class);
    new KdcLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_PORT_KEY)))
            .setHost(propertyParser.getProperty(ConfigVars.KDC_HOST_KEY))
            .setBaseDir(propertyParser.getProperty(ConfigVars.KDC_BASEDIR_KEY))
            .setOrgDomain(propertyParser.getProperty(ConfigVars.KDC_ORG_DOMAIN_KEY))
            .setOrgName(propertyParser.getProperty(ConfigVars.KDC_ORG_NAME_KEY))
            .setPrincipals(propertyParser.getProperty(ConfigVars.KDC_PRINCIPALS_KEY).split(","))
            .setKrbInstance(null)
            .setInstance(propertyParser.getProperty(ConfigVars.KDC_INSTANCE_KEY))
            .setTransport(propertyParser.getProperty(ConfigVars.KDC_TRANSPORT))
            .setMaxTicketLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_TICKET_LIFETIME_KEY)))
            .setMaxRenewableLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_RENEWABLE_LIFETIME)))
            .setDebug(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.KDC_DEBUG)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:19,
代码来源:KdcLocalClusterTest.java

示例2: setUp

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws IOException {
    mrLocalCluster = new MRLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setJobHistoryAddress(propertyParser.getProperty(ConfigVars.MR_JOB_HISTORY_ADDRESS_KEY))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:19,
代码来源:MRLocalClusterTest.java

示例3: testMissingUseInJvmContainerExecutor

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingUseInJvmContainerExecutor() {
    exception.expect(IllegalArgumentException.class);
    MRLocalCluster mrLocalCluster = new MRLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setJobHistoryAddress(propertyParser.getProperty(ConfigVars.MR_JOB_HISTORY_ADDRESS_KEY))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:18,
代码来源:MRLocalClusterTest.java

示例4: testMissingResourceManagerWebappAddress

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingResourceManagerWebappAddress() {
    exception.expect(IllegalArgumentException.class);
    MRLocalCluster mrLocalCluster = new MRLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setJobHistoryAddress(propertyParser.getProperty(ConfigVars.MR_JOB_HISTORY_ADDRESS_KEY))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:18,
代码来源:MRLocalClusterTest.java

示例5: testHsqldbLocalServer

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testHsqldbLocalServer() throws ClassNotFoundException, SQLException {

    LOG.info("HSQLDB: Running User: {}", System.getProperty("user.name"));

    LOG.info("HSQLDB: Loading the JDBC Driver: {}", propertyParser.getProperty(ConfigVars.HSQLDB_JDBC_DRIVER_KEY));
    Class.forName(propertyParser.getProperty(ConfigVars.HSQLDB_JDBC_DRIVER_KEY));

    // Get the connection
    Connection connection = DriverManager.getConnection(
            propertyParser.getProperty(ConfigVars.HSQLDB_JDBC_CONNECTION_STRING_PREFIX_KEY) + 
            propertyParser.getProperty(ConfigVars.HSQLDB_HOSTNAME_KEY) + ":" +
            propertyParser.getProperty(ConfigVars.HSQLDB_PORT_KEY) + "/" +
            propertyParser.getProperty(ConfigVars.HSQLDB_DATABASE_NAME_KEY),
            "SA", "");
    assertThat(connection.getMetaData().getURL(),
            containsString(propertyParser.getProperty(ConfigVars.HSQLDB_DATABASE_NAME_KEY)));
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:19,
代码来源:HsqldbLocalServerIntegrationTest.java

示例6: testMissingKdcDomain

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingKdcDomain() {
    exception.expect(IllegalArgumentException.class);
    new KdcLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_PORT_KEY)))
            .setHost(propertyParser.getProperty(ConfigVars.KDC_HOST_KEY))
            .setBaseDir(propertyParser.getProperty(ConfigVars.KDC_BASEDIR_KEY))
            .setOrgDomain(null)
            .setOrgName(propertyParser.getProperty(ConfigVars.KDC_ORG_NAME_KEY))
            .setPrincipals(propertyParser.getProperty(ConfigVars.KDC_PRINCIPALS_KEY).split(","))
            .setKrbInstance(propertyParser.getProperty(ConfigVars.KDC_KRBINSTANCE_KEY))
            .setInstance(propertyParser.getProperty(ConfigVars.KDC_INSTANCE_KEY))
            .setTransport(propertyParser.getProperty(ConfigVars.KDC_TRANSPORT))
            .setMaxTicketLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_TICKET_LIFETIME_KEY)))
            .setMaxRenewableLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_RENEWABLE_LIFETIME)))
            .setDebug(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.KDC_DEBUG)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:19,
代码来源:KdcLocalClusterTest.java

示例7: setUp

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws IOException {
    yarnLocalCluster = new YarnLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setNumLocalDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOCAL_DIRS_KEY)))
            .setNumLogDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOG_DIRS_KEY)))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:20,
代码来源:YarnLocalClusterTest.java

示例8: testMissingNumLogDirs

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingNumLogDirs() {
    exception.expect(IllegalArgumentException.class);
    YarnLocalCluster yarnLocalCluster = new YarnLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setNumLocalDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOCAL_DIRS_KEY)))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:20,
代码来源:YarnLocalClusterTest.java

示例9: setUp

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() {
    kdcLocalCluster = new KdcLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_PORT_KEY)))
            .setHost(propertyParser.getProperty(ConfigVars.KDC_HOST_KEY))
            .setBaseDir(propertyParser.getProperty(ConfigVars.KDC_BASEDIR_KEY))
            .setOrgDomain(propertyParser.getProperty(ConfigVars.KDC_ORG_DOMAIN_KEY))
            .setOrgName(propertyParser.getProperty(ConfigVars.KDC_ORG_NAME_KEY))
            .setPrincipals(propertyParser.getProperty(ConfigVars.KDC_PRINCIPALS_KEY).split(","))
            .setKrbInstance(propertyParser.getProperty(ConfigVars.KDC_KRBINSTANCE_KEY))
            .setInstance(propertyParser.getProperty(ConfigVars.KDC_INSTANCE_KEY))
            .setTransport(propertyParser.getProperty(ConfigVars.KDC_TRANSPORT))
            .setMaxTicketLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_TICKET_LIFETIME_KEY)))
            .setMaxRenewableLifetime(Integer.parseInt(propertyParser.getProperty(ConfigVars.KDC_MAX_RENEWABLE_LIFETIME)))
            .setDebug(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.KDC_DEBUG)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:18,
代码来源:KdcLocalClusterTest.java

示例10: testMissingResourceManagerResourceTrackerAddress

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingResourceManagerResourceTrackerAddress() {
    exception.expect(IllegalArgumentException.class);
    YarnLocalCluster yarnLocalCluster = new YarnLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setNumLocalDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOCAL_DIRS_KEY)))
            .setNumLogDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOG_DIRS_KEY)))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:19,
代码来源:YarnLocalClusterTest.java

示例11: setUp

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
    zookeeperLocalCluster = new ZookeeperLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setTempDir(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
    zookeeperLocalCluster.start();

    kafkaLocalBroker = new KafkaLocalBroker.Builder()
            .setKafkaHostname(propertyParser.getProperty(ConfigVars.KAFKA_HOSTNAME_KEY))
            .setKafkaPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.KAFKA_PORT_KEY)))
            .setKafkaBrokerId(Integer.parseInt(propertyParser.getProperty(ConfigVars.KAFKA_TEST_BROKER_ID_KEY)))
            .setKafkaProperties(new Properties())
            .setKafkaTempDir(propertyParser.getProperty(ConfigVars.KAFKA_TEST_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
    kafkaLocalBroker.start();

}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:21,
代码来源:KafkaLocalBrokerIntegrationTest.java

示例12: testZookeeperCluster

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testZookeeperCluster() throws Exception {
    assertEquals(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY),
            zookeeperLocalCluster.getZookeeperConnectionString());

    String znode = "/zooooooo";
    String child1 = "child1";
    String child2 = "child2";

    try (CuratorFramework client = CuratorFrameworkFactory.newClient(zookeeperLocalCluster.getZookeeperConnectionString(),
            new ExponentialBackoffRetry(1000, 3))) {
        client.start();

        client.create().withMode(CreateMode.PERSISTENT).forPath(znode);

        client.create().withMode(CreateMode.PERSISTENT).forPath(znode + "/" + child1);
        client.create().withMode(CreateMode.PERSISTENT).forPath(znode + "/" + child2);

        List<String> children = client.getChildren().forPath(znode);
        assertEquals(2, children.size());
        assertTrue(children.contains(child1));
        assertTrue(children.contains(child2));
    }
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:25,
代码来源:ZookeeperLocalClusterIntegrationTest.java

示例13: setUp

点赞 3

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
    yarnLocalCluster = new YarnLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setNumLocalDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOCAL_DIRS_KEY)))
            .setNumLogDirs(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_LOG_DIRS_KEY)))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setConfig(new Configuration())
            .build();

    yarnLocalCluster.start();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:22,
代码来源:YarnLocalClusterIntegrationTest.java

示例14: testZookeeper

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testZookeeper() throws Exception {

    try (CuratorFramework client = CuratorFrameworkFactory.newClient(zookeeperLocalCluster.getZookeeperConnectionString(),
            new ExponentialBackoffRetry(1000, 3))) {
        client.start();
        client.getChildren().forPath("/");
        fail();
    } catch (KeeperException.AuthFailedException e) {
        LOG.debug("Not authenticated!");
    }

    System.setProperty("zookeeper.sasl.client", "true");
    System.setProperty("zookeeper.sasl.clientconfig", "Client");
    javax.security.auth.login.Configuration.setConfiguration(new Jaas()
            .addEntry("Client", kdcLocalCluster.getKrbPrincipalWithRealm("guest"), kdcLocalCluster.getKeytabForPrincipal("guest")));

    try (CuratorFramework client = CuratorFrameworkFactory.newClient(zookeeperLocalCluster.getZookeeperConnectionString(),
            new ExponentialBackoffRetry(1000, 3))) {
        client.start();
        client.getChildren().forPath("/").forEach(LOG::debug);

        List<ACL> perms = new ArrayList<>();
        perms.add(new ACL(ZooDefs.Perms.ALL, ZooDefs.Ids.AUTH_IDS));
        perms.add(new ACL(ZooDefs.Perms.READ, ZooDefs.Ids.ANYONE_ID_UNSAFE));

        client.create().withMode(CreateMode.PERSISTENT).withACL(perms).forPath(propertyParser.getProperty(ConfigVars.HBASE_ZNODE_PARENT_KEY));
    }
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:30,
代码来源:KdcLocalClusterZookeeperIntegrationTest.java

示例15: testEmptyConfigure

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testEmptyConfigure() throws Exception {
    ZookeeperLocalCluster zookeeperLocalCluster = new ZookeeperLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setTempDir(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
    zookeeperLocalCluster.configure();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:10,
代码来源:ZookeeperLocalClusterTest.java

示例16: testMissingHdfsNamenodePort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHdfsNamenodePort() {
    exception.expect(IllegalArgumentException.class);
    hdfsLocalCluster = new HdfsLocalCluster.Builder()
            .setHdfsTempDir(propertyParser.getProperty(ConfigVars.HDFS_TEMP_DIR_KEY))
            .setHdfsNumDatanodes(Integer.parseInt(propertyParser.getProperty(ConfigVars.HDFS_NUM_DATANODES_KEY)))
            .setHdfsEnablePermissions(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_ENABLE_PERMISSIONS_KEY)))
            .setHdfsFormat(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_FORMAT_KEY)))
            .setHdfsConfig(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:13,
代码来源:HdfsLocalClusterTest.java

示例17: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
    dfsCluster = new HdfsLocalCluster.Builder()
            .setHdfsNamenodePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HDFS_NAMENODE_PORT_KEY)))
            .setHdfsTempDir(propertyParser.getProperty(ConfigVars.HDFS_TEMP_DIR_KEY))
            .setHdfsNumDatanodes(Integer.parseInt(propertyParser.getProperty(ConfigVars.HDFS_NUM_DATANODES_KEY)))
            .setHdfsEnablePermissions(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_ENABLE_PERMISSIONS_KEY)))
            .setHdfsFormat(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_FORMAT_KEY)))
            .setHdfsConfig(new Configuration())
            .build();
    dfsCluster.start();

    mrLocalCluster = new MRLocalCluster.Builder()
            .setNumNodeManagers(Integer.parseInt(propertyParser.getProperty(ConfigVars.YARN_NUM_NODE_MANAGERS_KEY)))
            .setJobHistoryAddress(propertyParser.getProperty(ConfigVars.MR_JOB_HISTORY_ADDRESS_KEY))
            .setResourceManagerAddress(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setResourceManagerHostname(propertyParser.getProperty(ConfigVars.YARN_RESOURCE_MANAGER_HOSTNAME_KEY))
            .setResourceManagerSchedulerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_SCHEDULER_ADDRESS_KEY))
            .setResourceManagerResourceTrackerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_RESOURCE_TRACKER_ADDRESS_KEY))
            .setResourceManagerWebappAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_WEBAPP_ADDRESS_KEY))
            .setUseInJvmContainerExecutor(Boolean.parseBoolean(propertyParser.getProperty(
                    ConfigVars.YARN_USE_IN_JVM_CONTAINER_EXECUTOR_KEY)))
            .setHdfsDefaultFs(dfsCluster.getHdfsConfig().get("fs.defaultFS"))
            .setConfig(new Configuration())
            .build();

    mrLocalCluster.start();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:33,
代码来源:MRLocalClusterIntegrationTest.java

示例18: testMissingKafkaBrokerId

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingKafkaBrokerId() {
    exception.expect(IllegalArgumentException.class);
    KafkaLocalBroker kafkaLocalBroker = new KafkaLocalBroker.Builder()
            .setKafkaHostname(propertyParser.getProperty(ConfigVars.KAFKA_HOSTNAME_KEY))
            .setKafkaPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.KAFKA_PORT_KEY)))
            .setKafkaProperties(new Properties())
            .setKafkaTempDir(propertyParser.getProperty(ConfigVars.KAFKA_TEST_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:12,
代码来源:KafkaLocalBrokerTest.java

示例19: testMissingHdfsConf

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHdfsConf() {
    exception.expect(IllegalArgumentException.class);
    hdfsLocalCluster = new HdfsLocalCluster.Builder()
            .setHdfsNamenodePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HDFS_NAMENODE_PORT_KEY)))
            .setHdfsTempDir(propertyParser.getProperty(ConfigVars.HDFS_TEMP_DIR_KEY))
            .setHdfsNumDatanodes(Integer.parseInt(propertyParser.getProperty(ConfigVars.HDFS_NUM_DATANODES_KEY)))
            .setHdfsEnablePermissions(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_ENABLE_PERMISSIONS_KEY)))
            .setHdfsFormat(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HDFS_FORMAT_KEY)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:13,
代码来源:HdfsLocalClusterTest.java

示例20: testMissingHiveWarehouseDir

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHiveWarehouseDir() {
    exception.expect(IllegalArgumentException.class);
    hiveLocalServer2 = new HiveLocalServer2.Builder()
            .setHiveServer2Hostname(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_HOSTNAME_KEY))
            .setHiveServer2Port(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_PORT_KEY)))
            .setHiveMetastoreHostname(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_HOSTNAME_KEY))
            .setHiveMetastorePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_PORT_KEY)))
            .setHiveMetastoreDerbyDbDir(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_DERBY_DB_DIR_KEY))
            .setHiveScratchDir(propertyParser.getProperty(ConfigVars.HIVE_SCRATCH_DIR_KEY))
            .setHiveConf(buildHiveConf())
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:15,
代码来源:HiveLocalServer2Test.java

示例21: testMissingHbaseMasterPort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHbaseMasterPort() {
    exception.expect(IllegalArgumentException.class);
    hbaseLocalCluster = new HbaseLocalCluster.Builder()
            .setHbaseMasterInfoPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_INFO_PORT_KEY)))
            .setNumRegionServers(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_NUM_REGION_SERVERS_KEY)))
            .setHbaseRootDir(propertyParser.getProperty(ConfigVars.HBASE_ROOT_DIR_KEY))
            .setZookeeperPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .setZookeeperZnodeParent(propertyParser.getProperty(ConfigVars.HBASE_ZNODE_PARENT_KEY))
            .setHbaseWalReplicationEnabled(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HBASE_WAL_REPLICATION_ENABLED_KEY)))
            .setHbaseConfiguration(new Configuration())
            .activeRestGateway()
                .setHbaseRestHost(propertyParser.getProperty(ConfigVars.HBASE_REST_HOST_KEY))
                .setHbaseRestPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_PORT_KEY)))
                .setHbaseRestInfoPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_INFO_PORT_KEY)))
                .setHbaseRestReadOnly(
                        Boolean.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_READONLY_KEY)))
                .setHbaseRestThreadMax(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMAX_KEY)))
                .setHbaseRestThreadMin(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMIN_KEY)))
                .build()
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:31,
代码来源:HbaseLocalClusterTest.java

示例22: testMissingQueueName

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingQueueName() throws Exception {
    exception.expect(IllegalArgumentException.class);
    amq = new ActivemqLocalBroker.Builder()
            .setHostName(propertyParser.getProperty(ConfigVars.ACTIVEMQ_HOSTNAME_KEY))
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ACTIVEMQ_PORT_KEY)))
            .setStoreDir(propertyParser.getProperty(ConfigVars.ACTIVEMQ_STORE_DIR_KEY))
            .setUriPrefix(propertyParser.getProperty(ConfigVars.ACTIVEMQ_URI_PREFIX_KEY))
            .setUriPostfix(propertyParser.getProperty(ConfigVars.ACTIVEMQ_URI_POSTFIX_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:12,
代码来源:ActivemqLocalBrokerTest.java

示例23: testMissingHbaseNumRegionsServers

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHbaseNumRegionsServers() {
    exception.expect(IllegalArgumentException.class);
    hbaseLocalCluster = new HbaseLocalCluster.Builder()
            .setHbaseMasterPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_PORT_KEY)))
            .setHbaseMasterInfoPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_INFO_PORT_KEY)))
            .setHbaseRootDir(propertyParser.getProperty(ConfigVars.HBASE_ROOT_DIR_KEY))
            .setZookeeperPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .setZookeeperZnodeParent(propertyParser.getProperty(ConfigVars.HBASE_ZNODE_PARENT_KEY))
            .setHbaseWalReplicationEnabled(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HBASE_WAL_REPLICATION_ENABLED_KEY)))
            .setHbaseConfiguration(new Configuration())
            .activeRestGateway()
                .setHbaseRestHost(propertyParser.getProperty(ConfigVars.HBASE_REST_HOST_KEY))
                .setHbaseRestPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_PORT_KEY)))
                .setHbaseRestInfoPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_INFO_PORT_KEY)))
                .setHbaseRestReadOnly(
                        Boolean.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_READONLY_KEY)))
                .setHbaseRestThreadMax(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMAX_KEY)))
                .setHbaseRestThreadMin(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMIN_KEY)))
                .build()
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:31,
代码来源:HbaseLocalClusterTest.java

示例24: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {

    zookeeperLocalCluster = new ZookeeperLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setTempDir(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
    zookeeperLocalCluster.start();

    hiveLocalMetaStore = new HiveLocalMetaStore.Builder()
            .setHiveMetastoreHostname(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_HOSTNAME_KEY))
            .setHiveMetastorePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_PORT_KEY)) + 50)
            .setHiveMetastoreDerbyDbDir(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_DERBY_DB_DIR_KEY))
            .setHiveScratchDir(propertyParser.getProperty(ConfigVars.HIVE_SCRATCH_DIR_KEY))
            .setHiveWarehouseDir(propertyParser.getProperty(ConfigVars.HIVE_WAREHOUSE_DIR_KEY))
            .setHiveConf(buildHiveConf())
            .build();
    hiveLocalMetaStore.start();

    
    hiveLocalServer2 = new HiveLocalServer2.Builder()
            .setHiveServer2Hostname(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_HOSTNAME_KEY))
            .setHiveServer2Port(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_PORT_KEY)))
            .setHiveMetastoreHostname(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_HOSTNAME_KEY))
            .setHiveMetastorePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_PORT_KEY)) + 50)
            .setHiveMetastoreDerbyDbDir(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_DERBY_DB_DIR_KEY))
            .setHiveScratchDir(propertyParser.getProperty(ConfigVars.HIVE_SCRATCH_DIR_KEY))
            .setHiveWarehouseDir(propertyParser.getProperty(ConfigVars.HIVE_WAREHOUSE_DIR_KEY))
            .setHiveConf(buildHiveConf())
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
    hiveLocalServer2.start();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:35,
代码来源:HiveLocalServer2IntegrationTest.java

示例25: testMissingHbaseRootDir

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHbaseRootDir() {
    exception.expect(IllegalArgumentException.class);
    hbaseLocalCluster = new HbaseLocalCluster.Builder()
            .setHbaseMasterPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_PORT_KEY)))
            .setHbaseMasterInfoPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_INFO_PORT_KEY)))
            .setNumRegionServers(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_NUM_REGION_SERVERS_KEY)))
            .setZookeeperPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .setZookeeperZnodeParent(propertyParser.getProperty(ConfigVars.HBASE_ZNODE_PARENT_KEY))
            .setHbaseWalReplicationEnabled(
                    Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.HBASE_WAL_REPLICATION_ENABLED_KEY)))
            .setHbaseConfiguration(new Configuration())
            .activeRestGateway()
                .setHbaseRestHost(propertyParser.getProperty(ConfigVars.HBASE_REST_HOST_KEY))
                .setHbaseRestPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_PORT_KEY)))
                .setHbaseRestInfoPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_INFO_PORT_KEY)))
                .setHbaseRestReadOnly(
                        Boolean.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_READONLY_KEY)))
                .setHbaseRestThreadMax(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMAX_KEY)))
                .setHbaseRestThreadMin(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMIN_KEY)))
                .build()
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:32,
代码来源:HbaseLocalClusterTest.java

示例26: testMissingNumWorkers

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingNumWorkers() {
    exception.expect(IllegalArgumentException.class);
    stormLocalCluster = new StormLocalCluster.Builder()
            .setZookeeperHost(propertyParser.getProperty(ConfigVars.ZOOKEEPER_HOST_KEY))
            .setZookeeperPort(Long.parseLong(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setEnableDebug(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.STORM_ENABLE_DEBUG_KEY)))
            .setStormConfig(new Config())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:11,
代码来源:StormLocalClusterTest.java

示例27: testMissingPort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingPort() {
    exception.expect(IllegalArgumentException.class);
    ZookeeperLocalCluster zookeeperLocalCluster = new ZookeeperLocalCluster.Builder()
            .setTempDir(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:9,
代码来源:ZookeeperLocalClusterTest.java

示例28: testMissingOozieGroupname

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingOozieGroupname() {
    exception.expect(IllegalArgumentException.class);
    OozieLocalServer oozieLocalServer = new OozieLocalServer.Builder()
            .setOozieTestDir(propertyParser.getProperty(ConfigVars.OOZIE_TEST_DIR_KEY))
            .setOozieHomeDir(propertyParser.getProperty(ConfigVars.OOZIE_HOME_DIR_KEY))
            .setOozieUsername(System.getProperty("user.name"))
            .setOozieYarnResourceManagerAddress(propertyParser.getProperty(
                    ConfigVars.YARN_RESOURCE_MANAGER_ADDRESS_KEY))
            .setOozieHdfsDefaultFs(defaultFs)
            .setOozieConf(new Configuration())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:14,
代码来源:OozieLocalServerTest.java

示例29: testMissingHbaseRestPort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHbaseRestPort() {
    exception.expect(IllegalArgumentException.class);
    hbaseLocalCluster = new HbaseLocalCluster.Builder()
            .setHbaseMasterPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_PORT_KEY)))
            .setHbaseMasterInfoPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_MASTER_INFO_PORT_KEY)))
            .setNumRegionServers(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_NUM_REGION_SERVERS_KEY)))
            .setHbaseRootDir(propertyParser.getProperty(ConfigVars.HBASE_ROOT_DIR_KEY))
            .setZookeeperPort(
                    Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .setZookeeperZnodeParent(propertyParser.getProperty(ConfigVars.HBASE_ZNODE_PARENT_KEY))
            .activeRestGateway()
                .setHbaseRestHost(propertyParser.getProperty(ConfigVars.HBASE_REST_HOST_KEY))
                .setHbaseRestPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_PORT_KEY)))
                .setHbaseRestInfoPort(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_INFO_PORT_KEY)))
                .setHbaseRestReadOnly(
                        Boolean.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_READONLY_KEY)))
                .setHbaseRestThreadMax(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMAX_KEY)))
                .setHbaseRestThreadMin(
                        Integer.valueOf(propertyParser.getProperty(ConfigVars.HBASE_REST_THREADMIN_KEY)))
                .build()
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:31,
代码来源:HbaseLocalClusterTest.java

示例30: testMissingKnoxPort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingKnoxPort() {
    exception.expect(IllegalArgumentException.class);
    knoxLocalCluster = new KnoxLocalCluster.Builder()
            .setHomeDir(propertyParser.getProperty(ConfigVars.KNOX_HOME_DIR_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:8,
代码来源:KnoxLocalClusterTest.java

示例31: testMissingHiveMetastoreHostname

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHiveMetastoreHostname() {
    exception.expect(IllegalArgumentException.class);
    hiveLocalServer2 = new HiveLocalServer2.Builder()
            .setHiveServer2Hostname(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_HOSTNAME_KEY))
            .setHiveServer2Port(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_SERVER2_PORT_KEY)))
            .setHiveMetastorePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_PORT_KEY)))
            .setHiveMetastoreDerbyDbDir(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_DERBY_DB_DIR_KEY))
            .setHiveScratchDir(propertyParser.getProperty(ConfigVars.HIVE_SCRATCH_DIR_KEY))
            .setHiveWarehouseDir(propertyParser.getProperty(ConfigVars.HIVE_WAREHOUSE_DIR_KEY))
            .setHiveConf(buildHiveConf())
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:15,
代码来源:HiveLocalServer2Test.java

示例32: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
    zookeeperLocalCluster = new ZookeeperLocalCluster.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_PORT_KEY)))
            .setTempDir(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TEMP_DIR_KEY))
            .setZookeeperConnectionString(propertyParser.getProperty(ConfigVars.ZOOKEEPER_CONNECTION_STRING_KEY))
            .setMaxClientCnxns(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_MAX_CLIENT_CNXNS_KEY)))
            .setElectionPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_ELECTION_PORT_KEY)))
            .setQuorumPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_QUORUM_PORT_KEY)))
            .setDeleteDataDirectoryOnClose(Boolean.parseBoolean(propertyParser.getProperty(ConfigVars.ZOOKEEPER_DELETE_DATA_DIRECTORY_ON_CLOSE_KEY)))
            .setServerId(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_SERVER_ID_KEY)))
            .setTickTime(Integer.parseInt(propertyParser.getProperty(ConfigVars.ZOOKEEPER_TICKTIME_KEY)))
            .build();
    zookeeperLocalCluster.start();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:16,
代码来源:ZookeeperLocalClusterIntegrationTest.java

示例33: testHbaseLocalCluster

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testHbaseLocalCluster() throws Exception {

    String tableName = propertyParser.getProperty(ConfigVars.HBASE_TEST_TABLE_NAME_KEY);
    String colFamName = propertyParser.getProperty(ConfigVars.HBASE_TEST_COL_FAMILY_NAME_KEY);
    String colQualiferName = propertyParser.getProperty(ConfigVars.HBASE_TEST_COL_QUALIFIER_NAME_KEY);
    Integer numRowsToPut = Integer.parseInt(propertyParser.getProperty(ConfigVars.HBASE_TEST_NUM_ROWS_TO_PUT_KEY));
    Configuration configuration = hbaseLocalCluster.getHbaseConfiguration();

    LOG.info("HBASE: Deleting table {}", tableName);
    deleteHbaseTable(tableName, configuration);

    LOG.info("HBASE: Creating table {} with column family {}", tableName, colFamName);
    createHbaseTable(tableName, colFamName, configuration);

    LOG.info("HBASE: Populate the table with {} rows.", numRowsToPut);
    for (int i=0; i<numRowsToPut; i++) {
        putRow(tableName, colFamName, String.valueOf(i), colQualiferName, "row_" + i, configuration);
    }

    LOG.info("HBASE: Fetching and comparing the results");
    for (int i=0; i<numRowsToPut; i++) {
        Result result = getRow(tableName, colFamName, String.valueOf(i), colQualiferName, configuration);
        assertEquals("row_" + i, new String(result.value()));
    }

}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:28,
代码来源:HbaseLocalClusterIntegrationTest.java

示例34: testHbaseRestLocalCluster

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testHbaseRestLocalCluster() throws Exception {
    URL url = new URL(
            String.format("http://localhost:%s/status/cluster/",
                    propertyParser.getProperty(ConfigVars.HBASE_REST_PORT_KEY)));
    URLConnection connection = url.openConnection();
    connection.setRequestProperty("Accept-Charset", "UTF-8");
    try (BufferedReader response = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
        String line = response.readLine();
        assertTrue(line.contains("2 live servers, 0 dead servers"));
    }

}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:14,
代码来源:HbaseLocalClusterIntegrationTest.java

示例35: testMissingHiveMetastoreHostname

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingHiveMetastoreHostname() {
    exception.expect(IllegalArgumentException.class);
    hiveLocalMetaStore = new HiveLocalMetaStore.Builder()
            .setHiveMetastorePort(Integer.parseInt(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_PORT_KEY)))
            .setHiveMetastoreDerbyDbDir(propertyParser.getProperty(ConfigVars.HIVE_METASTORE_DERBY_DB_DIR_KEY))
            .setHiveScratchDir(propertyParser.getProperty(ConfigVars.HIVE_SCRATCH_DIR_KEY))
            .setHiveWarehouseDir(propertyParser.getProperty(ConfigVars.HIVE_WAREHOUSE_DIR_KEY))
            .setHiveConf(buildHiveConf())
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:12,
代码来源:HiveLocalMetaStoreTest.java

示例36: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() {
    mongodbLocalServer = new MongodbLocalServer.Builder()
            .setIp(propertyParser.getProperty(ConfigVars.MONGO_IP_KEY))
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.MONGO_PORT_KEY)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:8,
代码来源:MongodbLocalServerTest.java

示例37: testMissingIp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingIp() {
    exception.expect(IllegalArgumentException.class);
    MongodbLocalServer mongodbLocalServer = new MongodbLocalServer.Builder()
            .setPort(Integer.parseInt(propertyParser.getProperty(ConfigVars.MONGO_PORT_KEY)))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:8,
代码来源:MongodbLocalServerTest.java

示例38: testMissingPort

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@Test
public void testMissingPort() {
    exception.expect(IllegalArgumentException.class);
    MongodbLocalServer mongodbLocalServer = new MongodbLocalServer.Builder()
            .setIp(propertyParser.getProperty(ConfigVars.MONGO_IP_KEY))
            .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:8,
代码来源:MongodbLocalServerTest.java

示例39: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
    hsqldbLocalServer = new HsqldbLocalServer.Builder()
        .setHsqldbHostName(propertyParser.getProperty(ConfigVars.HSQLDB_HOSTNAME_KEY))
        .setHsqldbPort(propertyParser.getProperty(ConfigVars.HSQLDB_PORT_KEY))
        .setHsqldbTempDir(propertyParser.getProperty(ConfigVars.HSQLDB_TEMP_DIR_KEY))
        .setHsqldbDatabaseName(propertyParser.getProperty(ConfigVars.HSQLDB_DATABASE_NAME_KEY))
        .setHsqldbCompatibilityMode(propertyParser.getProperty(ConfigVars.HSQLDB_COMPATIBILITY_MODE_KEY))
        .setHsqldbJdbcDriver(propertyParser.getProperty(ConfigVars.HSQLDB_JDBC_DRIVER_KEY))
        .setHsqldbJdbcConnectionStringPrefix(propertyParser.getProperty(
                ConfigVars.HSQLDB_JDBC_CONNECTION_STRING_PREFIX_KEY))
        .build();
    hsqldbLocalServer.start();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:15,
代码来源:HsqldbLocalServerIntegrationTest.java

示例40: setUp

点赞 2

import com.github.sakserv.minicluster.config.ConfigVars; //导入依赖的package包/类
@BeforeClass
public static void setUp() {
    hsqldbLocalServer = new HsqldbLocalServer.Builder()
        .setHsqldbHostName(propertyParser.getProperty(ConfigVars.HSQLDB_HOSTNAME_KEY))
        .setHsqldbPort(propertyParser.getProperty(ConfigVars.HSQLDB_PORT_KEY))
        .setHsqldbTempDir(propertyParser.getProperty(ConfigVars.HSQLDB_TEMP_DIR_KEY))
        .setHsqldbDatabaseName(propertyParser.getProperty(ConfigVars.HSQLDB_DATABASE_NAME_KEY))
        .setHsqldbCompatibilityMode(propertyParser.getProperty(ConfigVars.HSQLDB_COMPATIBILITY_MODE_KEY))
        .setHsqldbJdbcDriver(propertyParser.getProperty(ConfigVars.HSQLDB_JDBC_DRIVER_KEY))
        .setHsqldbJdbcConnectionStringPrefix(propertyParser.getProperty(
                ConfigVars.HSQLDB_JDBC_CONNECTION_STRING_PREFIX_KEY))
        .build();
}
 

开发者ID:sakserv,
项目名称:hadoop-mini-clusters,
代码行数:14,
代码来源:HsqldbLocalServerTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)