Skip to content

Commit 4ea4ac0

Browse files
p-szucssteveloughran
authored andcommitted
CDPD-81768. YARN-11810. Fix SQL script in SQLServer/FederationStateStoreTables.sql (apache#7605) Contributed by Peter Szucs.
Change-Id: I5b2a4f6436b1d55984f0420321a62b6d0b4b087b Signed-off-by: Shilun Fan <slfan1989@apache.org> (cherry picked from commit 40c7000) Change-Id: I3ce1b1ac62c04a1790a1358a8c4cc8ac4b6993fe
1 parent 4c013c0 commit 4ea4ac0

File tree

1 file changed

+2
-64
lines changed

1 file changed

+2
-64
lines changed

hadoop-yarn-project/hadoop-yarn/bin/FederationStateStore/SQLServer/FederationStateStoreTables.sql

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -219,68 +219,6 @@ ELSE
219219
GO
220220
GO
221221

222-
IF NOT EXISTS ( SELECT * FROM [FederationStateStore].sys.tables
223-
WHERE name = 'masterKeys'
224-
AND schema_id = SCHEMA_ID('dbo'))
225-
BEGIN
226-
PRINT 'Table masterKeys does not exist, create it...'
227-
228-
SET ANSI_NULLS ON
229-
230-
SET QUOTED_IDENTIFIER ON
231-
232-
SET ANSI_PADDING ON
233-
234-
CREATE TABLE [dbo].[masterKeys](
235-
keyId BIGINT NOT NULL,
236-
masterKey VARCHAR(1024) NOT NULL,
237-
CONSTRAINT [pk_keyId] PRIMARY KEY
238-
(
239-
[keyId]
240-
)
241-
)
242-
243-
SET ANSI_PADDING OFF
244-
245-
PRINT 'Table masterKeys created.'
246-
END
247-
ELSE
248-
PRINT 'Table masterKeys exists, no operation required...'
249-
GO
250-
GO
251-
252-
IF NOT EXISTS ( SELECT * FROM [FederationStateStore].sys.tables
253-
WHERE name = 'delegationTokens'
254-
AND schema_id = SCHEMA_ID('dbo'))
255-
BEGIN
256-
PRINT 'Table delegationTokens does not exist, create it...'
257-
258-
SET ANSI_NULLS ON
259-
260-
SET QUOTED_IDENTIFIER ON
261-
262-
SET ANSI_PADDING ON
263-
264-
CREATE TABLE [dbo].[delegationTokens](
265-
sequenceNum BIGINT NOT NULL,
266-
tokenIdent VARCHAR(1024) NOT NULL,
267-
token VARCHAR(1024) NOT NULL,
268-
renewDate BIGINT NOT NULL,
269-
CONSTRAINT [pk_sequenceNum] PRIMARY KEY
270-
(
271-
[sequenceNum]
272-
)
273-
)
274-
275-
SET ANSI_PADDING OFF
276-
277-
PRINT 'Table delegationTokens created.'
278-
END
279-
ELSE
280-
PRINT 'Table delegationTokens exists, no operation required...'
281-
GO
282-
GO
283-
284222
IF NOT EXISTS ( SELECT * FROM [FederationStateStore].sys.tables
285223
WHERE name = 'sequenceTable'
286224
AND schema_id = SCHEMA_ID('dbo'))
@@ -295,7 +233,7 @@ IF NOT EXISTS ( SELECT * FROM [FederationStateStore].sys.tables
295233

296234
CREATE TABLE [dbo].[sequenceTable](
297235
sequenceName VARCHAR(255) NOT NULL,
298-
nextVal bigint NOT NULL
236+
nextVal bigint NOT NULL,
299237
CONSTRAINT [pk_sequenceName] PRIMARY KEY
300238
(
301239
[sequenceName]
@@ -325,7 +263,7 @@ IF NOT EXISTS ( SELECT * FROM [FederationStateStore].sys.tables
325263

326264
CREATE TABLE [dbo].[versions](
327265
fedVersion VARBINARY(1024) NOT NULL,
328-
versionComment VARCHAR(255) NOT NULL
266+
versionComment VARCHAR(255) NOT NULL,
329267
CONSTRAINT [pk_fedVersion] PRIMARY KEY
330268
(
331269
[fedVersion]

0 commit comments

Comments
 (0)