public static void setSandboxEnvIfPossible() { File dir1 = new File("../examples/test_case_data/sandbox"); File dir2 = new File("../../kylin/examples/test_case_data/sandbox"); if (dir1.exists()) { logger.info("Setting sandbox env, KYLIN_CONF=" + dir1.getAbsolutePath()); ClassUtil.addClasspath(dir1.getAbsolutePath()); System.setProperty(KylinConfig.KYLIN_CONF, dir1.getAbsolutePath()); } else if (dir2.exists()) { logger.info("Setting sandbox env, KYLIN_CONF=" + dir2.getAbsolutePath()); ClassUtil.addClasspath(dir2.getAbsolutePath()); System.setProperty(KylinConfig.KYLIN_CONF, dir2.getAbsolutePath()); } }
@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"); } }
@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); }
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(); } }
@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 }
@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("hdp.version", "2.2.0.0-2041"); // mapred-site.xml ref this }
@Before public void setup() throws Exception { ClassUtil.addClasspath(new File("../examples/test_case_data/hadoop-site").getAbsolutePath()); }
@BeforeClass public static void setup() throws Exception { ClassUtil.addClasspath(new File("../examples/test_case_data/hadoop-site").getAbsolutePath()); }
@Before public void before() throws Exception { String confPaths = System.getenv("KYLIN_HBASE_CONF_PATH"); System.out.println("The conf paths is " + confPaths); if (confPaths != null) { String[] paths = confPaths.split(":"); for (String path : paths) { if (!StringUtils.isEmpty(path)) { try { ClassUtil.addClasspath(new File(path).getAbsolutePath()); } catch (Exception e) { System.out.println(e.getLocalizedMessage()); System.out.println(e.getStackTrace()); } } } } }
@Before public void setup() throws Exception { super.createTestMetadata(); ClassUtil.addClasspath(new File(AbstractKylinTestCase.SANDBOX_TEST_DATA).getAbsolutePath()); }
public static void setSandboxEnvIfPossible() { File dir1 = new File("../examples/test_case_data/sandbox"); File dir2 = new File("../../kylin/examples/test_case_data/sandbox"); if (dir1.exists()) { logger.info("Setting sandbox env, KYLIN_CONF=" + dir1.getAbsolutePath()); ClassUtil.addClasspath(dir1.getAbsolutePath()); System.setProperty(KylinConfig.KYLIN_CONF, dir1.getAbsolutePath()); } else if (dir2.exists()) { logger.info("Setting sandbox env, KYLIN_CONF=" + dir2.getAbsolutePath()); ClassUtil.addClasspath(dir2.getAbsolutePath()); System.setProperty(KylinConfig.KYLIN_CONF, dir2.getAbsolutePath()); } }