Skip to content

Conversation

@jelmerk
Copy link

@jelmerk jelmerk commented Apr 1, 2018

We started using hadoop's openstack filesystem (Swift) as a storage backend for Apache Flink and ran into the problem that every few hours an error would be triggered that would cause our flink jobs to get restarted.

The problem happens when the token that is used to make api calls expires. At that point the server will return a 401 status code (unauthorized).

What should happen next is that the token should be refreshed and the request should be retried with the new token.

But what happens is that while a new token is requested , the request is retried with the old token and will always fail.

The fix is a simple one, set the correct authentication header on the request before retrying

It turns out that this issue had already been reported in 2016 and a patch was provided by the original reporter.

However for some reason the patch was never merged.

Because the code has changed a bit since the patch was created, i took the liberty of adapting it so it compiles cleanly on the current trunk. I also removed the test the original author created because it basically did a sleep until a token expired. (which usually takes hours)

@jelmerk jelmerk changed the title fix for HADOOP-13617 HADOOP-13617 : retry requests with updated authentication Apr 2, 2018
@jelmerk jelmerk force-pushed the HADOOP_13617 branch 4 times, most recently from ceb94ad to 3fa373d Compare April 3, 2018 06:56
@jelmerk jelmerk changed the title HADOOP-13617 : retry requests with updated authentication HADOOP-13617 : Retry requests with updated authentication Apr 3, 2018
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 90 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1200 trunk passed
+1 compile 22 trunk passed
+1 checkstyle 21 trunk passed
+1 mvnsite 27 trunk passed
+1 shadedclient 786 branch has no errors when building and testing our client artifacts.
+1 javadoc 21 trunk passed
0 spotbugs 39 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 35 trunk passed
_ Patch Compile Tests _
+1 mvninstall 19 the patch passed
+1 compile 18 the patch passed
+1 javac 18 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 24 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 838 patch has no errors when building and testing our client artifacts.
+1 javadoc 19 the patch passed
+1 findbugs 42 the patch passed
_ Other Tests _
+1 unit 21 hadoop-openstack in the patch passed.
+1 asflicense 28 The patch does not generate ASF License warnings.
3324
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/1/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 30c63c1f3777 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 7f1b76c
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/1/testReport/
Max. process+thread count 306 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 44 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1119 trunk passed
+1 compile 21 trunk passed
+1 checkstyle 15 trunk passed
+1 mvnsite 24 trunk passed
+1 shadedclient 682 branch has no errors when building and testing our client artifacts.
+1 javadoc 22 trunk passed
0 spotbugs 41 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 39 trunk passed
_ Patch Compile Tests _
+1 mvninstall 20 the patch passed
+1 compile 19 the patch passed
+1 javac 19 the patch passed
+1 checkstyle 14 the patch passed
+1 mvnsite 20 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 786 patch has no errors when building and testing our client artifacts.
+1 javadoc 21 the patch passed
+1 findbugs 39 the patch passed
_ Other Tests _
+1 unit 18 hadoop-openstack in the patch passed.
+1 asflicense 27 The patch does not generate ASF License warnings.
3019
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/2/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux b43bb8d904e1 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / c7c7a88
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/2/testReport/
Max. process+thread count 446 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 75 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1299 trunk passed
+1 compile 30 trunk passed
+1 checkstyle 28 trunk passed
+1 mvnsite 34 trunk passed
+1 shadedclient 956 branch has no errors when building and testing our client artifacts.
+1 javadoc 25 trunk passed
0 spotbugs 46 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 44 trunk passed
_ Patch Compile Tests _
+1 mvninstall 23 the patch passed
+1 compile 21 the patch passed
+1 javac 21 the patch passed
+1 checkstyle 17 the patch passed
+1 mvnsite 26 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 1009 patch has no errors when building and testing our client artifacts.
+1 javadoc 21 the patch passed
+1 findbugs 47 the patch passed
_ Other Tests _
+1 unit 24 hadoop-openstack in the patch passed.
+1 asflicense 31 The patch does not generate ASF License warnings.
3800
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/3/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 0af07408a0fe 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / e872ceb
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/3/testReport/
Max. process+thread count 293 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 51 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1162 trunk passed
+1 compile 17 trunk passed
+1 checkstyle 17 trunk passed
+1 mvnsite 20 trunk passed
+1 shadedclient 683 branch has no errors when building and testing our client artifacts.
+1 javadoc 19 trunk passed
0 spotbugs 34 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 33 trunk passed
_ Patch Compile Tests _
+1 mvninstall 17 the patch passed
+1 compile 15 the patch passed
+1 javac 15 the patch passed
+1 checkstyle 14 the patch passed
+1 mvnsite 17 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 725 patch has no errors when building and testing our client artifacts.
+1 javadoc 17 the patch passed
+1 findbugs 41 the patch passed
_ Other Tests _
+1 unit 18 hadoop-openstack in the patch passed.
+1 asflicense 25 The patch does not generate ASF License warnings.
2983
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/4/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 783475fff0ff 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 00b5a27
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/4/testReport/
Max. process+thread count 411 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 41 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1115 trunk passed
+1 compile 19 trunk passed
+1 checkstyle 19 trunk passed
+1 mvnsite 20 trunk passed
+1 shadedclient 664 branch has no errors when building and testing our client artifacts.
+1 javadoc 16 trunk passed
0 spotbugs 30 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 29 trunk passed
_ Patch Compile Tests _
+1 mvninstall 15 the patch passed
+1 compile 13 the patch passed
+1 javac 13 the patch passed
+1 checkstyle 12 the patch passed
+1 mvnsite 16 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 725 patch has no errors when building and testing our client artifacts.
+1 javadoc 17 the patch passed
+1 findbugs 41 the patch passed
_ Other Tests _
+1 unit 16 hadoop-openstack in the patch passed.
+1 asflicense 25 The patch does not generate ASF License warnings.
2881
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/5/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 866f379d1389 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / e356e4f
Default Java 1.8.0_222
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/5/testReport/
Max. process+thread count 411 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/5/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 88 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1240 trunk passed
+1 compile 17 trunk passed
+1 checkstyle 25 trunk passed
+1 mvnsite 29 trunk passed
+1 shadedclient 835 branch has no errors when building and testing our client artifacts.
+1 javadoc 25 trunk passed
0 spotbugs 42 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 39 trunk passed
_ Patch Compile Tests _
+1 mvninstall 21 the patch passed
+1 compile 18 the patch passed
+1 javac 18 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 19 the patch passed
+1 whitespace 1 The patch has no whitespace issues.
+1 shadedclient 857 patch has no errors when building and testing our client artifacts.
+1 javadoc 23 the patch passed
+1 findbugs 44 the patch passed
_ Other Tests _
+1 unit 19 hadoop-openstack in the patch passed.
+1 asflicense 28 The patch does not generate ASF License warnings.
3437
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/6/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux c016ce8d452d 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 094d736
Default Java 1.8.0_222
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/6/testReport/
Max. process+thread count 306 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/6/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 43 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1104 trunk passed
+1 compile 18 trunk passed
+1 checkstyle 16 trunk passed
+1 mvnsite 20 trunk passed
+1 shadedclient 707 branch has no errors when building and testing our client artifacts.
+1 javadoc 20 trunk passed
0 spotbugs 33 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 31 trunk passed
_ Patch Compile Tests _
+1 mvninstall 18 the patch passed
+1 compile 17 the patch passed
+1 javac 17 the patch passed
+1 checkstyle 13 the patch passed
+1 mvnsite 16 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 748 patch has no errors when building and testing our client artifacts.
+1 javadoc 16 the patch passed
+1 findbugs 36 the patch passed
_ Other Tests _
+1 unit 15 hadoop-openstack in the patch passed.
+1 asflicense 26 The patch does not generate ASF License warnings.
2950
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/7/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 8ee2ee80d9a9 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 69ddb36
Default Java 1.8.0_222
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/7/testReport/
Max. process+thread count 455 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/7/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 81 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 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 1210 trunk passed
+1 compile 17 trunk passed
+1 checkstyle 17 trunk passed
+1 mvnsite 21 trunk passed
+1 shadedclient 784 branch has no errors when building and testing our client artifacts.
+1 javadoc 19 trunk passed
0 spotbugs 33 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 30 trunk passed
_ Patch Compile Tests _
+1 mvninstall 17 the patch passed
+1 compile 14 the patch passed
+1 javac 14 the patch passed
+1 checkstyle 12 the patch passed
+1 mvnsite 17 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 855 patch has no errors when building and testing our client artifacts.
+1 javadoc 17 the patch passed
+1 findbugs 46 the patch passed
_ Other Tests _
+1 unit 19 hadoop-openstack in the patch passed.
+1 asflicense 30 The patch does not generate ASF License warnings.
3306
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-361/8/artifact/out/Dockerfile
GITHUB PR #361
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux bde2c58d9502 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 3329257
Default Java 1.8.0_222
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-361/8/testReport/
Max. process+thread count 306 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/8/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 0 Docker mode activated.
-1 patch 11 #361 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-361/9/console
versions git=2.17.1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
This change allows user to register the metrics on the per-container basis.

Tested in beam runner and works as expected.

Author: xiliu <[email protected]>

Reviewers: Prateek Maheshwari <[email protected]>

Closes apache#361 from xinyuiscool/SAMZA-1504
@github-actions
Copy link
Contributor

We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again.
Thanks all for your contribution.

@github-actions github-actions bot added the Stale label Dec 29, 2025
@github-actions github-actions bot closed this Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants