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

HDFS-17526. getMetadataInputStream should use getShareDeleteFileInputStream for windows #6826

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dannytbecker
Copy link
Contributor

Description of PR

In HDFS-10636, the getDataInputStream method uses the getShareDeleteFileInputStream for windows, but the getMetaDataInputStream does not use this. The following error can happen when a DataNode is trying to update the genstamp on a block in Windows.

DataNode Logs:

Caused by: java.io.IOException: Failed to rename G:\data\hdfs\data\current\BP-1\current\finalized\subdir5\subdir16\blk_1_1.meta to G:\data\hdfs\data\current\BP-1\current\finalized\subdir5\subdir16\blk_1_2.meta due to failure in native rename. 32: The process cannot access the file because it is being used by another process.

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

…hareDeleteFileInputStream for windows

#What
Use getShareDeleteFileInputStream for windows MetaDataInputStream

[HDFS-17526](https://issues.apache.org/jira/browse/HDFS-17526)
#Why
In our 2.9 branch, we backported [HDFS-10636](https://issues.apache.org/jira/browse/HDFS-10636) but we modified the getMetaDataInputStream() compared to open source. Since this change was never checked in to open-source, branch-3.3-mt does not have this fix for windows.

DN Logs:
```
2024-05-07T19:45:48,429 ERROR [DataXceiver for client DFSClient_iusvr_MWHEEEAP003F671_container_e1349_1715033229940_2291_01_000090_446347524_1 at /2603:10b0:d13:2a:0:0:0:8763:13239 [Receiving block BP-1897851578-10.59.214.126-1624147212071:blk_16605581415_16555930755]] org.apache.hadoop.hdfs.server.datanode.DataNode: MWHEEEAP0028C5A.machines.MWHE01.ap.gbl:10010:DataXceiver error processing WRITE_BLOCK operation  remote: /2603:10b0:d13:2a:0:0:0:8763:13239 local: /2603:10b0:d13:10:0:0:0:1543:10010
java.io.IOException: Block FinalizedReplica, blk_16605581415_16555930755, FINALIZED
  getNumBytes()     = 521615760
  getBytesOnDisk()  = 521615760
  getVisibleLength()= 521615760
  getVolume()       = G:\data\hdfs\data
  getBlockURI()     = file:/G:/data/hdfs/data/current/BP-1897851578-10.59.214.126-1624147212071/current/finalized/subdir5/subdir16/blk_16605581415 reopen failed.  Unable to move meta file  G:\data\hdfs\data\current\BP-1897851578-10.59.214.126-1624147212071\current\finalized\subdir5\subdir16\blk_16605581415_16555930755.meta to G:\data\hdfs\data\current\BP-1897851578-10.59.214.126-1624147212071\current\finalized\subdir5\subdir16\blk_16605581415_16557042956.meta
    at org.apache.hadoop.hdfs.server.datanode.LocalReplica.bumpReplicaGS(LocalReplica.java:385) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.recoverClose(FsDatasetImpl.java:1423) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at org.apache.hadoop.hdfs.server.datanode.DataXceiver.writeBlock(DataXceiver.java:778) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.opWriteBlock(Receiver.java:176) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.processOp(Receiver.java:110) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at org.apache.hadoop.hdfs.server.datanode.DataXceiver.run(DataXceiver.java:294) ~[hadoop-hdfs-3.3.4-MT-SNAPSHOT.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
Caused by: java.io.IOException: Failed to rename G:\data\hdfs\data\current\BP-1897851578-10.59.214.126-1624147212071\current\finalized\subdir5\subdir16\blk_16605581415_16555930755.meta to G:\data\hdfs\data\current\BP-1897851578-10.59.214.126-1624147212071\current\finalized\subdir5\subdir16\blk_16605581415_16557042956.meta due to failure in native rename. 32: The process cannot access the file because it is being used by another process.

    at org.apache.hadoop.hdfs.server.common.Storage.rename(Storage.java:1290) ~[hadoop-...
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 00s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 00s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 91m 52s trunk passed
+1 💚 compile 6m 52s trunk passed
+1 💚 checkstyle 5m 03s trunk passed
+1 💚 mvnsite 7m 02s trunk passed
+1 💚 javadoc 6m 05s trunk passed
+1 💚 shadedclient 155m 06s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 43s the patch passed
+1 💚 compile 3m 35s the patch passed
+1 💚 javac 3m 35s the patch passed
+1 💚 blanks 0m 00s The patch has no blanks issues.
+1 💚 checkstyle 2m 21s the patch passed
+1 💚 mvnsite 4m 15s the patch passed
+1 💚 javadoc 3m 38s the patch passed
+1 💚 shadedclient 159m 24s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 31s The patch does not generate ASF License warnings.
434m 15s
Subsystem Report/Notes
GITHUB PR #6826
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 42a9d20631d9 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / 5f042de
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6826/1/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6826/1/console
versions git=2.45.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants