public static void main(String[] args) throws IOException, InvalidConfigurationException, InterruptedException, KeeperException { CommandLineChecker.check(args, new String[]{"configuration"}, MigrationHelper.class); String configurationPath = args[0]; Coordinator coordinator = new YamlCoordinatorConfigurator(configurationPath).createCoordinator(); } }
public static void main(String[] args) throws Exception { CommandLineChecker.check(args, new String[]{"web_ui_configuration_file_path", "monitor_configuration_file_path", "port", "log4j_config_file"}, WebUiServer.class); org.apache.log4j.Logger.getLogger("com.liveramp.hank").setLevel(Level.INFO); String clientConfigPath = args[0]; String monitorConfigPath = args[1]; int port = Integer.parseInt(args[2]); PropertyConfigurator.configure(args[3]); CoordinatorConfigurator webUiConfigurator = new YamlCoordinatorConfigurator(clientConfigPath); Coordinator coordinator = webUiConfigurator.createCoordinator(); MonitorConfigurator monitorConfigurator = new YamlMonitorConfigurator(monitorConfigPath); start(monitorConfigurator, coordinator, port); }
/** * @param args * @throws Exception */ public static void main(String[] args) throws Exception { CommandLineChecker.check(args, new String[]{"configuration_file_path", "log4j_properties_file_path"}, RingGroupConductor.class); String configPath = args[0]; String log4jprops = args[1]; RingGroupConductorConfigurator configurator = new YamlRingGroupConductorConfigurator(configPath); PropertyConfigurator.configure(log4jprops); new RingGroupConductor(configurator).run(); }
public static void main(String[] args) throws IOException, InvalidConfigurationException, InterruptedException { CommandLineChecker.check(args, new String[]{"configuration_file_path", "log4j_properties_file_path"}, PartitionServer.class); String configPath = args[0]; String log4jprops = args[1]; PartitionServerConfigurator configurator = new YamlPartitionServerConfigurator(configPath); PropertyConfigurator.configure(log4jprops); new PartitionServer(configurator, getHostName()).run(); }
public static void main(String[] args) throws InterruptedException, KeeperException { CommandLineChecker.check(args, new String[]{"connect_string", "[set|null|rmr|count|ls]", "arguments..."}, ZkCli.class); String connectString = args[0]; String command = args[1];
public static void main(String[] args) throws Throwable { CommandLineChecker.check(args, new String[]{"configuration_file_path", "log4j_properties_file_path"}, SmartClientDaemon.class); String configPath = args[0]; String log4jProps = args[1]; PropertyConfigurator.configure(log4jProps); new SmartClientDaemon(new YamlSmartClientDaemonConfigurator(configPath)).run(); } }
public static void main(String[] args) throws IOException, InvalidConfigurationException { CommandLineChecker.check(args, new String[]{"configuration", "domain name", "domain version number", "new parent domain version number | 'null'", "new domain version source | 'null'"}, IncrementalDomainVersionPropertiesHelper.class);
public static void main(String[] args) throws IOException, InvalidConfigurationException { CommandLineChecker.check(args, new String[]{ "domain name", "version to compact number", "mapred.task.timeout", "config path", "jobjar"}, HadoopDomainCompactor.class); String domainName = args[0]; Integer versionToCompactNumber = Integer.valueOf(args[1]); Integer mapredTaskTimeout = Integer.valueOf(args[2]); CoordinatorConfigurator configurator = new YamlCoordinatorConfigurator(args[3]); String jobJar = args[4]; DomainCompactorProperties properties = new DomainCompactorProperties(domainName, versionToCompactNumber, configurator); JobConf conf = new JobConf(); conf.setJar(jobJar); conf.set("mapred.task.timeout", mapredTaskTimeout.toString()); conf.setJobName(HadoopDomainCompactor.class.getSimpleName() + " Domain " + domainName + ", Version " + versionToCompactNumber); HadoopDomainCompactor compactor = new HadoopDomainCompactor(conf); LOG.info("Compacting Hank domain " + domainName + " version " + versionToCompactNumber + " with coordinator configuration " + configurator); compactor.buildHankDomain(properties, new IncrementalDomainVersionProperties.Base("Version " + versionToCompactNumber + " compacted")); } }
public static void main(String[] args) throws IOException, InvalidConfigurationException { CommandLineChecker.check(args, new String[] {"domain name", "config path", "jobjar", "input path", "output_path"}, HadoopDomainBuilder.class); String domainName = args[0]; CoordinatorConfigurator configurator = new YamlCoordinatorConfigurator(args[1]); String jobJar = args[2]; String inputPath = args[3]; String outputPath = args[4]; DomainBuilderProperties properties = new DomainBuilderProperties(domainName, configurator).setOutputPath(outputPath); JobConf conf = new JobConf(); conf.setJar(jobJar); conf.setJobName(HadoopDomainBuilder.class.getSimpleName() + " Domain " + domainName + ", Output path: " + outputPath); HadoopDomainBuilder builder = new HadoopDomainBuilder(conf, inputPath, SequenceFileInputFormat.class, DomainBuilderMapperDefault.class); LOG.info("Building Hank domain " + domainName + " from input " + inputPath + " and coordinator configuration " + configurator); // TODO: Create DomainVersionProperties throw new NotImplementedException("TODO: Create DomainVersionProperties"); // builder.buildHankDomain(properties, null); } }
public static void main(String[] args) throws IOException, InvalidConfigurationException { CommandLineChecker.check(args, new String[]{"configuration", "domain name", "domain version number"}, RemoteDomainVersionDeletionHelper.class ); String configurationPath = args[0]; String domainName = args[1]; Integer versionNumber = Integer.parseInt(args[2]); Coordinator coordinator = new YamlCoordinatorConfigurator(configurationPath).createCoordinator(); Domain domain = coordinator.getDomain(domainName); if (domain == null) { throw new RuntimeException("Given domain was not found: " + domainName); } DomainVersion domainVersion = domain.getVersion(versionNumber); if (domainVersion == null) { throw new RuntimeException("Given version was not found: " + domainName + " version " + versionNumber); } LOG.info("Deleting remote data for domain " + domainName + " version " + versionNumber); domainVersion.setDefunct(true); domain.getStorageEngine().getRemoteDomainVersionDeleter(StorageEngine.RemoteLocation.DOMAIN_BUILDER).deleteVersion(versionNumber); } }
"query timeout ms", "bulk query timeout ms"}; CommandLineChecker.check(args, expectedArguments, RandomSaturator.class);