Package org.elasticsearch.repositories

Examples of org.elasticsearch.repositories.RepositoryException


    public S3Repository(RepositoryName name, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository, AwsS3Service s3Service) throws IOException {
        super(name.getName(), repositorySettings, indexShardRepository);

        String bucket = repositorySettings.settings().get("bucket", componentSettings.get("bucket"));
        if (bucket == null) {
            throw new RepositoryException(name.name(), "No bucket defined for s3 gateway");
        }

        String region = repositorySettings.settings().get("region", componentSettings.get("region"));
        if (region == null) {
            // Bucket setting is not set - use global region setting
View Full Code Here


                        }
                    }
                }
            }
        } catch (IOException ex) {
            throw new RepositoryException(this.repositoryName, "failed to update snapshot in repository", ex);
        }
    }
View Full Code Here

                snapshotIds = ImmutableList.<SnapshotId>builder().addAll(snapshotIds).add(snapshotId).build();
            }
            writeSnapshotList(snapshotIds);
            return snapshot;
        } catch (IOException ex) {
            throw new RepositoryException(this.repositoryName, "failed to update snapshot in repository", ex);
        }
    }
View Full Code Here

                String name = md.name().substring(prefixLength);
                snapshots.add(new SnapshotId(repositoryName, name));
            }
            return ImmutableList.copyOf(snapshots);
        } catch (IOException ex) {
            throw new RepositoryException(repositoryName, "failed to list snapshots in repository", ex);
        }
    }
View Full Code Here

    public URLRepository(RepositoryName name, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository) throws IOException {
        super(name.getName(), repositorySettings, indexShardRepository);
        URL url;
        String path = repositorySettings.settings().get("url", componentSettings.get("url"));
        if (path == null) {
            throw new RepositoryException(name.name(), "missing url");
        } else {
            url = new URL(path);
        }
        listDirectories = repositorySettings.settings().getAsBoolean("list_directories", componentSettings.getAsBoolean("list_directories", true));
        blobStore = new URLBlobStore(componentSettings, url);
View Full Code Here

            return super.snapshots();
        } else {
            try {
                return readSnapshotList();
            } catch (IOException ex) {
                throw new RepositoryException(repositoryName, "failed to get snapshot list in repository", ex);
            }
        }
    }
View Full Code Here

        super(name.getName(), repositorySettings, indexShardRepository);
        File locationFile;
        String location = repositorySettings.settings().get("location", componentSettings.get("location"));
        if (location == null) {
            logger.warn("using local fs location for gateway, should be changed to be a shared location across nodes");
            throw new RepositoryException(name.name(), "missing location");
        } else {
            locationFile = new File(location);
        }
        blobStore = new FsBlobStore(componentSettings, locationFile);
        this.chunkSize = repositorySettings.settings().getAsBytesSize("chunk_size", componentSettings.getAsBytesSize("chunk_size", null));
View Full Code Here

TOP

Related Classes of org.elasticsearch.repositories.RepositoryException

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.