private String fetchIndexerTableName(String indexerName) throws Exception{ // best effort since this could be a pattern ... IndexerDefinition indexerDefinition = get(indexerName); IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexerDefinition.getIndexerComponentFactory(), new ByteArrayInputStream(indexerDefinition.getConfiguration()), indexerDefinition.getConnectionParams()); String tableName = factory.createIndexerConf().getTable(); // TODO we should fail if the table does not exist return tableName; }
private String fetchIndexerTableName(String indexerName) throws Exception{ // best effort since this could be a pattern ... IndexerDefinition indexerDefinition = get(indexerName); IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexerDefinition.getIndexerComponentFactory(), new ByteArrayInputStream(indexerDefinition.getConfiguration()), indexerDefinition.getConnectionParams()); String tableName = factory.createIndexerConf().getTable(); // TODO we should fail if the table does not exist return tableName; }
if (!"org.lilyproject.indexer.hbase.mapper.LilyIndexerComponentFactory".equals(indexDef.getIndexerComponentFactory())) { continue; IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexDef.getIndexerComponentFactory(), new ByteArrayInputStream(indexDef.getConfiguration()), indexDef.getConnectionParams()); factory.configure(new ByteArrayInputStream(indexerConfXml), indexDef.getConnectionParams()); indexerConf = factory.createIndexerConf();
IndexerModelImpl indexerModel = new IndexerModelImpl(zk, conf.get(ConfKeys.ZK_ROOT_NODE, "/ngdata/hbaseindexer")); IndexerDefinition indexerDefinition = indexerModel.getIndexer(hbaseIndexerName); hbaseIndexerComponentFactory = indexerDefinition.getIndexerComponentFactory(); configuration = indexerDefinition.getConfiguration(); if (indexerDefinition.getConnectionParams() != null) {
ps.println(" + Indexer component factory: " + indexer.getIndexerComponentFactory()); ps.println(" + Additional batch index CLI arguments:"); printArguments(indexer.getBatchIndexCliArguments(), 6, ps, options.has("dump"));
IndexerModelImpl indexerModel = new IndexerModelImpl(zk, conf.get(ConfKeys.ZK_ROOT_NODE, "/ngdata/hbaseindexer")); IndexerDefinition indexerDefinition = indexerModel.getIndexer(hbaseIndexerName); hbaseIndexerComponentFactory = indexerDefinition.getIndexerComponentFactory(); configuration = indexerDefinition.getConfiguration(); if (indexerDefinition.getConnectionParams() != null) {
ps.println(" + Indexer component factory: " + indexer.getIndexerComponentFactory()); ps.println(" + Additional batch index CLI arguments:"); printArguments(indexer.getBatchIndexCliArguments(), 6, ps, options.has("dump"));
IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexerDef.getIndexerComponentFactory(), new ByteArrayInputStream(indexerDef.getConfiguration()), indexerDef.getConnectionParams()); IndexerConf indexerConf = factory.createIndexerConf();
IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexerDef.getIndexerComponentFactory(), new ByteArrayInputStream(indexerDef.getConfiguration()), indexerDef.getConnectionParams()); IndexerConf indexerConf = factory.createIndexerConf();
IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexer.getIndexerComponentFactory(), new ByteArrayInputStream(indexer.getConfiguration()), indexer.getConnectionParams()); IndexerConf indexerConf = factory.createIndexerConf(); if (indexerConf.tableNameIsRegex()) {
public IndexerDefinitionBuilder startFrom(IndexerDefinition existingDefinition) { this.name = existingDefinition.getName(); this.lifecycleState = existingDefinition.getLifecycleState(); this.batchIndexingState = existingDefinition.getBatchIndexingState(); this.incrementalIndexingState = existingDefinition.getIncrementalIndexingState(); this.subscriptionId = existingDefinition.getSubscriptionId(); this.configuration = existingDefinition.getConfiguration(); this.indexerComponentFactory = existingDefinition.getIndexerComponentFactory(); this.connectionType = existingDefinition.getConnectionType(); this.connectionParams = existingDefinition.getConnectionParams(); this.defaultBatchIndexCliArguments = existingDefinition.getDefaultBatchIndexCliArguments(); this.batchIndexCliArguments = existingDefinition.getBatchIndexCliArguments(); this.lastBatchBuildInfo = existingDefinition.getLastBatchBuildInfo(); this.activeBatchBuildInfo = existingDefinition.getActiveBatchBuildInfo(); this.subscriptionTimestamp = existingDefinition.getSubscriptionTimestamp(); this.occVersion = existingDefinition.getOccVersion(); return this; }
public IndexerDefinitionBuilder startFrom(IndexerDefinition existingDefinition) { this.name = existingDefinition.getName(); this.lifecycleState = existingDefinition.getLifecycleState(); this.batchIndexingState = existingDefinition.getBatchIndexingState(); this.incrementalIndexingState = existingDefinition.getIncrementalIndexingState(); this.subscriptionId = existingDefinition.getSubscriptionId(); this.configuration = existingDefinition.getConfiguration(); this.indexerComponentFactory = existingDefinition.getIndexerComponentFactory(); this.connectionType = existingDefinition.getConnectionType(); this.connectionParams = existingDefinition.getConnectionParams(); this.defaultBatchIndexCliArguments = existingDefinition.getDefaultBatchIndexCliArguments(); this.batchIndexCliArguments = existingDefinition.getBatchIndexCliArguments(); this.lastBatchBuildInfo = existingDefinition.getLastBatchBuildInfo(); this.activeBatchBuildInfo = existingDefinition.getActiveBatchBuildInfo(); this.subscriptionTimestamp = existingDefinition.getSubscriptionTimestamp(); this.occVersion = existingDefinition.getOccVersion(); return this; }
if (indexer.getIndexerComponentFactory() != null) { node.put("indexerComponentFactory", indexer.getIndexerComponentFactory());
if (indexer.getIndexerComponentFactory() != null) { node.put("indexerComponentFactory", indexer.getIndexerComponentFactory());
builder.connectionParams(connectionParams); if (oldIndexerDef == null || oldIndexerDef.getIndexerComponentFactory() == null) builder.indexerComponentFactory(indexerComponentFactoryOption.value(options));
builder.connectionParams(connectionParams); if (oldIndexerDef == null || oldIndexerDef.getIndexerComponentFactory() == null) builder.indexerComponentFactory(indexerComponentFactoryOption.value(options));