Search in sources :

Example 1 with HopsSiteDatasetDTO

use of io.hops.hopsworks.dela.dto.hopssite.HopsSiteDatasetDTO in project hopsworks by logicalclocks.

the class HopssiteController method getAll.

// dataset services
public List<HopsSiteDatasetDTO> getAll() throws DelaException {
    checkHopssiteReady();
    try {
        ClientWrapper client = getClient(HopsSite.DatasetService.dataset(), HopsSiteDatasetDTO.class);
        LOG.log(Settings.DELA_DEBUG, "hops-site:dataset - {0}", client.getFullPath());
        List<HopsSiteDatasetDTO> result = (List<HopsSiteDatasetDTO>) client.doGetGenericType();
        LOG.log(Settings.DELA_DEBUG, "hops-site:dataset - done {0}", client.getFullPath());
        return result;
    } catch (IllegalStateException ise) {
        throw new DelaException(RESTCodes.DelaErrorCode.COMMUNICATION_FAILURE, Level.SEVERE, DelaException.Source.HOPS_SITE, null, ise.getMessage(), ise);
    }
}
Also used : List(java.util.List) DelaException(io.hops.hopsworks.exceptions.DelaException) ClientWrapper(io.hops.hopsworks.common.util.ClientWrapper) HopsSiteDatasetDTO(io.hops.hopsworks.dela.dto.hopssite.HopsSiteDatasetDTO)

Aggregations

ClientWrapper (io.hops.hopsworks.common.util.ClientWrapper)1 HopsSiteDatasetDTO (io.hops.hopsworks.dela.dto.hopssite.HopsSiteDatasetDTO)1 DelaException (io.hops.hopsworks.exceptions.DelaException)1 List (java.util.List)1