mayankshriv commented on a change in pull request #6220: URL: https://github.com/apache/incubator-pinot/pull/6220#discussion_r516189484
########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/BootstrapTableTool.java ########## @@ -0,0 +1,130 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.tools; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import java.net.URL; +import org.apache.commons.io.FileUtils; +import org.apache.pinot.spi.ingestion.batch.IngestionJobLauncher; +import org.apache.pinot.spi.ingestion.batch.spec.SegmentGenerationJobSpec; +import org.apache.pinot.tools.admin.command.AddTableCommand; +import org.apache.pinot.tools.admin.command.QuickstartRunner; +import org.apache.pinot.tools.utils.JarUtils; +import org.yaml.snakeyaml.Yaml; + + +public class BootstrapTableTool { Review comment: +1 ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/BootstrapTableCommand.java ########## @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.tools.admin.command; + +import org.apache.pinot.spi.plugin.PluginManager; +import org.apache.pinot.tools.Command; +import org.apache.pinot.tools.BootstrapTableTool; +import org.kohsuke.args4j.Option; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class BootstrapTableCommand extends AbstractBaseAdminCommand implements Command { + private static final Logger LOGGER = LoggerFactory.getLogger(BootstrapTableCommand.class.getName()); + + @Option(name = "-controllerHost", required = false, metaVar = "<String>", usage = "host name for controller.") + private String _controllerHost; + + @Option(name = "-controllerPort", required = false, metaVar = "<int>", usage = "http port for broker.") + private final String _controllerPort = DEFAULT_CONTROLLER_PORT; + + @Option(name = "-dir", required = false, aliases = {"-d", "-directory"}, metaVar = "<String>", usage = "The directory contains all the configs and data to bootstrap a table") Review comment: Users may not have all data/configs within a directory structure. They can definitely create soft links. However, does it make sense to also provide other flags (mutually exclusive with this flag) such as -dataDir, -tableConfig, etc? ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
