bvaradar commented on a change in pull request #673: Hudi-96: Command line
options instead of positional arguments
URL: https://github.com/apache/incubator-hudi/pull/673#discussion_r290048260
##########
File path: hoodie-cli/src/main/java/com/uber/hoodie/cli/commands/SparkMain.java
##########
@@ -16,92 +16,99 @@
package com.uber.hoodie.cli.commands;
+import com.beust.jcommander.Parameter;
import com.uber.hoodie.HoodieWriteClient;
import com.uber.hoodie.cli.DedupeSparkJob;
import com.uber.hoodie.cli.utils.SparkUtil;
import com.uber.hoodie.common.util.FSUtils;
+import com.uber.hoodie.config.AbstractCommandConfig;
import com.uber.hoodie.config.HoodieIndexConfig;
import com.uber.hoodie.config.HoodieWriteConfig;
+import com.uber.hoodie.exception.InvalidCommandConfigException;
import com.uber.hoodie.index.HoodieIndex;
-import com.uber.hoodie.io.compact.strategy.UnBoundedCompactionStrategy;
import com.uber.hoodie.utilities.HDFSParquetImporter;
import com.uber.hoodie.utilities.HoodieCompactionAdminTool;
-import com.uber.hoodie.utilities.HoodieCompactionAdminTool.Operation;
import com.uber.hoodie.utilities.HoodieCompactor;
+import java.util.Arrays;
import org.apache.log4j.Logger;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.sql.SQLContext;
public class SparkMain {
- protected static final Logger LOG = Logger.getLogger(SparkMain.class);
+ private static final Logger LOG = Logger.getLogger(SparkMain.class);
/**
* Commands
*/
enum SparkCommand {
ROLLBACK, DEDUPLICATE, ROLLBACK_TO_SAVEPOINT, SAVEPOINT, IMPORT, UPSERT,
COMPACT_SCHEDULE, COMPACT_RUN,
- COMPACT_UNSCHEDULE_PLAN, COMPACT_UNSCHEDULE_FILE, COMPACT_VALIDATE,
COMPACT_REPAIR
+ COMPACT_UNSCHEDULE_PLAN, COMPACT_UNSCHEDULE_FILE, COMPACT_VALIDATE,
COMPACT_REPAIR;
+ }
+
+ static class HoodieRollbackCommandConfig extends AbstractCommandConfig {
Review comment:
As mentioned above, move these to respective utilities class which performs
the operation. Create a utilities class if one does not exit.
----------------------------------------------------------------
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]
With regards,
Apache Git Services