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-15151 Use TransmitFile for file to socket data transfer #1825

Open
wants to merge 47 commits into
base: trunk
Choose a base branch
from

Conversation

lukmajercak
Copy link
Contributor

NOTICE

Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute

Lukas Majercak added 30 commits April 27, 2017 14:16
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 27m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 1m 19s Maven dependency ordering for branch
+1 💚 mvninstall 19m 58s trunk passed
+1 💚 compile 18m 25s trunk passed
+1 💚 checkstyle 2m 53s trunk passed
+1 💚 mvnsite 3m 1s trunk passed
+1 💚 shadedclient 20m 0s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 3m 24s trunk passed
+0 🆗 spotbugs 3m 42s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 6m 12s trunk passed
-0 ⚠️ patch 4m 6s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 27s Maven dependency ordering for patch
+1 💚 mvninstall 2m 18s the patch passed
-1 ❌ compile 1m 15s root in the patch failed.
-1 ❌ cc 1m 15s root in the patch failed.
-1 ❌ golang 1m 15s root in the patch failed.
-1 ❌ javac 1m 15s root in the patch failed.
-0 ⚠️ checkstyle 3m 37s root: The patch generated 9 new + 285 unchanged - 2 fixed = 294 total (was 287)
+1 💚 mvnsite 2m 48s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 14m 24s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 2m 50s the patch passed
+1 💚 findbugs 5m 43s the patch passed
_ Other Tests _
-1 ❌ unit 0m 43s hadoop-common in the patch failed.
-1 ❌ unit 105m 52s hadoop-hdfs in the patch failed.
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
241m 47s
Reason Tests
Failed junit tests hadoop.fs.TestHdfsNativeCodeLoader
hadoop.hdfs.server.namenode.ha.TestDelegationTokensWithHA
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/Dockerfile
GITHUB PR #1825
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc golang xml
uname Linux a243d09618ce 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a7d72c5
Default Java 1.8.0_242
compile https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-compile-root.txt
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-compile-root.txt
golang https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-compile-root.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-compile-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/diff-checkstyle-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/testReport/
Max. process+thread count 3781 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 14s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 1m 8s Maven dependency ordering for branch
+1 💚 mvninstall 20m 34s trunk passed
+1 💚 compile 19m 0s trunk passed
+1 💚 checkstyle 3m 54s trunk passed
+1 💚 mvnsite 2m 44s trunk passed
+1 💚 shadedclient 21m 52s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 2m 53s trunk passed
+0 🆗 spotbugs 3m 5s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 5m 6s trunk passed
-0 ⚠️ patch 3m 26s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 1m 53s the patch passed
-1 ❌ compile 0m 55s root in the patch failed.
-1 ❌ cc 0m 55s root in the patch failed.
-1 ❌ golang 0m 55s root in the patch failed.
-1 ❌ javac 0m 55s root in the patch failed.
-0 ⚠️ checkstyle 2m 36s root: The patch generated 9 new + 285 unchanged - 2 fixed = 294 total (was 287)
+1 💚 mvnsite 2m 15s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 14m 38s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 2m 31s the patch passed
+1 💚 findbugs 5m 0s the patch passed
_ Other Tests _
-1 ❌ unit 0m 34s hadoop-common in the patch failed.
-1 ❌ unit 110m 10s hadoop-hdfs in the patch failed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
217m 12s
Reason Tests
Failed junit tests hadoop.fs.TestHdfsNativeCodeLoader
hadoop.hdfs.server.namenode.ha.TestDelegationTokensWithHA
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/Dockerfile
GITHUB PR #1825
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc golang xml
uname Linux 0f8477e5d918 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a7d72c5
Default Java 1.8.0_232
compile https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-compile-root.txt
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-compile-root.txt
golang https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-compile-root.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-compile-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/diff-checkstyle-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/testReport/
Max. process+thread count 3059 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

"The function transmitFile is not supported on Unix");
#endif

#ifdef WINDOWS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#elseif WINDOWS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was following the way this was done just above for Windows_extendWorkingSetSize

@@ -819,6 +849,12 @@ public static boolean access(String path, AccessRight desiredAccess)
}
}
}

public static void setConf(Configuration conf) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we name this a little bit more specific and not only setConf? initTransmitFileEnabledConf()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not meant to be only for enabling transmitfile, but generally for reloading/resetting the configuration

* Set the configuration to be used by this object.
* @param conf configuration to be used
*/
public static void setConf(Configuration conf) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name this more specifically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 1m 15s Maven dependency ordering for branch
+1 💚 mvninstall 22m 28s trunk passed
+1 💚 compile 18m 58s trunk passed
+1 💚 checkstyle 3m 18s trunk passed
+1 💚 mvnsite 3m 12s trunk passed
+1 💚 shadedclient 23m 4s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 3m 1s trunk passed
+0 🆗 spotbugs 3m 36s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 6m 22s trunk passed
-0 ⚠️ patch 3m 57s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for patch
+1 💚 mvninstall 2m 10s the patch passed
+1 💚 compile 19m 35s the patch passed
-1 ❌ cc 19m 35s root generated 5 new + 23 unchanged - 3 fixed = 28 total (was 26)
+1 💚 golang 19m 35s the patch passed
-1 ❌ javac 19m 35s root generated 4 new + 1873 unchanged - 0 fixed = 1877 total (was 1873)
-0 ⚠️ checkstyle 3m 14s root: The patch generated 6 new + 285 unchanged - 2 fixed = 291 total (was 287)
+1 💚 mvnsite 3m 2s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 14m 51s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 3m 9s the patch passed
+1 💚 findbugs 6m 44s the patch passed
_ Other Tests _
+1 💚 unit 10m 35s hadoop-common in the patch passed.
-1 ❌ unit 93m 29s hadoop-hdfs in the patch failed.
+1 💚 asflicense 0m 52s The patch does not generate ASF License warnings.
238m 52s
Reason Tests
Failed junit tests hadoop.hdfs.TestDFSInotifyEventInputStreamKerberized
hadoop.hdfs.TestDeadNodeDetection
hadoop.hdfs.server.namenode.ha.TestDelegationTokensWithHA
hadoop.hdfs.server.blockmanagement.TestUnderReplicatedBlocks
Subsystem Report/Notes
Docker Client=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/artifact/out/Dockerfile
GITHUB PR #1825
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc golang xml
uname Linux 64ff69155737 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / bf8686f
Default Java 1.8.0_242
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/artifact/out/diff-compile-cc-root.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/artifact/out/diff-compile-javac-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/artifact/out/diff-checkstyle-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/testReport/
Max. process+thread count 3496 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 13s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 1m 9s Maven dependency ordering for branch
+1 💚 mvninstall 21m 4s trunk passed
+1 💚 compile 17m 31s trunk passed
+1 💚 checkstyle 2m 57s trunk passed
+1 💚 mvnsite 2m 42s trunk passed
+1 💚 shadedclient 20m 55s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 2m 47s trunk passed
+0 🆗 spotbugs 3m 5s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 5m 7s trunk passed
-0 ⚠️ patch 3m 25s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 1m 54s the patch passed
+1 💚 compile 16m 49s the patch passed
-1 ❌ cc 16m 49s root generated 5 new + 23 unchanged - 3 fixed = 28 total (was 26)
+1 💚 golang 16m 49s the patch passed
-1 ❌ javac 16m 49s root generated 4 new + 1873 unchanged - 0 fixed = 1877 total (was 1873)
-0 ⚠️ checkstyle 2m 48s root: The patch generated 4 new + 285 unchanged - 2 fixed = 289 total (was 287)
+1 💚 mvnsite 2m 36s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 13m 51s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 2m 50s the patch passed
+1 💚 findbugs 5m 25s the patch passed
_ Other Tests _
+1 💚 unit 10m 9s hadoop-common in the patch passed.
-1 ❌ unit 107m 54s hadoop-hdfs in the patch failed.
+1 💚 asflicense 0m 53s The patch does not generate ASF License warnings.
240m 4s
Reason Tests
Failed junit tests hadoop.hdfs.server.namenode.ha.TestDelegationTokensWithHA
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/artifact/out/Dockerfile
GITHUB PR #1825
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc golang xml
uname Linux 0847e8f1d4ff 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1e3a0b0
Default Java 1.8.0_232
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/artifact/out/diff-compile-cc-root.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/artifact/out/diff-compile-javac-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/artifact/out/diff-checkstyle-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/testReport/
Max. process+thread count 2937 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1825/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

int nTransfered = (int) fileCh.transferTo(position, count, getChannel());
int nTransfered = (int) NativeIO.transferTo(fileCh,
fileInputStream.getFD(), getChannel(),
((SelChImpl) getChannel()).getFD(), position, count);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find an easy way out but can you see if we can remove:
SelChImpl is internal proprietary API and may be removed in a future release

throw_ioe(env, WSAGetLastError());
}
return numberOfBytesToWrite;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway to rewrite this so we don't get:
NativeIO.c:1413:1: warning: control reaches end of non-void function [-Wreturn-type]

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