本文整理汇总了Java中org.apache.kylin.common.util.HBaseMetadataTestCase类的典型用法代码示例。如果您正苦于以下问题:Java HBaseMetadataTestCase类的具体用法?Java HBaseMetadataTestCase怎么用?Java HBaseMetadataTestCase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HBaseMetadataTestCase类属于org.apache.kylin.common.util包,在下文中一共展示了HBaseMetadataTestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupAll
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
protected static void setupAll() throws Exception {
//setup env
HBaseMetadataTestCase.staticCreateTestMetadata();
config = KylinConfig.getInstanceFromEnv();
//setup cube conn
String project = ProjectInstance.DEFAULT_PROJECT_NAME;
cubeConnection = QueryConnection.getConnection(project);
//setup h2
h2Connection = DriverManager.getConnection("jdbc:h2:mem:db" + (h2InstanceCount++) + ";CACHE_SIZE=32072", "sa",
"");
// Load H2 Tables (inner join)
H2Database h2DB = new H2Database(h2Connection, config, project);
h2DB.loadAllTables();
}
示例2: main
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
System.setProperty("HADOOP_USER_NAME", "root");
logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
}
if (args.length < 1) {
printUsage();
return;
}
if ("reset".equalsIgnoreCase(args[0])) {
ResourceTool.main(new String[] { "reset" });
} else if ("download".equalsIgnoreCase(args[0])) {
ResourceTool.main(new String[] { "download", args[1] });
} else if ("fetch".equalsIgnoreCase(args[0])) {
ResourceTool.main(new String[] { "fetch", args[1], args[2] });
} else if ("upload".equalsIgnoreCase(args[0])) {
ResourceTool.main(new String[] { "upload", args[1] });
} else {
printUsage();
}
}
示例3: before
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@Before
public void before() throws Exception {
HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);
DeployUtil.initCliWorkDir();
DeployUtil.deployMetadata();
DeployUtil.overrideJobJarLocations();
final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
jobService = ExecutableManager.getInstance(kylinConfig);
scheduler = DefaultScheduler.getInstance();
scheduler.init(new JobEngineConfig(kylinConfig));
if (!scheduler.hasStarted()) {
throw new RuntimeException("scheduler has not been started");
}
cubeManager = CubeManager.getInstance(kylinConfig);
jobEngineConfig = new JobEngineConfig(kylinConfig);
for (String jobId : jobService.getAllJobIds()) {
if(jobService.getJob(jobId) instanceof CubingJob){
jobService.deleteJob(jobId);
}
}
}
示例4: beforeClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
}
}
示例5: before
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@Before
public void before() throws Exception {
HBaseMetadataTestCase.staticCreateTestMetadata(HBaseMetadataTestCase.SANDBOX_TEST_DATA);
DeployUtil.initCliWorkDir();
DeployUtil.deployMetadata();
DeployUtil.overrideJobJarLocations();
}
示例6: beforeClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void beforeClass() throws Exception {
logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
}
HBaseMetadataTestCase.staticCreateTestMetadata(HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}
示例7: clean
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
protected static void clean() {
if (cubeConnection != null)
closeConnection(cubeConnection);
if (h2Connection != null)
closeConnection(h2Connection);
HBaseMetadataTestCase.staticCleanupTestMetadata();
RemoveBlackoutRealizationsRule.blackList.clear();
}
示例8: beforeClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
System.setProperty(KylinConfig.KYLIN_CONF, "../examples/test_case_data/sandbox");
System.setProperty("hdp.version", "2.2.0.0-2041"); // mapred-site.xml ref this
}
示例9: before
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@Before
public void before() throws Exception {
HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);
DeployUtil.initCliWorkDir();
// DeployUtil.deployMetadata();
DeployUtil.overrideJobJarLocations();
final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
jobService = ExecutableManager.getInstance(kylinConfig);
scheduler = DefaultScheduler.getInstance();
scheduler.init(new JobEngineConfig(kylinConfig));
if (!scheduler.hasStarted()) {
throw new RuntimeException("scheduler has not been started");
}
iiManager = IIManager.getInstance(kylinConfig);
jobEngineConfig = new JobEngineConfig(kylinConfig);
for (String jobId : jobService.getAllJobIds()) {
if(jobService.getJob(jobId) instanceof IIJob){
jobService.deleteJob(jobId);
}
}
IIInstance ii = iiManager.getII(TEST_II_NAME);
if (ii.getStatus() != RealizationStatusEnum.DISABLED) {
ii.setStatus(RealizationStatusEnum.DISABLED);
iiManager.updateII(ii);
}
}
示例10: clean
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
protected static void clean() {
if (cubeConnection != null)
closeConnection(cubeConnection);
if (h2Connection != null)
closeConnection(h2Connection);
ObserverEnabler.forceCoprocessorUnset();
HBaseMetadataTestCase.staticCleanupTestMetadata();
}
示例11: after
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@After
public void after() {
HBaseMetadataTestCase.staticCleanupTestMetadata();
}
示例12: cleanup
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public void cleanup() throws Exception {
cleanupOldStorage();
HBaseMetadataTestCase.staticCleanupTestMetadata();
}
示例13: beforeClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void beforeClass() throws Exception {
beforeClass(HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}
示例14: afterClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void afterClass() {
HBaseMetadataTestCase.staticCleanupTestMetadata();
}
示例15: beforeClass
import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}