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 CassandraFS that correspond to open source HDFS file system shell commands. The format of the URI for the CassandraFS is:

[cfs-name:][//[host]] path
  • If cfs-name is missing, cfs, which means to access the CassandraFS, 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 CassandraFS:

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

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

  • Packaged or AMI distributions:
    $ dse hadoop fs option
  • Tarball installs:
    $ 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.