Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11932. [Website v2] [Docs] [User Guide] DistCP integration #115

Open
wants to merge 2 commits into
base: HDDS-9225-website-v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ words:
- mds
- javadoc
- JVM
- distcp
# Misc words
- acking
- dashboarding
Expand All @@ -99,3 +100,5 @@ words:
- UX
- devs
- CLI
- EDEK
- skipcrccheck
42 changes: 42 additions & 0 deletions docs/04-user-guide/03-integrations/08-distcp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Hadoop DistCp

The Hadoop DistCP is a command line MapReduce-based tool for bulk data copying.

The `hadoop distcp` command can be used to copy data to/from Ozone and any Hadoop compatible file systems. For example, HDFS or S3A.

## Basic usage

To copy files from a source Ozone cluster directory to a destination Ozone cluster directory:

```bash
hadoop distcp ofs://ozone1/vol1/bucket/dir1 ofs://ozone2/vol2/bucket2/dir2
```

> You must have both `ozone1` and `ozone2` cluster service ID defined in `ozone-site.xml` configuration file.

## Copy between Ozone and HDFS

DistCp performs file checksum check to ensure file integrity. Because the default checksum type of HDFS (CRC32C) and Ozone (CRC32) are different, file checksum check will fail the distcp job. To prevent job failures, specify checksum options in the distcp command to force Ozone use the same checksum type as HDFS. For example:

```bash
hadoop distcp \
-Ddfs.checksum.combine.mode=COMPOSITE_CRC \
-Dozone.client.checksum.type=CRC32C \
hdfs://ns1/tmp ofs://ozone1/vol1/bucket1/dst
```

> The parameter `-Ddfs.checksum.combine.mode=COMPOSITE_CRC` is not required if the HDFS cluster is on Hadoop 3.1.1 or above.

Alternatively, skip file checksum check:

```bash
hadoop distcp \
-skipcrccheck \
hdfs://ns1/tmp ofs://ozone1/vol1/bucket1/dst
```

## Encrypted data

When data is in HDFS encryption zone or Ozone encrypted buckets, the file checksum will not match since the underlying block data is different because a new EDEK will be used to encrypt at destination. In this case, specify the -skipcrccheck parameter to avoid job failures.

For more information using Hadoop DistCP, consult [DistCp Guide](https://hadoop.apache.org/docs/current/hadoop-distcp/DistCp.html).
Loading