Search in sources :

Example 61 with DatasetException

use of io.hops.hopsworks.exceptions.DatasetException in project hopsworks by logicalclocks.

the class FeaturegroupService method provenance.

@Path("/{featureGroupId}/provenance")
public ProvArtifactResource provenance(@PathParam("featureGroupId") Integer featureGroupId) throws FeaturestoreException, GenericException {
    DatasetPath targetEndpointPath;
    try {
        Dataset targetEndpoint = featurestoreController.getProjectFeaturestoreDataset(featurestore.getProject());
        targetEndpointPath = datasetHelper.getTopLevelDatasetPath(project, targetEndpoint);
    } catch (DatasetException ex) {
        throw new GenericException(RESTCodes.GenericErrorCode.ILLEGAL_ARGUMENT, Level.FINE, "training dataset not found");
    }
    this.provenanceResource.setContext(project, targetEndpointPath);
    Featuregroup fg = featuregroupController.getFeaturegroupById(featurestore, featureGroupId);
    this.provenanceResource.setArtifactId(fg.getName(), fg.getVersion());
    return provenanceResource;
}
Also used : Dataset(io.hops.hopsworks.persistence.entity.dataset.Dataset) Featuregroup(io.hops.hopsworks.persistence.entity.featurestore.featuregroup.Featuregroup) DatasetPath(io.hops.hopsworks.common.dataset.util.DatasetPath) GenericException(io.hops.hopsworks.exceptions.GenericException) DatasetException(io.hops.hopsworks.exceptions.DatasetException) Path(javax.ws.rs.Path) DatasetPath(io.hops.hopsworks.common.dataset.util.DatasetPath)

Aggregations

DatasetException (io.hops.hopsworks.exceptions.DatasetException)61 IOException (java.io.IOException)25 Project (io.hops.hopsworks.persistence.entity.project.Project)23 Dataset (io.hops.hopsworks.persistence.entity.dataset.Dataset)21 DistributedFileSystemOps (io.hops.hopsworks.common.hdfs.DistributedFileSystemOps)18 ProjectException (io.hops.hopsworks.exceptions.ProjectException)12 DatasetSharedWith (io.hops.hopsworks.persistence.entity.dataset.DatasetSharedWith)12 Produces (javax.ws.rs.Produces)12 Inode (io.hops.hopsworks.persistence.entity.hdfs.inode.Inode)11 DatasetPath (io.hops.hopsworks.common.dataset.util.DatasetPath)10 HopsSecurityException (io.hops.hopsworks.exceptions.HopsSecurityException)10 Users (io.hops.hopsworks.persistence.entity.user.Users)10 Path (javax.ws.rs.Path)10 Path (org.apache.hadoop.fs.Path)10 GenericException (io.hops.hopsworks.exceptions.GenericException)9 AccessControlException (org.apache.hadoop.security.AccessControlException)8 ProvenanceException (io.hops.hopsworks.exceptions.ProvenanceException)7 AllowedProjectRoles (io.hops.hopsworks.api.filter.AllowedProjectRoles)6 ServiceException (io.hops.hopsworks.exceptions.ServiceException)6 JWTRequired (io.hops.hopsworks.jwt.annotation.JWTRequired)6