public class CubeMigrationCLI
extends org.apache.kylin.common.util.AbstractApplication
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CubeMigrationCLI.OptType |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
doAclCopy |
protected boolean |
doMigrateSegment |
protected boolean |
doOverwrite |
protected org.apache.kylin.common.KylinConfig |
dstConfig |
protected String |
dstProject |
protected org.apache.kylin.common.persistence.ResourceStore |
dstStore |
protected org.apache.hadoop.fs.FileSystem |
hdfsFS |
protected List<org.apache.kylin.tool.CubeMigrationCLI.Opt> |
operations |
protected org.apache.kylin.common.KylinConfig |
srcConfig |
protected org.apache.kylin.common.persistence.ResourceStore |
srcStore |
| Constructor and Description |
|---|
CubeMigrationCLI() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCubeAndModelIntoProject(org.apache.kylin.cube.CubeInstance srcCube,
String cubeName) |
protected void |
addOpt(CubeMigrationCLI.OptType type,
Object[] params) |
protected void |
changeHtableHost(org.apache.kylin.cube.CubeInstance cube) |
protected void |
checkAndGetHbaseUrl() |
protected void |
checkCubeState(org.apache.kylin.cube.CubeInstance cube) |
void |
checkMigrationSuccess(org.apache.kylin.common.KylinConfig kylinConfig,
String cubeName,
Boolean ifFix) |
protected void |
clearSegments(String cubeName) |
protected void |
copyFilesInMetaStore(org.apache.kylin.cube.CubeInstance cube) |
protected void |
doOpts() |
protected void |
execute(org.apache.kylin.common.util.OptionsHelper optionsHelper) |
protected org.apache.commons.cli.Options |
getOptions() |
protected void |
listCubeRelatedResources(org.apache.kylin.cube.CubeInstance cube,
List<String> metaResource,
Set<String> dictAndSnapshot) |
static void |
main(String[] args) |
void |
moveCube(org.apache.kylin.common.KylinConfig srcCfg,
org.apache.kylin.common.KylinConfig dstCfg,
String cubeName,
String projectName,
boolean copyAcl,
boolean purgeAndDisable,
boolean overwriteIfExists,
boolean realExecute,
boolean migrateSegment) |
void |
moveCube(org.apache.kylin.common.KylinConfig srcCfg,
org.apache.kylin.common.KylinConfig dstCfg,
String cubeName,
String projectName,
String copyAcl,
String purgeAndDisable,
String overwriteIfExists,
String realExecute) |
void |
moveCube(String srcCfgUri,
String dstCfgUri,
String cubeName,
String projectName,
String copyAcl,
String purgeAndDisable,
String overwriteIfExists,
String realExecute) |
void |
moveCube(String srcCfgUri,
String dstCfgUri,
String cubeName,
String projectName,
String copyAcl,
String purgeAndDisable,
String overwriteIfExists,
String realExecute,
String migrateSegment) |
protected void |
renameFoldersInHdfs(org.apache.kylin.cube.CubeInstance cube) |
protected void |
usage() |
protected List<org.apache.kylin.tool.CubeMigrationCLI.Opt> operations
protected org.apache.kylin.common.KylinConfig srcConfig
protected org.apache.kylin.common.KylinConfig dstConfig
protected org.apache.kylin.common.persistence.ResourceStore srcStore
protected org.apache.kylin.common.persistence.ResourceStore dstStore
protected org.apache.hadoop.fs.FileSystem hdfsFS
protected boolean doAclCopy
protected boolean doOverwrite
protected boolean doMigrateSegment
protected String dstProject
public static void main(String[] args) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected void usage()
public void moveCube(String srcCfgUri, String dstCfgUri, String cubeName, String projectName, String copyAcl, String purgeAndDisable, String overwriteIfExists, String realExecute) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void moveCube(org.apache.kylin.common.KylinConfig srcCfg,
org.apache.kylin.common.KylinConfig dstCfg,
String cubeName,
String projectName,
String copyAcl,
String purgeAndDisable,
String overwriteIfExists,
String realExecute)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void moveCube(String srcCfgUri, String dstCfgUri, String cubeName, String projectName, String copyAcl, String purgeAndDisable, String overwriteIfExists, String realExecute, String migrateSegment) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void moveCube(org.apache.kylin.common.KylinConfig srcCfg,
org.apache.kylin.common.KylinConfig dstCfg,
String cubeName,
String projectName,
boolean copyAcl,
boolean purgeAndDisable,
boolean overwriteIfExists,
boolean realExecute,
boolean migrateSegment)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void checkMigrationSuccess(org.apache.kylin.common.KylinConfig kylinConfig,
String cubeName,
Boolean ifFix)
throws IOException
IOExceptionprotected void checkCubeState(org.apache.kylin.cube.CubeInstance cube)
protected void checkAndGetHbaseUrl()
protected void renameFoldersInHdfs(org.apache.kylin.cube.CubeInstance cube)
throws IOException
IOExceptionprotected void changeHtableHost(org.apache.kylin.cube.CubeInstance cube)
protected void clearSegments(String cubeName) throws IOException
IOExceptionprotected void copyFilesInMetaStore(org.apache.kylin.cube.CubeInstance cube)
throws IOException
IOExceptionprotected void addCubeAndModelIntoProject(org.apache.kylin.cube.CubeInstance srcCube,
String cubeName)
throws IOException
IOExceptionprotected void listCubeRelatedResources(org.apache.kylin.cube.CubeInstance cube,
List<String> metaResource,
Set<String> dictAndSnapshot)
throws IOException
IOExceptionprotected org.apache.commons.cli.Options getOptions()
getOptions in class org.apache.kylin.common.util.AbstractApplicationprotected void execute(org.apache.kylin.common.util.OptionsHelper optionsHelper)
throws Exception
execute in class org.apache.kylin.common.util.AbstractApplicationExceptionprotected void addOpt(CubeMigrationCLI.OptType type, Object[] params)
protected void doOpts()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionCopyright © 2014–2018 Apache Software Foundation. All rights reserved.