当前位置: 首页>>代码示例>>Java>>正文


Java CreateSnapshotRequestBuilder类代码示例

本文整理汇总了Java中org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder的典型用法代码示例。如果您正苦于以下问题:Java CreateSnapshotRequestBuilder类的具体用法?Java CreateSnapshotRequestBuilder怎么用?Java CreateSnapshotRequestBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CreateSnapshotRequestBuilder类属于org.elasticsearch.action.admin.cluster.snapshots.create包,在下文中一共展示了CreateSnapshotRequestBuilder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNewSnapshot

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
private void createNewSnapshot() {
	logger.info("Started snapshot for index(es): {} ", this.snapshotSettings.getIndices());
	String snapshotName = DATE_FORMAT.format(new Date());
	CreateSnapshotRequestBuilder createBuilder = getCreateSnapshotBuilder(snapshotName);
	CreateSnapshotResponse createResp = createBuilder.get();
	if (createResp.getSnapshotInfo() != null && (createResp.getSnapshotInfo().state() == SnapshotState.SUCCESS)) {
		logger.info("Snapshot [{}] created.", snapshotName);
	} else {
		// TODO: Is this the right way to do this?
		throw ExceptionsHelper.convertToElastic(new Exception("Unable to create snapshot " + snapshotName));
	}
}
 
开发者ID:garmin,项目名称:elasticsearch-river-snapshot,代码行数:13,代码来源:SnapshotsExecutor.java

示例2: getCreateSnapshotBuilder

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
private CreateSnapshotRequestBuilder getCreateSnapshotBuilder(String snapshotName) {
	CreateSnapshotRequestBuilder snapshotBuilder = new CreateSnapshotRequestBuilder(this.client.admin().cluster(), this.snapshotSettings.getRepository(), snapshotName);
	String[] indices = this.snapshotSettings.getIndices().split(",");
	snapshotBuilder.setIndices(indices);
	snapshotBuilder.setWaitForCompletion(true);
	snapshotBuilder.setIncludeGlobalState(this.snapshotSettings.isIncludeGlobalState());
	snapshotBuilder.setPartial(false);
	return snapshotBuilder;
}
 
开发者ID:garmin,项目名称:elasticsearch-river-snapshot,代码行数:10,代码来源:SnapshotsExecutor.java

示例3: assertSuccessfulSnapshot

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
public static CreateSnapshotResponse assertSuccessfulSnapshot(CreateSnapshotRequestBuilder requestBuilder) {
    CreateSnapshotResponse response = requestBuilder.get();
    assertSuccessfulSnapshot(response);
    return response;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:ESBlobStoreRepositoryIntegTestCase.java

示例4: prepareCreateSnapshot

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
@Override
public CreateSnapshotRequestBuilder prepareCreateSnapshot(String repository, String name) {
    return new CreateSnapshotRequestBuilder(this, CreateSnapshotAction.INSTANCE, repository, name);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:AbstractClient.java

示例5: snapshot

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
private static CreateSnapshotRequestBuilder snapshot(String name, String... indices) {
    return client().admin().cluster().prepareCreateSnapshot("dummy-repo", name).setWaitForCompletion(true).setIndices(indices);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:4,代码来源:IndicesOptionsIntegrationIT.java

示例6: prepareCreateSnapshot

import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; //导入依赖的package包/类
/**
 * Creates a new snapshot.
 */
CreateSnapshotRequestBuilder prepareCreateSnapshot(String repository, String name);
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:ClusterAdminClient.java


注:本文中的org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。