Package com.ngdata.hbaseindexer.conf

Examples of com.ngdata.hbaseindexer.conf.IndexerConfException


    public void validate(InputStream is) throws IndexerConfException {
        try {
            LilyIndexerConfBuilder.validate(is);
        } catch (org.lilyproject.indexer.model.indexerconf.IndexerConfException e) {
            throw new IndexerConfException(e);
        }
    }
View Full Code Here


            mapper.configure(params);
            return mapper;
        } catch (org.lilyproject.indexer.model.indexerconf.IndexerConfException e) {
            Closer.close(lilyClient);
            Closer.close(zk);
            throw new IndexerConfException(e);
        }
    }
View Full Code Here

            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);
        }
    }
View Full Code Here

TOP

Related Classes of com.ngdata.hbaseindexer.conf.IndexerConfException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.