本文整理汇总了Java中org.apache.helix.store.zk.ZkHelixPropertyStore.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java ZkHelixPropertyStore.getChildren方法的具体用法?Java ZkHelixPropertyStore.getChildren怎么用?Java ZkHelixPropertyStore.getChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.helix.store.zk.ZkHelixPropertyStore
的用法示例。
在下文中一共展示了ZkHelixPropertyStore.getChildren方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOfflineSegmentZKMetadataListForTable
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<OfflineSegmentZKMetadata> getOfflineSegmentZKMetadataListForTable(ZkHelixPropertyStore<ZNRecord> propertyStore, String tableName) {
List<OfflineSegmentZKMetadata> resultList = new ArrayList<OfflineSegmentZKMetadata>();
if (propertyStore == null) {
return resultList;
}
String offlineTableName = TableNameBuilder.OFFLINE_TABLE_NAME_BUILDER.forTable(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;
}
示例2: getRealtimeSegmentZKMetadataListForTable
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<RealtimeSegmentZKMetadata> getRealtimeSegmentZKMetadataListForTable(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
List<RealtimeSegmentZKMetadata> resultList = new ArrayList<RealtimeSegmentZKMetadata>();
if (propertyStore == null) {
return resultList;
}
String realtimeTableName = TableNameBuilder.REALTIME_TABLE_NAME_BUILDER.forTable(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;
}
示例3: getOfflineSegmentZKMetadataListForTable
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
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;
}
示例4: getRealtimeSegmentZKMetadataListForTable
import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
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;
}