validate(new ByteArrayInputStream(confData));
IndexerConfBuilder builder = new IndexerConfBuilder();
String zkParam = params.get(LResultToSolrMapper.ZOOKEEPER_KEY);
if (zkParam == null) {
throw new IndexerConfException("The required connection parameter " + LilyResultToSolrMapper.ZOOKEEPER_KEY + " is not set.");
}
String repoParam= Optional.fromNullable(params.get(LResultToSolrMapper.REPO_KEY)).or(RepoAndTableUtil.DEFAULT_REPOSITORY);
String tableParam = Optional.fromNullable(params.get(LResultToSolrMapper.TABLE_KEY)).or(LilyHBaseSchema.Table.RECORD.name);
String tableName;
if (repoParam.equals("default")) {
tableName = tableParam;
} else {
tableName = repoParam.concat("__").concat(tableParam);
}
builder.table(tableName);
// TODO: Do any of these need to be configurable given the Lily context?
builder.mappingType(null);
builder.rowReadMode(null);
builder.uniqueyKeyField("lily.key");
builder.uniqueKeyFormatterClass(null);
builder.rowField(null);
builder.columnFamilyField(null);
builder.tableNameField(null);
indexerConf = builder.build();
} catch (Exception e) {
throw new IndexerConfException("Problems initializing the indexer components", e);
}
}