[ 
https://issues.apache.org/jira/browse/KYLIN-4923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17318967#comment-17318967
 ] 

ASF GitHub Bot commented on KYLIN-4923:
---------------------------------------

zhangayqian commented on a change in pull request #1611:
URL: https://github.com/apache/kylin/pull/1611#discussion_r611283652



##########
File path: tool/src/main/java/org/apache/kylin/tool/CubeMigrationCLI.java
##########
@@ -86,82 +98,113 @@
     protected String dstProject;
     protected String srcHdfsWorkDir;
     protected String dstHdfsWorkDir;
+    private boolean migrateSegment;
+    private boolean realExecute;
+    private boolean purgeAndDisable;
+    private OptionsHelper optHelper;
 
     private static final String ACL_PREFIX = "/acl/";
     private static final String GLOBAL_DICT_PREFIX = "/dict/global_dict/";
 
-    public static void main(String[] args) throws IOException, 
InterruptedException {
+    private static final Option OPTION_SRC_CONFIG = 
OptionBuilder.isRequired(true).hasArg().withDescription("The KylinConfig of the 
cube’s source").create("srcConfig");
+    private static final Option OPTION_DST_CONFIG = 
OptionBuilder.isRequired(true).hasArg().withDescription("The KylinConfig of the 
cube’s new home").create("dstConfig");
+    private static final Option OPTION_ALL_CUBES = 
OptionBuilder.isRequired(false).withDescription("migrate all cubes meta from 
source cluster").create("allCubes");
+    private static final Option OPTION_CUBE = 
OptionBuilder.isRequired(false).hasArg().withDescription("Cube name to 
migrate").create("cube");
+    private static final Option OPTION_DST_PROJECT = 
OptionBuilder.isRequired(false).hasArg().withDescription("cube's new project 
home, if not set, keep the same as source cluster").create("dstProject");
+    private static final Option OPTION_SRC_PROJECT = 
OptionBuilder.isRequired(false).hasArg().withDescription("source project to 
migrate").create("srcProject");
+    private static final Option OPTION_COPY_ACL = 
OptionBuilder.isRequired(false).hasArg().withDescription("copy 
ACL").create("copyAcl");
+    private static final Option OPTION_PURGE_AND_DISABLE = 
OptionBuilder.isRequired(false).withDescription("purge source cluster 
data").create("purgeAndDisable");
+    private static final Option OPTION_OVERWRITE = 
OptionBuilder.isRequired(false).withDescription("overwrite target cluster's 
meta if exists").create("overwriteIfExists");
+    private static final Option OPTION_EXECUTE = 
OptionBuilder.isRequired(false).withDescription("execute 
migration").create("execute");
+    private static final Option OPTION_MIGRATE_SEGMENTS = 
OptionBuilder.isRequired(false).withDescription("migrate segment 
data").create("migrateSegment");

Review comment:
       > It would be nice if we add this validation for users. By the way, what 
about deciding automatically by comparing cube's major version and system's 
major version before "doMigrateSegment"?
   
   Good idea!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> CubeMigration Tools support migrate meta from 2.x/3.x cluster to 4.0 cluster
> ----------------------------------------------------------------------------
>
>                 Key: KYLIN-4923
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4923
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Tools, Build and Test
>            Reporter: ShengJun Zheng
>            Priority: Major
>             Fix For: v4.0.0-GA
>
>
> Hi, currently we are migrating metadata of 2.x(KYLIN on HBASE) to KYLIN 4.0, 
> the existing migration tool doesn't support migrate meta from 2.x/3.x cluster 
> to 4.0. We'll add this ability to make _upgrading from old version to 4.0_ 
> more conveniently.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to