jojochuang commented on code in PR #7588: URL: https://github.com/apache/ozone/pull/7588#discussion_r1893003650
########## hadoop-hdds/docs/content/integration/DistCp.md: ########## @@ -0,0 +1,76 @@ +--- +title: DistCp +weight: 4 +menu: + main: + parent: "Application integrations" +--- +<!--- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +# 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 and from Ozone and any Hadoop compatible file systems, such as HDFS or S3A. + +## Basic usage + +To copy files from a source Ozone cluster directory to a destination Ozone cluster directory, use the following command: + +```bash + hadoop distcp ofs://ozone1/vol1/bucket/dir1 ofs://ozone2/vol2/bucket2/dir2 +``` + +You must define the service IDs for both `ozone1` and `ozone2` clusters in the `ozone-site.xml` configuration file. For example: +```bash +<property> + <name>ozone.om.service.ids</name> + <value>ozone1,ozone2</value> +</property> +``` + +Next, define their logical mappings. For more details, refer to the [OM High Availability]({{< ref "OM-HA.md" >}}). + +## Copy between Ozone and HDFS + +DistCp performs a file checksum check to ensure file integrity. However, since the default checksum type of HDFS (`CRC32C`) differs from that of Ozone (`CRC32`), the file checksum check will cause the DistCp job to fail. + +To prevent job failures, specify checksum options in the DistCp command to force Ozone to use the same checksum type as HDFS. For example: Review Comment: Yes. I have tried but it will require -Ddfs.checksum.type to specify HDFS checksum type. ########## hadoop-hdds/docs/content/integration/DistCp.md: ########## @@ -0,0 +1,76 @@ +--- +title: DistCp +weight: 4 +menu: + main: + parent: "Application integrations" +--- +<!--- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +# 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 and from Ozone and any Hadoop compatible file systems, such as HDFS or S3A. + +## Basic usage + +To copy files from a source Ozone cluster directory to a destination Ozone cluster directory, use the following command: + +```bash + hadoop distcp ofs://ozone1/vol1/bucket/dir1 ofs://ozone2/vol2/bucket2/dir2 +``` + +You must define the service IDs for both `ozone1` and `ozone2` clusters in the `ozone-site.xml` configuration file. For example: +```bash +<property> + <name>ozone.om.service.ids</name> + <value>ozone1,ozone2</value> +</property> +``` + +Next, define their logical mappings. For more details, refer to the [OM High Availability]({{< ref "OM-HA.md" >}}). + +## Copy between Ozone and HDFS + +DistCp performs a file checksum check to ensure file integrity. However, since the default checksum type of HDFS (`CRC32C`) differs from that of Ozone (`CRC32`), the file checksum check will cause the DistCp job to fail. + +To prevent job failures, specify checksum options in the DistCp command to force Ozone to use the same checksum type as HDFS. For example: Review Comment: Yes. I havent tried but it will require -Ddfs.checksum.type to specify HDFS checksum type. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
