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

YARN-11478. [Federation] SQLFederationStateStore Support Store ApplicationSubmitData. #5663

Merged
merged 8 commits into from
May 24, 2023

Conversation

slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented May 16, 2023

Description of PR

JIRA: YARN-11478. [Federation] SQLFederationStateStore Support Store ApplicationSubmitData.

How was this patch tested?

Add Junit Test.

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?

@slfan1989 slfan1989 marked this pull request as draft May 16, 2023 15:42
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ trunk Compile Tests _
+1 💚 shadedclient 31m 9s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 shadedclient 19m 29s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 0m 39s The patch does not generate ASF License warnings.
54m 44s
Subsystem Report/Notes
Docker ClientAPI=1.42 ServerAPI=1.42 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/1/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets
uname Linux f5e89d5fb6ca 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ce3c250
Max. process+thread count 559 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989 slfan1989 marked this pull request as ready for review May 17, 2023 16:12
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ReservationId;
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
import org.apache.hadoop.yarn.api.records.*;
Copy link
Member

Choose a reason for hiding this comment

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

Expand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your suggestion! I will modify the code.

import org.apache.hadoop.yarn.server.federation.store.records.RouterStoreToken;
import org.apache.hadoop.yarn.server.federation.store.records.RouterMasterKeyRequest;
import org.apache.hadoop.yarn.server.federation.store.records.RouterMasterKeyResponse;
import org.apache.hadoop.yarn.server.federation.store.records.*;
Copy link
Member

Choose a reason for hiding this comment

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

Expand

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 will modify the code.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 28m 4s Maven dependency ordering for branch
+1 💚 mvninstall 20m 18s trunk passed
+1 💚 compile 6m 58s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 6m 24s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 49s trunk passed
+1 💚 mvnsite 3m 40s trunk passed
+1 💚 javadoc 3m 55s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 17s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 32s trunk passed
+1 💚 shadedclient 20m 45s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 29s Maven dependency ordering for patch
+1 💚 mvninstall 2m 55s the patch passed
+1 💚 compile 6m 22s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 6m 22s the patch passed
+1 💚 compile 6m 20s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 6m 20s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 39s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 18 new + 0 unchanged - 0 fixed = 18 total (was 0)
+1 💚 mvnsite 3m 26s the patch passed
+1 💚 javadoc 3m 37s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 8s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 29s the patch passed
+1 💚 shadedclient 21m 1s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 232m 57s hadoop-yarn in the patch passed.
+1 💚 unit 3m 30s hadoop-yarn-server-common in the patch passed.
+1 💚 asflicense 1m 6s The patch does not generate ASF License warnings.
408m 7s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/3/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 15980803343b 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / fbdcca3
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/3/testReport/
Max. process+thread count 2701 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

@goiri Thank you very much for your help in reviewing the code! I will set up the environment for testing Mysql and SqlServer scripts, which will take around 1-2 days.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 28m 6s Maven dependency ordering for branch
+1 💚 mvninstall 23m 16s trunk passed
+1 💚 compile 7m 40s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 7m 4s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 58s trunk passed
+1 💚 mvnsite 3m 56s trunk passed
+1 💚 javadoc 4m 14s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 29s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 12m 54s trunk passed
+1 💚 shadedclient 23m 33s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 29s Maven dependency ordering for patch
+1 💚 mvninstall 3m 22s the patch passed
+1 💚 compile 7m 4s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 7m 4s the patch passed
+1 💚 compile 7m 17s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 7m 16s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 50s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 💚 mvnsite 3m 59s the patch passed
+1 💚 javadoc 4m 6s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 21s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 12m 35s the patch passed
+1 💚 shadedclient 24m 46s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 234m 20s hadoop-yarn in the patch passed.
+1 💚 unit 3m 35s hadoop-yarn-server-common in the patch passed.
+1 💚 asflicense 1m 3s The patch does not generate ASF License warnings.
427m 35s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/5/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux b9a4cef390d2 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b996dc3
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/5/testReport/
Max. process+thread count 2777 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/5/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 34m 39s Maven dependency ordering for branch
+1 💚 mvninstall 21m 24s trunk passed
+1 💚 compile 7m 0s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 6m 24s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 46s trunk passed
+1 💚 mvnsite 3m 38s trunk passed
+1 💚 javadoc 3m 53s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 18s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 35s trunk passed
+1 💚 shadedclient 20m 40s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 29s Maven dependency ordering for patch
+1 💚 mvninstall 2m 57s the patch passed
+1 💚 compile 6m 23s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 6m 23s the patch passed
+1 💚 compile 6m 17s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 6m 17s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 37s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 💚 mvnsite 3m 24s the patch passed
+1 💚 javadoc 3m 37s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 8s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 28s the patch passed
+1 💚 shadedclient 20m 53s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 255m 44s /patch-unit-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn in the patch failed.
+1 💚 unit 0m 43s hadoop-yarn-server-common in the patch passed.
+0 🆗 asflicense 0m 18s ASF License check generated no output?
434m 58s
Reason Tests
Failed junit tests hadoop.yarn.applications.distributedshell.TestDSTimelineV15
hadoop.yarn.applications.distributedshell.TestDSWithMultipleNodeManager
hadoop.yarn.server.timeline.webapp.TestTimelineWebServices
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/4/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux e886162ac89b 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b996dc3
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/4/testReport/
Max. process+thread count 2773 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@goiri
Copy link
Member

goiri commented May 19, 2023

Let's fix the checktyles and get a clean build (the failed unit tests look unrelated).

@slfan1989
Copy link
Contributor Author

slfan1989 commented May 22, 2023

SQLServer2008

  • sp_addApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_addApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @storedHomeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                                  -- If application to sub-cluster map doesn't exist, insert it.
                                  -- Otherwise don't change the current mapping.
                                  IF NOT EXISTS (SELECT TOP 1 *
                                             FROM [dbo].[applicationsHomeSubCluster]
                                             WHERE [applicationId] = @applicationId_IN)
                      
                                      INSERT INTO [dbo].[applicationsHomeSubCluster] (
                                          [applicationId],
                                          [homeSubCluster],
                                          [createTime],
                                          [applicationContext])
                                      VALUES (
                                          @applicationId_IN,
                                          @homeSubCluster_IN,
                                          GETUTCDATE(),
                                          @applicationContext_IN);
                                  -- End of the IF block
                      
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                                  SELECT @storedHomeSubCluster_OUT = [homeSubCluster]
                                  FROM [dbo].[applicationsHomeSubCluster]
                                  WHERE [applicationId] = @applicationId_IN;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:22:37] completed in 49 ms
  • sp_updateApplicationHomeSubCluster
[2023-05-22 17:22:37] completed in 49 ms
FederationStateStore> IF OBJECT_ID ( '[sp_updateApplicationHomeSubCluster]', 'P' ) IS NOT NULL
                          DROP PROCEDURE [sp_updateApplicationHomeSubCluster];
[2023-05-22 17:22:37] completed in 49 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_updateApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                      
                                  UPDATE [dbo].[applicationsHomeSubCluster]
                                  SET [homeSubCluster] = @homeSubCluster_IN,
                                      [applicationContext] = @applicationContext_IN
                                  WHERE [applicationId] = @applicationId_IN;
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:22:37] completed in 48 ms
  • sp_getApplicationHomeSubCluster
[2023-05-22 17:22:38] completed in 53 ms
FederationStateStore> IF OBJECT_ID ( '[sp_getApplicationHomeSubCluster]', 'P' ) IS NOT NULL
                          DROP PROCEDURE [sp_getApplicationHomeSubCluster];
[2023-05-22 17:22:38] completed in 49 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_getApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @createTime_OUT datetime OUT,
                          @applicationContext_OUT VARBINARY(MAX) OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                      
                              SELECT @homeSubCluster_OUT = [homeSubCluster],
                                  @createTime_OUT = [createTime],
                                  @applicationContext_OUT = [applicationContext]
                              FROM [dbo].[applicationsHomeSubCluster]
                              WHERE [applicationId] = @applicationId_IN;
                      
                          END TRY
                      
                          BEGIN CATCH
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:22:38] completed in 48 ms

SQLServer2012

  • sp_addApplicationHomeSubCluster
[2023-05-22 17:54:38] completed in 44 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_addApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @storedHomeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                                  -- If application to sub-cluster map doesn't exist, insert it.
                                  -- Otherwise don't change the current mapping.
                                  IF NOT EXISTS (SELECT TOP 1 *
                                             FROM [dbo].[applicationsHomeSubCluster]
                                             WHERE [applicationId] = @applicationId_IN)
                      
                                      INSERT INTO [dbo].[applicationsHomeSubCluster] (
                                          [applicationId],
                                          [homeSubCluster],
                                          [createTime],
                                          [applicationContext])
                                      VALUES (
                                          @applicationId_IN,
                                          @homeSubCluster_IN,
                                          GETUTCDATE(),
                                          @applicationContext_IN);
                                  -- End of the IF block
                      
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                                  SELECT @storedHomeSubCluster_OUT = [homeSubCluster]
                                  FROM [dbo].[applicationsHomeSubCluster]
                                  WHERE [applicationId] = @applicationId_IN;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:54:38] completed in 48 ms
  • sp_updateApplicationHomeSubCluster
[2023-05-22 17:54:39] completed in 44 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_updateApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                      
                                  UPDATE [dbo].[applicationsHomeSubCluster]
                                  SET [homeSubCluster] = @homeSubCluster_IN,
                                      [applicationContext] = @applicationContext_IN
                                  WHERE [applicationId] = @applicationId_IN;
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:54:39] completed in 47 ms
  • sp_getApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_getApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @createTime_OUT datetime OUT,
                          @applicationContext_OUT VARBINARY(MAX) OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                      
                              SELECT @homeSubCluster_OUT = [homeSubCluster],
                                  @createTime_OUT = [createTime],
                                  @applicationContext_OUT = [applicationContext]
                              FROM [dbo].[applicationsHomeSubCluster]
                              WHERE [applicationId] = @applicationId_IN;
                      
                          END TRY
                      
                          BEGIN CATCH
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 17:54:40] completed in 46 ms

SQLServer2014

  • sp_addApplicationHomeSubCluster
[2023-05-22 19:24:17] completed in 44 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_addApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @storedHomeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                                  -- If application to sub-cluster map doesn't exist, insert it.
                                  -- Otherwise don't change the current mapping.
                                  IF NOT EXISTS (SELECT TOP 1 *
                                             FROM [dbo].[applicationsHomeSubCluster]
                                             WHERE [applicationId] = @applicationId_IN)
                      
                                      INSERT INTO [dbo].[applicationsHomeSubCluster] (
                                          [applicationId],
                                          [homeSubCluster],
                                          [createTime],
                                          [applicationContext])
                                      VALUES (
                                          @applicationId_IN,
                                          @homeSubCluster_IN,
                                          GETUTCDATE(),
                                          @applicationContext_IN);
                                  -- End of the IF block
                      
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                                  SELECT @storedHomeSubCluster_OUT = [homeSubCluster]
                                  FROM [dbo].[applicationsHomeSubCluster]
                                  WHERE [applicationId] = @applicationId_IN;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 19:24:17] completed in 47 ms
  • sp_updateApplicationHomeSubCluster
[2023-05-22 19:24:18] completed in 49 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_updateApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                      
                                  UPDATE [dbo].[applicationsHomeSubCluster]
                                  SET [homeSubCluster] = @homeSubCluster_IN,
                                      [applicationContext] = @applicationContext_IN
                                  WHERE [applicationId] = @applicationId_IN;
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 19:24:18] completed in 47 ms
  • sp_getApplicationHomeSubCluster
FederationStateStore> IF OBJECT_ID ( '[sp_getApplicationHomeSubCluster]', 'P' ) IS NOT NULL
                          DROP PROCEDURE [sp_getApplicationHomeSubCluster];
[2023-05-22 19:24:19] completed in 45 ms
FederationStateStore> CREATE PROCEDURE [dbo].[sp_getApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @createTime_OUT datetime OUT,
                          @applicationContext_OUT VARBINARY(MAX) OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                      
                              SELECT @homeSubCluster_OUT = [homeSubCluster],
                                  @createTime_OUT = [createTime],
                                  @applicationContext_OUT = [applicationContext]
                              FROM [dbo].[applicationsHomeSubCluster]
                              WHERE [applicationId] = @applicationId_IN;
                      
                          END TRY
                      
                          BEGIN CATCH
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 19:24:19] completed in 45 ms

SQLServer2016

  • sp_getApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_addApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @storedHomeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                                  -- If application to sub-cluster map doesn't exist, insert it.
                                  -- Otherwise don't change the current mapping.
                                  IF NOT EXISTS (SELECT TOP 1 *
                                             FROM [dbo].[applicationsHomeSubCluster]
                                             WHERE [applicationId] = @applicationId_IN)
                      
                                      INSERT INTO [dbo].[applicationsHomeSubCluster] (
                                          [applicationId],
                                          [homeSubCluster],
                                          [createTime],
                                          [applicationContext])
                                      VALUES (
                                          @applicationId_IN,
                                          @homeSubCluster_IN,
                                          GETUTCDATE(),
                                          @applicationContext_IN);
                                  -- End of the IF block
                      
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                                  SELECT @storedHomeSubCluster_OUT = [homeSubCluster]
                                  FROM [dbo].[applicationsHomeSubCluster]
                                  WHERE [applicationId] = @applicationId_IN;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 21:46:11] completed in 50 ms
  • sp_updateApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_updateApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                      
                                  UPDATE [dbo].[applicationsHomeSubCluster]
                                  SET [homeSubCluster] = @homeSubCluster_IN,
                                      [applicationContext] = @applicationContext_IN
                                  WHERE [applicationId] = @applicationId_IN;
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 21:46:11] completed in 48 ms
  • sp_getApplicationsHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_getApplicationsHomeSubCluster]
                          @limit_IN int,
                          @homeSubCluster_IN VARCHAR(256)
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                      
                              SELECT
                                  [applicationId],
                                  [homeSubCluster],
                                  [createTime]
                              FROM(SELECT
                                       [applicationId],
                                       [homeSubCluster],
                                       [createTime],
                                       row_number() over(order by [createTime] desc) AS app_rank
                                   FROM [dbo].[applicationsHomeSubCluster]
                                   WHERE [homeSubCluster] = @homeSubCluster_IN OR @homeSubCluster_IN = '') AS applicationsHomeSubCluster
                              WHERE app_rank <= @limit_IN;
                      
                          END TRY
                      
                          BEGIN CATCH
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 21:46:12] completed in 47 ms

SQLServer2017

  • sp_addApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_addApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @storedHomeSubCluster_OUT VARCHAR(256) OUTPUT,
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                                  -- If application to sub-cluster map doesn't exist, insert it.
                                  -- Otherwise don't change the current mapping.
                                  IF NOT EXISTS (SELECT TOP 1 *
                                             FROM [dbo].[applicationsHomeSubCluster]
                                             WHERE [applicationId] = @applicationId_IN)
                      
                                      INSERT INTO [dbo].[applicationsHomeSubCluster] (
                                          [applicationId],
                                          [homeSubCluster],
                                          [createTime],
                                          [applicationContext])
                                      VALUES (
                                          @applicationId_IN,
                                          @homeSubCluster_IN,
                                          GETUTCDATE(),
                                          @applicationContext_IN);
                                  -- End of the IF block
                      
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                                  SELECT @storedHomeSubCluster_OUT = [homeSubCluster]
                                  FROM [dbo].[applicationsHomeSubCluster]
                                  WHERE [applicationId] = @applicationId_IN;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 22:23:31] completed in 3 s 92 ms
  • sp_updateApplicationHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_updateApplicationHomeSubCluster]
                          @applicationId_IN VARCHAR(64),
                          @homeSubCluster_IN VARCHAR(256),
                          @applicationContext_IN VARBINARY(MAX),
                          @rowCount_OUT int OUTPUT
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                              BEGIN TRAN
                      
                                  UPDATE [dbo].[applicationsHomeSubCluster]
                                  SET [homeSubCluster] = @homeSubCluster_IN,
                                      [applicationContext] = @applicationContext_IN
                                  WHERE [applicationId] = @applicationId_IN;
                                  SELECT @rowCount_OUT = @@ROWCOUNT;
                      
                              COMMIT TRAN
                          END TRY
                      
                          BEGIN CATCH
                              ROLLBACK TRAN
                      
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 22:23:34] completed in 204 ms
  • sp_getApplicationsHomeSubCluster
FederationStateStore> CREATE PROCEDURE [dbo].[sp_getApplicationsHomeSubCluster]
                          @limit_IN int,
                          @homeSubCluster_IN VARCHAR(256)
                      AS BEGIN
                          DECLARE @errorMessage nvarchar(4000)
                      
                          BEGIN TRY
                      
                              SELECT
                                  [applicationId],
                                  [homeSubCluster],
                                  [createTime]
                              FROM(SELECT
                                       [applicationId],
                                       [homeSubCluster],
                                       [createTime],
                                       row_number() over(order by [createTime] desc) AS app_rank
                                   FROM [dbo].[applicationsHomeSubCluster]
                                   WHERE [homeSubCluster] = @homeSubCluster_IN OR @homeSubCluster_IN = '') AS applicationsHomeSubCluster
                              WHERE app_rank <= @limit_IN;
                      
                          END TRY
                      
                          BEGIN CATCH
                              SET @errorMessage = dbo.func_FormatErrorMessage(ERROR_MESSAGE(), ERROR_LINE())
                      
                              /*  raise error and terminate the execution */
                              RAISERROR(@errorMessage, --- Error Message
                                  1, -- Severity
                                  -1 -- State
                              ) WITH log
                          END CATCH
                      END;
[2023-05-22 22:23:40] completed in 328 ms

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 18m 4s Maven dependency ordering for branch
+1 💚 mvninstall 19m 32s trunk passed
+1 💚 compile 6m 55s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 6m 22s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 50s trunk passed
+1 💚 mvnsite 3m 38s trunk passed
+1 💚 javadoc 3m 55s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 19s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 32s trunk passed
+1 💚 shadedclient 20m 33s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 28s Maven dependency ordering for patch
+1 💚 mvninstall 2m 55s the patch passed
+1 💚 compile 6m 19s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 6m 19s the patch passed
+1 💚 compile 6m 18s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 6m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 35s the patch passed
+1 💚 mvnsite 3m 24s the patch passed
+1 💚 javadoc 3m 37s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 9s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 28s the patch passed
+1 💚 shadedclient 21m 14s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 232m 52s hadoop-yarn in the patch passed.
+1 💚 unit 3m 31s hadoop-yarn-server-common in the patch passed.
+1 💚 asflicense 1m 5s The patch does not generate ASF License warnings.
396m 49s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/6/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 757dc243a5af 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / cb68fe3
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/6/testReport/
Max. process+thread count 2627 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/6/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

slfan1989 commented May 22, 2023

  • Mysql

Mysql 5.7

  • sp_addApplicationHomeSubCluster
federationstatestore> CREATE PROCEDURE sp_addApplicationHomeSubCluster(
                         IN applicationId_IN varchar(64), IN homeSubCluster_IN varchar(256),
                         IN applicationContext_IN BLOB,
                         OUT storedHomeSubCluster_OUT varchar(256), OUT rowCount_OUT int)
                      BEGIN
                         INSERT INTO applicationsHomeSubCluster
                            (applicationId, homeSubCluster, createTime, applicationContext)
                            (SELECT applicationId_IN, homeSubCluster_IN, NOW(), applicationContext_IN
                             FROM applicationsHomeSubCluster
                             WHERE applicationId = applicationId_IN
                             HAVING COUNT(*) = 0 );
                         SELECT ROW_COUNT() INTO rowCount_OUT;
                         SELECT homeSubCluster INTO storedHomeSubCluster_OUT
                         FROM applicationsHomeSubCluster
                         WHERE applicationId = applicationID_IN;
                      END
[2023-05-22 21:38:20] completed in 175 ms
  • sp_updateApplicationHomeSubCluster
federationstatestore> CREATE PROCEDURE sp_updateApplicationHomeSubCluster(
                         IN applicationId_IN varchar(64),
                         IN homeSubCluster_IN varchar(256), IN applicationContext_IN BLOB, OUT rowCount_OUT int)
                      BEGIN
                         UPDATE applicationsHomeSubCluster
                           SET homeSubCluster = homeSubCluster_IN,
                               applicationContext = applicationContext_IN
                         WHERE applicationId = applicationId_IN;
                         SELECT ROW_COUNT() INTO rowCount_OUT;
                      END
[2023-05-22 21:38:21] completed in 205 ms
  • sp_getApplicationHomeSubCluster
[2023-05-22 21:38:21] completed in 205 ms
federationstatestore> CREATE PROCEDURE sp_getApplicationHomeSubCluster(
                         IN applicationId_IN varchar(64),
                         OUT homeSubCluster_OUT varchar(256),
                         OUT createTime_OUT datetime,
                         OUT applicationContext_OUT BLOB)
                      BEGIN
                         SELECT homeSubCluster, applicationContext, createTime
                             INTO homeSubCluster_OUT, applicationContext_OUT, createTime_OUT
                         FROM applicationsHomeSubCluster
                         WHERE applicationId = applicationID_IN;
                      END
[2023-05-22 21:38:22] completed in 204 ms

Mysql 8.0

  • sp_addApplicationHomeSubCluster
federationstatestore> CREATE PROCEDURE sp_addApplicationHomeSubCluster(
                         IN applicationId_IN varchar(64), IN homeSubCluster_IN varchar(256),
                         IN applicationContext_IN BLOB,
                         OUT storedHomeSubCluster_OUT varchar(256), OUT rowCount_OUT int)
                      BEGIN
                         INSERT INTO applicationsHomeSubCluster
                            (applicationId, homeSubCluster, createTime, applicationContext)
                            (SELECT applicationId_IN, homeSubCluster_IN, NOW(), applicationContext_IN
                             FROM applicationsHomeSubCluster
                             WHERE applicationId = applicationId_IN
                             HAVING COUNT(*) = 0 );
                         SELECT ROW_COUNT() INTO rowCount_OUT;
                         SELECT homeSubCluster INTO storedHomeSubCluster_OUT
                         FROM applicationsHomeSubCluster
                         WHERE applicationId = applicationID_IN;
                      END
[2023-05-22 22:10:45] completed in 166 ms
  • sp_updateApplicationHomeSubCluster
federationstatestore> CREATE PROCEDURE sp_updateApplicationHomeSubCluster(
                         IN applicationId_IN varchar(64),
                         IN homeSubCluster_IN varchar(256), IN applicationContext_IN BLOB, OUT rowCount_OUT int)
                      BEGIN
                         UPDATE applicationsHomeSubCluster
                           SET homeSubCluster = homeSubCluster_IN,
                               applicationContext = applicationContext_IN
                         WHERE applicationId = applicationId_IN;
                         SELECT ROW_COUNT() INTO rowCount_OUT;
                      END
[2023-05-22 22:10:45] completed in 229 ms
  • sp_getApplicationHomeSubCluster
CREATE PROCEDURE sp_getApplicationHomeSubCluster(
   IN applicationId_IN varchar(64),
   OUT homeSubCluster_OUT varchar(256),
   OUT createTime_OUT datetime,
   OUT applicationContext_OUT BLOB)
BEGIN
   SELECT homeSubCluster, applicationContext, createTime
       INTO homeSubCluster_OUT, applicationContext_OUT, createTime_OUT
   FROM applicationsHomeSubCluster
   WHERE applicationId = applicationID_IN;
EN

@slfan1989
Copy link
Contributor Author

slfan1989 commented May 22, 2023

Let's fix the checktyles and get a clean build (the failed unit tests look unrelated).

@goiri Thank you very much for helping to review the code! I have fixed the Checkstyle issues, and the modified database scripts have been verified on SqlServer and Mysql.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 20m 9s Maven dependency ordering for branch
+1 💚 mvninstall 20m 29s trunk passed
+1 💚 compile 6m 58s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 6m 21s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 46s trunk passed
+1 💚 mvnsite 3m 39s trunk passed
+1 💚 javadoc 5m 51s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 19s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 32s trunk passed
+1 💚 shadedclient 20m 50s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 28s Maven dependency ordering for patch
+1 💚 mvninstall 2m 53s the patch passed
+1 💚 compile 6m 24s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 6m 24s the patch passed
+1 💚 compile 6m 19s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 6m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 37s the patch passed
+1 💚 mvnsite 3m 23s the patch passed
+1 💚 javadoc 3m 36s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 7s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 26s the patch passed
+1 💚 shadedclient 20m 45s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 78m 44s /patch-unit-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn in the patch failed.
+1 💚 unit 2m 23s hadoop-yarn-server-common in the patch passed.
-1 ❌ asflicense 0m 37s /results-asflicense.txt The patch generated 17 ASF License warnings.
246m 11s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.webapp.TestRMWebServices
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesReservation
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/7/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 69c3a34b1ce0 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 07b678f
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/7/testReport/
Max. process+thread count 1430 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/7/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 57s Maven dependency ordering for branch
+1 💚 mvninstall 19m 25s trunk passed
+1 💚 compile 7m 0s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 6m 29s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 43s trunk passed
+1 💚 mvnsite 3m 37s trunk passed
+1 💚 javadoc 3m 52s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 18s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 28s trunk passed
+1 💚 shadedclient 20m 48s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 29s Maven dependency ordering for patch
+1 💚 mvninstall 2m 56s the patch passed
+1 💚 compile 6m 21s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javac 6m 21s the patch passed
+1 💚 compile 6m 16s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 javac 6m 16s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 37s the patch passed
+1 💚 mvnsite 3m 24s the patch passed
+1 💚 javadoc 3m 39s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 3m 7s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 11m 29s the patch passed
+1 💚 shadedclient 20m 54s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 232m 53s /patch-unit-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn in the patch passed.
+1 💚 unit 3m 32s hadoop-yarn-server-common in the patch passed.
+1 💚 asflicense 1m 6s The patch does not generate ASF License warnings.
395m 4s
Reason Tests
Failed junit tests hadoop.yarn.server.timelineservice.security.TestTimelineAuthFilterForV2
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/8/artifact/out/Dockerfile
GITHUB PR #5663
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux b9bfe101410e 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ae7064b
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/8/testReport/
Max. process+thread count 2700 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5663/8/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

@goiri Can you help to merge this pr into the trunk branch? Thank you very much! I will continue to follow up on YARN-8337.

@goiri goiri merged commit b977065 into apache:trunk May 24, 2023
@slfan1989
Copy link
Contributor Author

@goiri Thank you very much for your help in reviewing the code!

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

Successfully merging this pull request may close these issues.

3 participants