Comments (4)
Hi @JattMones - thanks for your questions. First, I should make it clear that (currently at least) you can't just point HSDS to a bucket of H5 files, you need to import them with the hsload utility. hsload by default will convert all the data to the HSDS schema. Alternatively you can use "hsload --link" that will convert just the metadata, but leave the dataset data in the file.
Secondly, HSDS doesn't use API keys, per se. Requests can include an auth header with username and password (OAuth is also supported). Once authenticated, the actions a given use can take is determined by the ACLs (Access Control List) of the domain (i.e. hsds file). There's a blog post that goes into some detail on how this works: https://www.hdfgroup.org/2015/12/serve-protect-web-security-hdf5/.
Finally this repo: https://github.com/HDFGroup/hdf-rest-api covers use of the REST API. For example to put/update an attribute, the curl would be:
$ curl -X PUT -u username:password --header "X-Hdf-domain: /shared/tall.h5" --header "Content-Type: application/json"
-d "{\"shape\": 2, \"type\": {\"class\": \"H5T_COMPOUND\", \"fields\": [{\"type\": \"H5T_STD_I32LE\", \"name\": \"temp\"},
{\"type\": \"H5T_IEEE_F32LE\", \"name\": \"pressure\"}]}, \"value\": [[55, 32.34], [59, 29.34]]}" hsdshdflab.hdfgroup.org/groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr_compound
There are a bunch of new features that haven't been added to the docs yet (we are in the process of updating them), but all the basic operations should be there.
Depending on your environment, it might be more convenient to use the hs tools for thins like hsrm /home/foo.h5
rather than constructing a curl request. Don't have a hstool for adding an attribute yet, but that wouldn't be hard to do.
Hope this helps! Let me know if you hae ore questions or anything seems unclear.
from hsds.
Thanks @jreadey, that does help. If you could explain a little more about how an h5 bucket is structured from top level down with Domains, Groups, and Datasets that would also be helpful.
For example what would each item below be considered in the following hierarchy?
filename.h5
tier1
foldersubtier1
foldersomeDataSet
subtier2
foldersomeDataSet
Would an ACL group be associated with the whole domain (ie. if the domain was something like filename.h5
)? Would a datatype be associated with the domain (ie. if the domain was something like filename.h5
) and return that someDataSet
is a dataset, and subtier
and tier1
are groups?
from hsds.
No, a bucket consists of folders (equivalent to directories) and domains (equivalent to HDF5 files) and folders may have other folders or domains under them.
The domain object itself (e.g. /home/myfolder/mydomain.h5/.domain.json) contains just a root group uuid, and any ACLs that belong to the domain. The actual hdf objects of a domain are stored under the "db" key. This is a bit indirect, but has the benefit that you can move or rename domains without having to move all the objects in the domain.
This is documented here: https://github.com/HDFGroup/hsds/blob/master/docs/design/obj_store_schema/obj_store_schema_v2.md, but in normal circumstances it shouldn't matter how the data is stored if you are accessing content using the HDF Rest API, or the hdf api's (REST VOL or h5pyd).
from hsds.
Closing this issue - please reopen if there are follow-on questions
from hsds.
Related Issues (20)
- Support FLETCHER32 filter
- Compound Type Subsetting HOT 4
- Support N-Bit and scale offset filters
- POST_Links does not return link information when following links recursively HOT 5
- Docker Image CI fails intermittently due to bad username/password
- Uninitialized variable length sequences are returned as scalars instead of empty arrays HOT 2
- Uploading 30 GB file takes too long to upload HOT 7
- not enough room in chunk cache - return 503 HOT 21
- Windows encoding error when writing sequence of variable length UTF-8 characters HOT 2
- Scripts use deprecated docker-compose v1
- Vlen sequence of variable-length UTF-8 strings cannot be written HOT 7
- Creation timestamps lack resolution on Windows HOT 2
- MAX_WAIT_TIME for rescan should be a config option HOT 1
- 409 Conflict during testCreateDomainNodeIds
- typo, should be password_file HOT 2
- Improve resiliency for concurrent requests HOT 1
- Add support for numpy >= 2.x.x HOT 4
- HS_USERNAME assigned admin at startup HOT 2
- external connection to hsds with http HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hsds.