Examples of LRepository


Examples of org.lilyproject.repository.api.LRepository

     * This method discerns between classes marked with the {@link TableEnabled} annotation and those without.
     * @param uriInfo context info from the incoming request
     * @return the appropriate table (based on the tableName parameter, or the default table)
     */
    protected LTable getTable(UriInfo uriInfo) {
        LRepository repository = getRepository(uriInfo);
        try {
            TableEnabled tableEnabledAnnotation = getClass().getAnnotation(TableEnabled.class);
            if (tableEnabledAnnotation != null) {
                return repository.getTable(uriInfo.getPathParameters().getFirst(tableEnabledAnnotation.tableName()));
            } else {
                return repository.getDefaultTable();
            }
        } catch (Exception e) {
            ExceptionUtil.handleInterrupt(e);
            throw new ResourceException("Error retrieving table", e, INTERNAL_SERVER_ERROR.getStatusCode());
        }
View Full Code Here

Examples of org.lilyproject.repository.api.LRepository

        scan.setRecordFilter(new RecordTypeFilter(new QName("mrsample", "Document")));

        // Need LilyClient here just to be able to serialize the RecordScan.
        // This is a bit lame, will improve in the future.
        LilyClient lilyClient = new LilyClient(zkConnectString, 30000);
        LRepository repository = lilyClient.getDefaultRepository();

        // Utility method will configure everything related to LilyInputFormat
        LilyMapReduceUtil.initMapperJob(scan, zkConnectString, repository, job);

        Closer.close(lilyClient);
View Full Code Here

Examples of org.lilyproject.repository.api.LRepository

    public ResultToSolrMapper createMapper(String indexName) throws IndexerConfException {
        String zookeeperConnectString = params.get(LResultToSolrMapper.ZOOKEEPER_KEY);
        String repositoryName = params.get(LResultToSolrMapper.REPO_KEY);
        ZooKeeperImpl zk = null;
        LilyClient lilyClient = null;
        LRepository lRepository;
        try {
            zk = new ZooKeeperImpl(zookeeperConnectString, 30000);
            lilyClient = new LilyClient(zk);
            if (repositoryName == null) {
                lRepository = lilyClient.getDefaultRepository();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.