Copying data from CFS to DSEFS
When migrating data from the Cassandra File System (CFS) to the DSE File System (DSEFS), use the dse hadoop fs -cp command to copy data from CFS to DSEFS:
-
Enable DSEFS if you haven’t done so already.
-
Get the path to your new DSEFS directory.
If necessary, create the new location for the data in DSEFS. The following example creates a DSEFS directory named
/teston the local node:dse hadoop fs -mkdir dsefs:///test -
Copy the data from CFS to DSEFS, specifying the node and paths to the original CFS directory and the new DSEFS directory.
This command works recursively, so you only need to provide the path to the top level directory.
The following generic example copies data from a top-level directory named
/test:dse hadoop fs -cp cfs://NODE_HOSTNAME_OR_IP/test/* dsefs://NODE_HOSTNAME_OR_IP/testFor a more specific example, the following command migrates the deprecated
hivemetastoredirectory from CFS to DSEFS:INSTALL_DIRECTORY/bin/dse hadoop fs -cp cfs://NODE_HOSTNAME_OR_IP/user/spark/warehouse/ dsefs://NODE_HOSTNAME_OR_IP/user/spark/warehouse/ -
Verify that the data exists in the new DSEFS location using
dse hadoop fs -ls.For example, using the
/testdirectory:dse hadoop fs -ls dsefs:///testThe output depends on the data you copied.
Found 2 items drwxrwxrwx - none none 0 2016-11-23 19:02 dsefs:///test/a drwxrwxrwx - none none 0 2016-11-23 19:02 dsefs:///test/b -
If you are migrating from CFS to DSEFS and you no longer need the original CFS data, you can remove the
cfsandcfs_archivekeyspaces:DROP KEYSPACE cfsDROP KEYSPACE cfs_archive