/** * Get map of entity ID and {@link EntitySpec} from Core API, given a collection of entityId. * * @param entityIds collection of entityId to retrieve. * @return map of entity ID as key and {@link EntitySpec} value. * @throws SpecRetrievalException if any error happens during retrieval */ public Map<String, EntitySpec> getEntitySpecs(Iterable<String> entityIds) { GetEntitiesRequest request = GetEntitiesRequest.newBuilder().addAllIds(entityIds).build(); try { GetEntitiesResponse response = blockingStub.getEntities(request); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
/** * Get map of {@link FeatureSpec} from Core API, given a collection of featureId. * * @param featureIds collection of entityId to retrieve. * @return collection of {@link FeatureSpec} * @throws SpecRetrievalException if any error happens during retrieval */ public Map<String, FeatureSpec> getFeatureSpecs(Iterable<String> featureIds) { try { GetFeaturesRequest request = GetFeaturesRequest.newBuilder().addAllIds(featureIds).build(); GetFeaturesResponse response = blockingStub.getFeatures(request); return response .getFeaturesList() .stream() .collect(Collectors.toMap(FeatureSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getFeatureSpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve feature specs", e); } }
/** * Get map of {@link StorageSpec} from Core API, given a collection of storageId. * * @param storageIds collection of storageId to retrieve. * @return map of storage id as key and {@link StorageSpec} as value. * @throws SpecRetrievalException if any error happens during retrieval */ public Map<String, StorageSpec> getStorageSpecs(Iterable<String> storageIds) { try { GetStorageRequest request = GetStorageRequest.newBuilder().addAllIds(storageIds).build(); GetStorageResponse response = blockingStub.getStorage(request); return response .getStorageSpecsList() .stream() .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getStorageSpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve storage specs", e); } }
/** * Get all {@link FeatureSpec} available in Core API. * * @return map of feature id as key and {@link FeatureSpec} as value. */ public Map<String, FeatureSpec> getAllFeatureSpecs() { try { ListFeaturesResponse response = blockingStub.listFeatures(Empty.getDefaultInstance()); return response .getFeaturesList() .stream() .collect(Collectors.toMap(FeatureSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllFeatureSpecs, {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve feature specs", e); } }
/** * Get all {@link EntitySpec} from Core API. * * @return map of entity id as key and {@link EntitySpec} as value. */ public Map<String, EntitySpec> getAllEntitySpecs() { try { ListEntitiesResponse response = blockingStub.listEntities(Empty.getDefaultInstance()); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
/** * Get all {@link StorageSpec} from Core API. * * @return map of storage id as key and {@link StorageSpec} as value. */ public Map<String, StorageSpec> getAllStorageSpecs() { try { ListStorageResponse response = blockingStub.listStorage(Empty.getDefaultInstance()); return response .getStorageSpecsList() .stream() .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllStorageSpecs, {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve storage specs", e); } }
/** * Get map of {@link FeatureSpec} from Core API, given a collection of featureId. */ public Map<String, FeatureSpec> getFeatureSpecs(Iterable<String> featureIds) { try { GetFeaturesRequest request = GetFeaturesRequest.newBuilder().addAllIds(featureIds).build(); GetFeaturesResponse response = blockingStub.getFeatures(request); return response .getFeaturesList() .stream() .collect(Collectors.toMap(FeatureSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getFeatureSpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve feature specs", e); } }
/** * Get map of {@link StorageSpec} from Core API, given a collection of storageId. */ public Map<String, StorageSpec> getStorageSpecs(Iterable<String> storageIds) { try { GetStorageRequest request = GetStorageRequest.newBuilder().addAllIds(storageIds).build(); GetStorageResponse response = blockingStub.getStorage(request); return response .getStorageSpecsList() .stream() .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getStorageSpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve storage specs", e); } }
/** * Get map of entity ID and {@link EntitySpec} from Core API, given a collection of entityId. */ public Map<String, EntitySpec> getEntitySpecs(Iterable<String> entityIds) { GetEntitiesRequest request = GetEntitiesRequest.newBuilder().addAllIds(entityIds).build(); try { GetEntitiesResponse response = blockingStub.getEntities(request); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
/** * Get all {@link FeatureSpec} available in Core API. */ public Map<String, FeatureSpec> getAllFeatureSpecs() { try { ListFeaturesResponse response = blockingStub.listFeatures(Empty.getDefaultInstance()); return response .getFeaturesList() .stream() .collect(Collectors.toMap(FeatureSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllFeatureSpecs, {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve feature specs", e); } }
/** * Get all {@link EntitySpec} from Core API. */ public Map<String, EntitySpec> getAllEntitySpecs() { try { ListEntitiesResponse response = blockingStub.listEntities(Empty.getDefaultInstance()); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
/** * Get all {@link StorageSpec} from Core API. */ public Map<String, StorageSpec> getAllStorageSpecs() { try { ListStorageResponse response = blockingStub.listStorage(Empty.getDefaultInstance()); return response .getStorageSpecsList() .stream() .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getAllStorageSpecs, {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve storage specs", e); } }
@java.lang.Override protected CoreServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CoreServiceBlockingStub(channel, callOptions); }
/** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static CoreServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new CoreServiceBlockingStub(channel); }
/** * <pre> *Register a new entity to the metadata store, or update an existing entity. *If any validation errors occur, only the first encountered error will be returned. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.ApplyEntityResponse applyEntity(feast.specs.EntitySpecProto.EntitySpec request) { return blockingUnaryCall( getChannel(), getApplyEntityMethod(), getCallOptions(), request); }
/** * <pre> *Register a new feature group to the metadata store, or update an existing feature group. *If any validation errors occur, only the first encountered error will be returned. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.ApplyFeatureGroupResponse applyFeatureGroup(feast.specs.FeatureGroupSpecProto.FeatureGroupSpec request) { return blockingUnaryCall( getChannel(), getApplyFeatureGroupMethod(), getCallOptions(), request); }
/** * <pre> *Get storage specs specified in request. *This process returns a list of storage specs. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.GetStorageResponse getStorage(feast.core.CoreServiceProto.CoreServiceTypes.GetStorageRequest request) { return blockingUnaryCall( getChannel(), getGetStorageMethod(), getCallOptions(), request); }
/** * <pre> *Get features specified in request. *This process returns a list of feature specs. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesResponse getFeatures(feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesRequest request) { return blockingUnaryCall( getChannel(), getGetFeaturesMethod(), getCallOptions(), request); }
/** * <pre> *Register a new storage spec to the metadata store, or update an existing storage. *If any validation errors occur, only the first encountered error will be returned. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.ApplyStorageResponse applyStorage(feast.specs.StorageSpecProto.StorageSpec request) { return blockingUnaryCall( getChannel(), getApplyStorageMethod(), getCallOptions(), request); } }
/** * <pre> *Get all storage specs. *This process returns a list of storage specs. * </pre> */ public feast.core.CoreServiceProto.CoreServiceTypes.ListStorageResponse listStorage(com.google.protobuf.Empty request) { return blockingUnaryCall( getChannel(), getListStorageMethod(), getCallOptions(), request); }