HCP Upload Daemon¶
Quick links: HCP Upload Daemon
hcpupd is a daemon that automatically uploads files to HCP.
It’s using the Linux inotify kernel subsystem to monitor a folder (aka watchdir), sending every file that is moved or written to it to HCP, immediately.
Two different upload modes:
Transfer the folder structure created in watchdir to HCP as it is
performance-wise not the best possible solution
not tolerant against filename duplicates (except if the Namespace has Versioning enabled)
Obfuscate the folder structure on HCP by creating an UUID per file, used as filename as well as to construct a path to it
best possible ingest performance
64k folders created at max. (to be precise: 256**2 + 256)
an unlimited number of hcpupd‘s can write into the same Namespace without the risk of filename conflicts
supports search for the original filename by adding an annotation to each file, which can be used by HCP’s Metadata Query Engine, Hitachi Content Intelligence or any other indexer that is able to crawl a HCP Namespace
Optionally, auto-delete files from watchdir after successful upload
Optionally, auto-delete folders after the last file has been uploaded
Made to run as a Linux daemon (but can run in an interactive session as well)
Extended logging available, incl. log rotation
Using the binary provided here doesn’t have any pre-requisites.
To run it as a Python script (or to build the binary on your own), you’ll need at least Python 3.4.3 and these packages: pyinstaller, pyinotify, python-daemon-3k and hcpsdk.
To be found at readthedocs.org
See the instructions in the documentation
Fork at gitlab.com
If you’ve found any bugs, please let me know via the Issue Tracker; if you have comments or suggestions, send an email to mailto:firstname.lastname@example.org
The MIT License (MIT)
Copyright (c) 2017, Thorsten Simons (email@example.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.