- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.helix.store.zk.ZkHelixPropertyStore.exists()
方法的一些代码示例,展示了ZkHelixPropertyStore.exists()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkHelixPropertyStore.exists()
方法的具体详情如下:
包路径:org.apache.helix.store.zk.ZkHelixPropertyStore
类名称:ZkHelixPropertyStore
方法名:exists
暂无
代码示例来源:origin: apache/incubator-pinot
public boolean exist(String path) {
return propertyStore.exists(pathPrefix + "/" + path, AccessOption.PERSISTENT);
}
代码示例来源:origin: apache/incubator-pinot
public static boolean isSegmentExisted(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceNameForResource,
String segmentName) {
return propertyStore
.exists(constructPropertyStorePathForSegment(resourceNameForResource, segmentName), AccessOption.PERSISTENT);
}
代码示例来源:origin: apache/incubator-pinot
public static void removeResourceConfigFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore,
String resourceName) {
String propertyStorePath = constructPropertyStorePathForResourceConfig(resourceName);
if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
}
}
代码示例来源:origin: apache/incubator-pinot
/**
* Returns the segments for the given table.
*
* @param propertyStore Helix property store
* @param tableNameWithType Table name with type suffix
* @return List of segment names
*/
public static List<String> getSegments(ZkHelixPropertyStore<ZNRecord> propertyStore, String tableNameWithType) {
String segmentsPath = constructPropertyStorePathForResource(tableNameWithType);
if (propertyStore.exists(segmentsPath, AccessOption.PERSISTENT)) {
return propertyStore.getChildNames(segmentsPath, AccessOption.PERSISTENT);
} else {
return Collections.emptyList();
}
}
代码示例来源:origin: apache/incubator-pinot
public static void removeResourceSegmentsFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore,
String resourceName) {
String propertyStorePath = constructPropertyStorePathForResource(resourceName);
if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
}
}
代码示例来源:origin: apache/incubator-pinot
public static void removeInstancePartitionAssignmentFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore,
String offlineTableName) {
String propertyStorePath = constructPropertyStorePathForInstancePartitions(offlineTableName);
if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
}
}
代码示例来源:origin: apache/incubator-pinot
public static boolean getClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore) {
String controllerConfigPath = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
if (propertyStore.exists(controllerConfigPath, AccessOption.PERSISTENT)) {
ZNRecord znRecord = propertyStore.get(controllerConfigPath, null, AccessOption.PERSISTENT);
if (znRecord.getSimpleFields().keySet().contains(CLUSTER_TENANT_ISOLATION_ENABLED_KEY)) {
return znRecord.getBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, true);
} else {
return true;
}
} else {
return true;
}
}
}
代码示例来源:origin: apache/incubator-pinot
/**
* Returns the LLC realtime segments for the given table.
*
* @param propertyStore Helix property store
* @param realtimeTableName Realtime table name
* @return List of LLC realtime segment names
*/
public static List<String> getLLCRealtimeSegments(ZkHelixPropertyStore<ZNRecord> propertyStore,
String realtimeTableName) {
List<String> llcRealtimeSegments = new ArrayList<>();
String segmentsPath = constructPropertyStorePathForResource(realtimeTableName);
if (propertyStore.exists(segmentsPath, AccessOption.PERSISTENT)) {
List<String> segments = propertyStore.getChildNames(segmentsPath, AccessOption.PERSISTENT);
for (String segment : segments) {
if (SegmentName.isLowLevelConsumerSegmentName(segment)) {
llcRealtimeSegments.add(segment);
}
}
}
return llcRealtimeSegments;
}
代码示例来源:origin: apache/incubator-pinot
private void createHelixEntriesForHighLevelConsumer(TableConfig config, String realtimeTableName,
IdealState idealState) {
if (idealState == null) {
idealState = PinotTableIdealStateBuilder
.buildInitialHighLevelRealtimeIdealStateFor(realtimeTableName, config, _helixZkManager, _propertyStore,
_enableBatchMessageMode);
LOGGER.info("Adding helix resource with empty HLC IdealState for {}", realtimeTableName);
_helixAdmin.addResource(_helixClusterName, realtimeTableName, idealState);
} else {
// TODO jfim: We get in this block if we're trying to add a HLC or it already exists. If it doesn't already exist, we need to set instance configs properly (which is done in buildInitialHighLevelRealtimeIdealState, surprisingly enough). For now, do nothing.
LOGGER.info("Not reconfiguring HLC for table {}", realtimeTableName);
}
LOGGER.info("Successfully created empty ideal state for high level consumer for {} ", realtimeTableName);
// Finally, create the propertystore entry that will trigger watchers to create segments
String tablePropertyStorePath = ZKMetadataProvider.constructPropertyStorePathForResource(realtimeTableName);
if (!_propertyStore.exists(tablePropertyStorePath, AccessOption.PERSISTENT)) {
_propertyStore.create(tablePropertyStorePath, new ZNRecord(realtimeTableName), AccessOption.PERSISTENT);
}
}
代码示例来源:origin: apache/incubator-pinot
if (!deleteSuccessful[i]) {
if (_propertyStore.exists(propStorePathList.get(i), AccessOption.PERSISTENT)) {
LOGGER.info("Could not delete {} from propertystore", propStorePathList.get(i));
segmentsToRetryLater.add(segmentId);
代码示例来源:origin: apache/incubator-pinot
/**
* Delete the given schema.
* @param schema The schema to be deleted.
* @return True on success, false otherwise.
*/
public boolean deleteSchema(Schema schema) {
if (schema != null) {
String propertyStorePath = ZKMetadataProvider.constructPropertyStorePathForSchema(schema.getSchemaName());
if (_propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
_propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
return true;
}
}
return false;
}
代码示例来源:origin: apache/incubator-pinot
/**
* NOTE: this method is very expensive, use {@link #getSegments(ZkHelixPropertyStore, String)} instead if only segment
* segment names are needed.
*/
public static List<RealtimeSegmentZKMetadata> getRealtimeSegmentZKMetadataListForTable(
ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
List<RealtimeSegmentZKMetadata> resultList = new ArrayList<>();
if (propertyStore == null) {
return resultList;
}
String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(resourceName);
if (propertyStore.exists(constructPropertyStorePathForResource(realtimeTableName), AccessOption.PERSISTENT)) {
List<ZNRecord> znRecordList = propertyStore
.getChildren(constructPropertyStorePathForResource(realtimeTableName), null, AccessOption.PERSISTENT);
if (znRecordList != null) {
for (ZNRecord record : znRecordList) {
resultList.add(new RealtimeSegmentZKMetadata(record));
}
}
}
return resultList;
}
代码示例来源:origin: apache/incubator-pinot
/**
* NOTE: this method is very expensive, use {@link #getSegments(ZkHelixPropertyStore, String)} instead if only segment
* segment names are needed.
*/
public static List<OfflineSegmentZKMetadata> getOfflineSegmentZKMetadataListForTable(
ZkHelixPropertyStore<ZNRecord> propertyStore, String tableName) {
List<OfflineSegmentZKMetadata> resultList = new ArrayList<>();
if (propertyStore == null) {
return resultList;
}
String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName);
if (propertyStore.exists(constructPropertyStorePathForResource(offlineTableName), AccessOption.PERSISTENT)) {
List<ZNRecord> znRecordList = propertyStore
.getChildren(constructPropertyStorePathForResource(offlineTableName), null, AccessOption.PERSISTENT);
if (znRecordList != null) {
for (ZNRecord record : znRecordList) {
resultList.add(new OfflineSegmentZKMetadata(record));
}
}
}
return resultList;
}
代码示例来源:origin: apache/incubator-pinot
public static void setClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore,
boolean isSingleTenantCluster) {
final ZNRecord znRecord;
final String path = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
if (!propertyStore.exists(path, AccessOption.PERSISTENT)) {
znRecord = new ZNRecord(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
} else {
znRecord = propertyStore.get(path, null, AccessOption.PERSISTENT);
}
znRecord.setBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, isSingleTenantCluster);
propertyStore.set(path, znRecord, AccessOption.PERSISTENT);
}
代码示例来源:origin: apache/incubator-pinot
when(store.exists(anyString(), anyInt())).thenReturn(true);
return store;
代码示例来源:origin: apache/incubator-pinot
/**
* NOTE: this method is very expensive, use {@link #getLLCRealtimeSegments(ZkHelixPropertyStore, String)} instead if
* only segment names are needed.
*/
public static List<LLCRealtimeSegmentZKMetadata> getLLCRealtimeSegmentZKMetadataListForTable(
ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
List<LLCRealtimeSegmentZKMetadata> resultList = new ArrayList<>();
if (propertyStore == null) {
return resultList;
}
String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(resourceName);
if (propertyStore.exists(constructPropertyStorePathForResource(realtimeTableName), AccessOption.PERSISTENT)) {
List<ZNRecord> znRecordList = propertyStore
.getChildren(constructPropertyStorePathForResource(realtimeTableName), null, AccessOption.PERSISTENT);
if (znRecordList != null) {
for (ZNRecord record : znRecordList) {
RealtimeSegmentZKMetadata realtimeSegmentZKMetadata = new RealtimeSegmentZKMetadata(record);
if (SegmentName.isLowLevelConsumerSegmentName(realtimeSegmentZKMetadata.getSegmentName())) {
resultList.add(new LLCRealtimeSegmentZKMetadata(record));
}
}
}
}
return resultList;
}
代码示例来源:origin: apache/incubator-pinot
assertFalse(_propertyStore.exists(instancePath, 0));
assertFalse(_propertyStore.exists(configPath, 0));
代码示例来源:origin: apache/helix
@Override
public boolean exists(String path, int options) {
if (_fallbackStore == null) {
return super.exists(path, options);
} else {
boolean exist = super.exists(path, options);
if (!exist) {
exist = _fallbackStore.exists(path, options);
}
return exist;
}
}
代码示例来源:origin: org.apache.helix/helix-core
@Override
public boolean exists(String path, int options) {
if (_fallbackStore == null) {
return super.exists(path, options);
} else {
boolean exist = super.exists(path, options);
if (!exist) {
exist = _fallbackStore.exists(path, options);
}
return exist;
}
}
代码示例来源:origin: org.apache.helix/helix-core
@Override
public boolean[] exists(List<String> paths, int options) {
if (_fallbackStore == null) {
return super.exists(paths, options);
} else {
boolean[] exists = super.exists(paths, options);
Map<String, Integer> fallbackMap = new HashMap<String, Integer>();
for (int i = 0; i < paths.size(); i++) {
boolean exist = exists[i];
if (!exist) {
fallbackMap.put(paths.get(i), i);
}
}
if (fallbackMap.size() > 0) {
List<String> fallbackPaths = new ArrayList<String>(fallbackMap.keySet());
boolean[] fallbackExists = _fallbackStore.exists(fallbackPaths, options);
for (int i = 0; i < fallbackPaths.size(); i++) {
String fallbackPath = fallbackPaths.get(i);
int j = fallbackMap.get(fallbackPath);
exists[j] = fallbackExists[i];
}
}
return exists;
}
}
我一直在尝试将 Redux 集成到项目中。 我按照使用示例进行操作,但收到错误store.getState is not a function。 所以我知道其他人也问过类似的问题,但情况略有不同。 R
我正在尝试将我的第一个应用程序上传到 App Store。我已完成 iTunes Connect 所需的所有步骤,我的应用程序状态为“等待上传”。 我相信下一步是使用 Application Load
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
App Store 有所谓的“服务器到服务器”通知。也就是说,当您购买应用内功能时,Apple 服务器会向您服务器的回调方法(发送收据数据)发出 HTTPS 请求。 问题是 - 收据数据中似乎没有用户
我已经将我的第一个应用程序上载到App Store,但是我没有放置我的App需要位置服务和wifi的UIRequiredDeviceCapabilities。结果:该应用程序没有像应做的那样开始寻找坐
由于iOS 8将于本月发布,并且我的应用仅支持32位(因为第3个库仅兼容32位),因此我不确定如果我将新版本的应用提交给我,则该应用的新版本是否会被拒绝App Store将于下个月发布,因为它不支持6
我有一个让我有些困惑的问题。 为了将我的应用提交到App Store,我必须输入Bundle ID后缀。如您所知,Bundle ID会获得Bundle ID后缀的确切名称(您在Bundle ID后缀上
如问题所述,我想知道更新后的应用程序一旦获得批准,是否会自动发布到应用程序商店中? 我的更新已完成并且已经过测试,由于需要几天的时间才能批准,因此我希望现在将其提交批准。同时,我需要在服务器上更改一些
获取应用程序提交到 Apple App Store 的屏幕截图的最简单方法是什么,需要包含的各种尺寸是多少? 另外,是否允许状态栏?我相信我听说它不是,但是包括 Facebook 和 Quora 在内
我在 iTunes 商店中有一个应用程序,其分发证书(在 key 链访问中)将于明天到期。它是一年前生成的,尽管我最近更新了我的 iPhone 开发者计划,但我还没有更新任何证书或签名。 当我将测试设
我的商店包含以下 reducer : export const centralStampState = { layoutState : layoutReducer, //this one is n
我即将将我的应用程序提交到 Apple App Store,并且我了解到 Apple 需要两周时间才能对其进行审核,然后才能上线。但是,在 iTunes Connect 的定价部分,它询问我什么时候发
如果我的应用程序正在接受审核或已获得批准(因此处于 Ready For Sale 状态或同等状态),我可以编辑哪些应用程序信息而无需提交应用程序的新版本? 最佳答案 据此Apple Documenta
我已经在Opera管理控制台上进行了全面检查,看不到他们在哪里提到付款方式。他们说明何时制作,但没有说明。即Paypal,Cheque等。 有人知道他们如何付款吗? 最佳答案 当金额达到200美元时,
我上传了我的二进制文件并创建了屏幕截图。我做的所有屏幕截图都是 640x960,我将它们上传为 PNG。这背后的想法是,我应该以尽可能最好的质量把它交给他们,这样当他们将它们重新压缩成 320x480
我从Microsoft下载了Windows 8 app samples,并下载了这些示例之一加速度传感器示例 我不知道如何测试它以计划使用此功能的软件? 我没有水面设备,想知道只有一种方法可以做到吗?
我正在为TestFlight上传第二个应用程序。第一次进展顺利,但这次却被拒绝了。 We have started the review of your beta app, but we are no
不确定这是正确的论坛,如果不是,我提前道歉。 某处是否有 App Store 新版本的提要?还是带有类别和发布日期的应用提要/列表? 此列表已从 App Store 中消失,我想看看是否可以制作一个应
我有一个 JSON 存储,定义如下 var subAccountStore = new Ext.data.JsonStore({ autoLoad: true, proxy: { ty
我有一个提交到应用商店的应用被拒绝,原因是: 2.30 不符合 Mac OS X 文件系统文档的应用将被拒绝 他们声称我的应用正在修改不受支持的 ~/Library/Preferences/com.a
我是一名优秀的程序员,十分优秀!