Using common Hadoop commands

Common Hadoop commands perform functions in the Cassandra File System (CFS) that correspond to open source, HDFS file system shell commands.

Use common hadoop commands to perform functions in the Cassandra File System (CFS) that correspond to open source, HDFS file system shell commands. The format of the URI for the CFS is:

[cfs-name:][//[host]] path
  • If cfs-name is missing, cfs, which means to access the CFS, is used.
  • If host is missing, the address of the local node is used.
  • If host is given, the path must start with /

For example, the following paths point to the same path in the CFS:

/tmp
///tmp
cfs:/tmp
cfs:///tmp
cfs://localhost/tmp
//localhost/tmp

Execute hadoop fs commands on the command line in these directories:

  • Installer-Services and Package installations:
    $ dse hadoop fs option
  • Installer-No Services and Tarball installations:
    $ install_location/bin/dse hadoop fs option
For example, using this syntax, you can load MapReduce input from the local file system into the Cassandra File System on Linux.
$ dse hadoop fs -mkdir /user/hadoop/wordcount/input

$ dse hadoop fs -copyFromLocal $HADOOP_EXAMPLE/data/state_of_union/state_of_union.txt
   /user/hadoop/wordcount/input
To list all options for performing command hadoop HDFS commands:
$ dse hadoop fs -help

The DSE command reference lists other commands.