Skip to main content

HDFSPyCOMPSs is an API that enables PyCOMPSs to read HDFS files in parallel.

Project description

Integration: PyCOMPSs and HDFS

The abstraction that is provided by this version is exactly the same as that provided by the version in java. Please read the Java version before continuing.

How to install the HDFSPyCOMPSs module

This module is available at PyPi,

    $ pip3 install hdfs-pycompss

After install it, you need set up some environment variables:

  • HADOOP_HOME: the root of your installed Hadoop distribution. Often has lib/native/libhdfs.so.
  • JAVA_HOME: the location of your Java SDK installation.
  • CLASSPATH: must contain the Hadoop jars
export CLASSPATH=$CLASSPATH:`$HADOOP_HOME/bin/hdfs classpath --glob`

Because COMPSs don't copy all environment variables to all workers, it's important to set these variables at /etc/environment.

Example of how to use the API (without StorageAPI)

def wordcount(blk, word):
    from hdfspycompss.block import Block
    data = Block(blk).read_block()
    ...
    return result

def main():
    import hdfspycompss.hdfs import HDFS
    dfs = HDFS(host='localhost', port=9000)
    HDFS_BLOCKS = dfs.find_blocks('/input.data')

    nFrag = len(HDFS_BLOCKS)
    result = [{} for f in range(nFrag)]
    for f, blk in enumerate(HDFS_BLOCKS):
        result[f] = wordcount(blk, 'word')
    ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdfs-pycompss-0.4.tar.gz (10.4 kB view details)

Uploaded Source

File details

Details for the file hdfs-pycompss-0.4.tar.gz.

File metadata

  • Download URL: hdfs-pycompss-0.4.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for hdfs-pycompss-0.4.tar.gz
Algorithm Hash digest
SHA256 490e249d5bf4e542fa3ba8918c226abc7ff06c89a5c3a0f437691756b87c7529
MD5 462e13cd5e97529d557abaa079f5d0bb
BLAKE2b-256 f007cb943776d705ed976f71b8f43869f0f5834972d5a2a0dee74d0a42634839

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page