本文整理汇总了Java中org.apache.helix.store.zk.ZkHelixPropertyStore.set方法的典型用法代码示例。如果您正苦于以下问题:Java ZkHelixPropertyStore.set方法的具体用法?Java ZkHelixPropertyStore.set怎么用?Java ZkHelixPropertyStore.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.helix.store.zk.ZkHelixPropertyStore
的用法示例。
在下文中一共展示了ZkHelixPropertyStore.set方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setClusterTenantIsolationEnabled
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore, boolean isSingleTenantCluster) {
if (!propertyStore.exists(constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY), AccessOption.PERSISTENT)) {
ZNRecord znRecord = new ZNRecord(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
znRecord.setBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, isSingleTenantCluster);
propertyStore.set(constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY), znRecord, AccessOption.PERSISTENT);
}
}
示例2: setOfflineSegmentZKMetadata
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static boolean setOfflineSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore,
OfflineSegmentZKMetadata offlineSegmentZKMetadata, int expectedVersion) {
// NOTE: Helix will throw ZkBadVersionException if version does not match
try {
return propertyStore.set(constructPropertyStorePathForSegment(
TableNameBuilder.OFFLINE.tableNameWithType(offlineSegmentZKMetadata.getTableName()),
offlineSegmentZKMetadata.getSegmentName()), offlineSegmentZKMetadata.toZNRecord(), expectedVersion,
AccessOption.PERSISTENT);
} catch (ZkBadVersionException e) {
return false;
}
}
示例3: setRealtimeTableConfig
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setRealtimeTableConfig(ZkHelixPropertyStore<ZNRecord> propertyStore, String realtimeTableName, ZNRecord znRecord) {
propertyStore.set(constructPropertyStorePathForResourceConfig(realtimeTableName), znRecord, AccessOption.PERSISTENT);
}
示例4: setOfflineTableConfig
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setOfflineTableConfig(ZkHelixPropertyStore<ZNRecord> propertyStore, String offlineTableName, ZNRecord znRecord) {
propertyStore.set(constructPropertyStorePathForResourceConfig(offlineTableName), znRecord, AccessOption.PERSISTENT);
}
示例5: setInstanceZKMetadata
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setInstanceZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore, InstanceZKMetadata instanceZKMetadata) {
ZNRecord znRecord = instanceZKMetadata.toZNRecord();
propertyStore.set(StringUtil.join("/", PROPERTYSTORE_INSTANCE_CONFIGS_PREFIX, instanceZKMetadata.getId()), znRecord, AccessOption.PERSISTENT);
}
示例6: setOfflineSegmentZKMetadata
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setOfflineSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore, OfflineSegmentZKMetadata offlineSegmentZKMetadata) {
propertyStore.set(constructPropertyStorePathForSegment(
TableNameBuilder.OFFLINE_TABLE_NAME_BUILDER.forTable(offlineSegmentZKMetadata.getTableName()), offlineSegmentZKMetadata.getSegmentName()),
offlineSegmentZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}
示例7: setRealtimeSegmentZKMetadata
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setRealtimeSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore, RealtimeSegmentZKMetadata realtimeSegmentZKMetadata) {
propertyStore.set(constructPropertyStorePathForSegment(
TableNameBuilder.REALTIME_TABLE_NAME_BUILDER.forTable(realtimeSegmentZKMetadata.getTableName()), realtimeSegmentZKMetadata.getSegmentName()),
realtimeSegmentZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}
示例8: setInstancePartitionAssignmentFromPropertyStore
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setInstancePartitionAssignmentFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore,
PartitionToReplicaGroupMappingZKMetadata partitionMappingZKMetadata) {
propertyStore.set(constructPropertyStorePathForInstancePartitions(
TableNameBuilder.OFFLINE.tableNameWithType(partitionMappingZKMetadata.getTableName())),
partitionMappingZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}
示例9: setRealtimeSegmentZKMetadata
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static boolean setRealtimeSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore,
RealtimeSegmentZKMetadata realtimeSegmentZKMetadata) {
return propertyStore.set(constructPropertyStorePathForSegment(
TableNameBuilder.REALTIME.tableNameWithType(realtimeSegmentZKMetadata.getTableName()),
realtimeSegmentZKMetadata.getSegmentName()), realtimeSegmentZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}