@Test public void testExecute() throws Exception { String metadataPath = tempMetadataDir.getPath(); String inputPath = "src/main/resources/SCSinkTools.json"; SCCreator cli = new SCCreator(); cli.execute("ADMIN", metadataPath, inputPath); Assert.assertTrue(tempMetadataDir.isDirectory()); KylinConfig local = KylinConfig.createKylinConfig(KylinConfig.getInstanceFromEnv()); local.setMetadataUrl(metadataPath); CubeManager cubeManager = CubeManager.getInstance(local); List<CubeInstance> cubeList = cubeManager.listAllCubes(); System.out.println("System cubes: " + cubeList); assertEquals(cubeList.size(), 10); for (CubeInstance cube : cubeList) { Assert.assertTrue(cube.getStatus() != RealizationStatusEnum.DESCBROKEN); } }
protected void execute(OptionsHelper optionsHelper) throws Exception { String owner = optionsHelper.getOptionValue(OPTION_OWNER); String output = optionsHelper.getOptionValue(OPTION_OUTPUT); String inputConfig = optionsHelper.getOptionValue(OPTION_INPUT_CONFIG); if (Strings.isNullOrEmpty(inputConfig)) { throw new FileNotFoundException("Input configuration file should be specified!!!"); } execute(owner, output, inputConfig); }
SCCreator extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String owner = optionsHelper.getOptionValue(OPTION_OWNER); String output = optionsHelper.getOptionValue(OPTION_OUTPUT); String inputConfig = optionsHelper.getOptionValue(OPTION_INPUT_CONFIG); if (Strings.isNullOrEmpty(inputConfig)) { throw new FileNotFoundException("Input configuration file should be specified!!!"); } execute(owner, output, inputConfig); } }
SCCreator extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String owner = optionsHelper.getOptionValue(OPTION_OWNER); String output = optionsHelper.getOptionValue(OPTION_OUTPUT); String inputConfig = optionsHelper.getOptionValue(OPTION_INPUT_CONFIG); if (Strings.isNullOrEmpty(inputConfig)) { throw new FileNotFoundException("Input configuration file should be specified!!!"); } execute(owner, output, inputConfig); } SCCreator(); }
SCCreator extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String owner = optionsHelper.getOptionValue(OPTION_OWNER); String output = optionsHelper.getOptionValue(OPTION_OUTPUT); String inputConfig = optionsHelper.getOptionValue(OPTION_INPUT_CONFIG); if (Strings.isNullOrEmpty(inputConfig)) { throw new FileNotFoundException("Input configuration file should be specified!!!"); } execute(owner, output, inputConfig); } SCCreator(); static void main(String[] args); void execute(String owner, String output, String inputConfig); }
SCCreator extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String owner = optionsHelper.getOptionValue(OPTION_OWNER); String output = optionsHelper.getOptionValue(OPTION_OUTPUT); String inputConfig = optionsHelper.getOptionValue(OPTION_INPUT_CONFIG); if (Strings.isNullOrEmpty(inputConfig)) { throw new FileNotFoundException("Input configuration file should be specified!!!"); } execute(owner, output, inputConfig); } SCCreator(); static void main(String[] args); void execute(String owner, String output, String inputConfig);  }