<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pwiki.pic.es/index.php?action=history&amp;feed=atom&amp;title=HDFS_Access_via_VOSpace</id>
	<title>HDFS Access via VOSpace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwiki.pic.es/index.php?action=history&amp;feed=atom&amp;title=HDFS_Access_via_VOSpace"/>
	<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=HDFS_Access_via_VOSpace&amp;action=history"/>
	<updated>2026-05-25T08:02:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://pwiki.pic.es/index.php?title=HDFS_Access_via_VOSpace&amp;diff=1238&amp;oldid=prev</id>
		<title>Sbogaart: Created page with &quot;= Introduction =  PIC provides access to the distributed file system HDFS through a '''VOSpace server''', following the IVOA standard described in [https://www.ivoa.net/docume...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwiki.pic.es/index.php?title=HDFS_Access_via_VOSpace&amp;diff=1238&amp;oldid=prev"/>
		<updated>2025-07-23T11:30:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Introduction =  PIC provides access to the distributed file system HDFS through a &amp;#039;&amp;#039;&amp;#039;VOSpace server&amp;#039;&amp;#039;&amp;#039;, following the IVOA standard described in [https://www.ivoa.net/docume...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
PIC provides access to the distributed file system HDFS through a '''VOSpace server''', following the IVOA standard described in [https://www.ivoa.net/documents/VOSpace/20180502/PR-VOSpace-2.1-20180502.html VOSpace 2.1].&lt;br /&gt;
&lt;br /&gt;
This service is an alternative to WebDAV access, allowing users to manage their data programmatically and in a structured way using tools compatible with the Virtual Observatory (VO) ecosystem. It is especially aimed at users who require data management operations such as reading, writing, moving, and metadata querying within a standardized environment.&lt;br /&gt;
&lt;br /&gt;
= How to connect to the service =&lt;br /&gt;
&lt;br /&gt;
== VOSpace Endpoint ==&lt;br /&gt;
&lt;br /&gt;
The VOSpace server is available at the following URL:&lt;br /&gt;
&lt;br /&gt;
    https://vospace.pic.es/vospace&lt;br /&gt;
&lt;br /&gt;
== Compatible clients ==&lt;br /&gt;
&lt;br /&gt;
You can access the service using tools compatible with the VOSpace 2.1 standard:&lt;br /&gt;
&lt;br /&gt;
* [https://pypi.org/project/vos/ '''vos''' client by CADC]&lt;br /&gt;
: Install with pip:&lt;br /&gt;
    pip install vos&amp;gt;=3.6.3&lt;br /&gt;
&lt;br /&gt;
* '''curl''':&lt;br /&gt;
: Can be used to perform HTTP operations following the examples defined in the [https://www.ivoa.net/documents/VOSpace/20180502/PR-VOSpace-2.1-20180502.html VOSpace 2.1 standard], including node creation, file transfers, and property queries.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
The VOSpace server allows both anonymous and authenticated access.&lt;br /&gt;
To access restricted data or personal space, users must specify their '''PIC username and password'''.&lt;br /&gt;
&lt;br /&gt;
= Usage Guidelines =&lt;br /&gt;
&lt;br /&gt;
Once connected to the service, users can perform a variety of operations defined by the VOSpace standard. Supported functionalities include:&lt;br /&gt;
&lt;br /&gt;
* '''getProtocols''': Query supported transfer protocols.&lt;br /&gt;
* '''getViews''': View available data formats (views).&lt;br /&gt;
* '''getProperties''': Obtain node properties.&lt;br /&gt;
* '''createNode''': Create files or folders.&lt;br /&gt;
* '''getNode''': Retrieve node information.&lt;br /&gt;
* '''deleteNode''': Delete files or folders.&lt;br /&gt;
* '''moveNode''': Move nodes inside the VOSpace.&lt;br /&gt;
* '''put / get''': Upload or download files.&lt;br /&gt;
* '''pushToVoSpace / pullFromVoSpace''': Transfer files via external URLs.&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
* Avoid using the '''!''' character in file or folder names, as it may cause compatibility issues with the CADC '''vos''' client.&lt;br /&gt;
* Use tools that comply with the VOSpace standard to ensure compatibility and avoid transfer errors.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
'''Cannot access the server:'''&lt;br /&gt;
* Verify the URL is correct: &amp;lt;code&amp;gt;https://vospace.pic.es/vospace&amp;lt;/code&amp;gt;&lt;br /&gt;
* Make sure PIC credentials are set correctly.&lt;br /&gt;
* Check client configuration (e.g., '''vos''', '''curl''').&lt;br /&gt;
&lt;br /&gt;
'''Problems with properties:'''&lt;br /&gt;
* The '''setProperties''' operation is '''not allowed''' due to permission restrictions on HDFS.&lt;br /&gt;
&lt;br /&gt;
= Security and Data Management =&lt;br /&gt;
&lt;br /&gt;
* Protect PIC credentials. Do not share or store them in plain text.&lt;br /&gt;
* For automation, consider using secure credential managers or temporary storage.&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
&lt;br /&gt;
== Using the CADC '''vos''' client (Python) ==&lt;br /&gt;
&lt;br /&gt;
This server supports [https://pypi.org/project/vos/ the CADC vos client] and operations like '''listdir''', '''mkdir''', '''copy''', '''move''', and '''delete'''. Minimum version: '''vos &amp;gt;= 3.6.3'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
* Create a config file (e.g. &amp;lt;code&amp;gt;vos-config.ini&amp;lt;/code&amp;gt;):&lt;br /&gt;
    [vos]&lt;br /&gt;
    resourceID = https://vospace.pic.es/vospace http&lt;br /&gt;
&lt;br /&gt;
* Export the file path as an environment variable:&lt;br /&gt;
&lt;br /&gt;
    export VOSPACE_CONFIG_FILE=/path/to/vos-config.ini&lt;br /&gt;
&lt;br /&gt;
* Create &amp;lt;code&amp;gt;~/.netrc&amp;lt;/code&amp;gt; for authentication:&lt;br /&gt;
&lt;br /&gt;
    machine https://vospace.pic.es/vospace&lt;br /&gt;
      login USERNAME&lt;br /&gt;
      password PASSWORD&lt;br /&gt;
&lt;br /&gt;
* Set permissions:&lt;br /&gt;
&lt;br /&gt;
    chmod 600 ~/.netrc&lt;br /&gt;
=== Python usage examples ===&lt;br /&gt;
&lt;br /&gt;
    import vos&lt;br /&gt;
&lt;br /&gt;
    client = vos.Client()&lt;br /&gt;
&lt;br /&gt;
    # List contents&lt;br /&gt;
    files = client.listdir(&amp;quot;https://vospace.pic.es/vospace/nodes/user/my_user/&amp;quot;)&lt;br /&gt;
    print(&amp;quot;Contents:&amp;quot;, files)&lt;br /&gt;
&lt;br /&gt;
    # Create directory&lt;br /&gt;
    client.mkdir(&amp;quot;https://vospace.pic.es/vospace/nodes/user/my_user/mydir&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Upload file&lt;br /&gt;
    client.copy(&amp;quot;localfile.txt&amp;quot;, &amp;quot;https://vospace.pic.es/vospace/user/my_user/mydir/localfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Download file&lt;br /&gt;
    client.copy(&amp;quot;https://vospace.pic.es/vospace/user/my_user/mydir/localfile.txt&amp;quot;, &amp;quot;downloaded.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Move file&lt;br /&gt;
    client.move(&lt;br /&gt;
        &amp;quot;https://vospace.pic.es/vospace/user/my_user/mydir/localfile.txt&amp;quot;,&lt;br /&gt;
        &amp;quot;https://vospace.pic.es/vospace/user/my_user/mydir/renamedfile.txt&amp;quot;&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    # Get node info&lt;br /&gt;
    node = client.get_node(&amp;quot;https://vospace.pic.es/vospace/nodes/user/my_user/mydir/renamedfile.txt&amp;quot;)&lt;br /&gt;
    print(&amp;quot;Properties:&amp;quot;, node.props)&lt;br /&gt;
&lt;br /&gt;
    # Delete resource&lt;br /&gt;
    client.delete(&amp;quot;https://vospace.pic.es/vospace/nodes/user/my_user/mydir&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
'''Note''': Ensure configuration is properly set.&lt;br /&gt;
&lt;br /&gt;
== Using curl ==&lt;br /&gt;
&lt;br /&gt;
You can also interact with the server using '''curl''' or other HTTP tools.&lt;br /&gt;
&lt;br /&gt;
These must follow the [https://www.ivoa.net/documents/VOSpace/20180502/PR-VOSpace-2.1-20180502.html VOSpace 2.1] specification.&lt;br /&gt;
&lt;br /&gt;
'''Important:'''&lt;br /&gt;
* Avoid using '''!''' in URLs.&lt;br /&gt;
* Use full HTTP paths like &amp;lt;code&amp;gt;/vospace/nodes/...&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= VOSpace Server Endpoints =&lt;br /&gt;
&lt;br /&gt;
The server provides the following REST endpoints per the VOSpace 2.1 specification:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Method !! Path !! Description&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/protocols&amp;lt;/code&amp;gt; || Retrieves supported transfer protocols&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/views&amp;lt;/code&amp;gt; || Retrieves available data views&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/properties&amp;lt;/code&amp;gt; || Retrieves node properties&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/capabilities&amp;lt;/code&amp;gt; || Retrieves server capabilities&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{job_id}&amp;lt;/code&amp;gt; || Retrieves job information&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{job_id}/phase&amp;lt;/code&amp;gt; || Retrieves job phase&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{job_id}/error&amp;lt;/code&amp;gt; || Retrieves job error info&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{job_id}/results/transferDetails&amp;lt;/code&amp;gt; || Retrieves transfer details&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Retrieves a file/folder node&lt;br /&gt;
|-&lt;br /&gt;
| GET || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Downloads a file (streaming)&lt;br /&gt;
|-&lt;br /&gt;
| PUT || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Creates a file or folder&lt;br /&gt;
|-&lt;br /&gt;
| PUT || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Uploads a file&lt;br /&gt;
|-&lt;br /&gt;
| POST || &amp;lt;code&amp;gt;/vospace/&amp;lt;/code&amp;gt; || Moves or copies a node (returns 303 redirect)&lt;br /&gt;
|-&lt;br /&gt;
| POST || &amp;lt;code&amp;gt;/vospace/synctrans&amp;lt;/code&amp;gt; || Push/pull transfer&lt;br /&gt;
|-&lt;br /&gt;
| POST || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Set properties (''not supported'')&lt;br /&gt;
|-&lt;br /&gt;
| POST || &amp;lt;code&amp;gt;/vospace/{job_id}/phase&amp;lt;/code&amp;gt; || Change job phase&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || &amp;lt;code&amp;gt;/vospace/{path}&amp;lt;/code&amp;gt; || Deletes a file or folder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* &amp;lt;code&amp;gt;{path}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{job_id}&amp;lt;/code&amp;gt; are dynamic parameters.&lt;br /&gt;
* The server uses standard HTTP error codes: 400, 403, 404, 409, 500.&lt;br /&gt;
* '''PUT''' supports uploads and node creation.&lt;br /&gt;
* '''POST /vospace/''' moves or copies nodes (responds with '''303 See Other''').&lt;br /&gt;
* '''setProperties''' is disabled due to HDFS permissions.&lt;br /&gt;
* File downloads return streamed content with '''GET'''.&lt;br /&gt;
* Avoid using '''!''' in paths for full compatibility with the CADC client.&lt;/div&gt;</summary>
		<author><name>Sbogaart</name></author>
	</entry>
</feed>