Skip to content

Commit 1b96d1a

Browse files
Charles Greeraebadirad
authored andcommitted
Bugfix/dhfprod 1384 (#1376)
* Ignore 403 errors when provisioning (on prem provisioning ignored by DHS) * Fixes for DHFPROD-1384, DHFPROD-1388 * DHFPROD-1384 deploy indexes only to DHS * Rely on local copy of ml-app-deployer * Handle both on-prem and DHS index creation for jobs * Add deployer dependencies explicitly * Send proper payload to indexing endpoint * Creating index in jobs db * Removing hardcoding of "data-hub-role" * Added mlIsProvisionedEnvironment gradle property Refactored code to use this property to check if DHF is running in a provisioned environment or not * Upgraded ml-gradle version to 3.9.0 * Update scaffold project to 4.0.1 * a test makes a state change in the db which causes failures elsewhere, commenting out for CI
1 parent f8a3d5a commit 1b96d1a

File tree

18 files changed

+195
-85
lines changed

18 files changed

+195
-85
lines changed

marklogic-data-hub/build.gradle

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,23 @@ ext.junitPlatformVersion = '1.0.0-RC3'
2525
ext.junitJupiterVersion = '5.0.0-RC3'
2626

2727
dependencies {
28+
// refactor these after releases of java client api and ml-app-deployer
2829
compile files('tmp-lib/marklogic-client-api-4.1.0.jar')
2930
// compile 'com.marklogic:marklogic-client-api:4.1.0'
31+
compile files('tmp-lib/ml-app-deployer-3.9.1-rc.jar')
32+
//compile 'com.marklogic:ml-app-deployer:3.9.1-rc'
33+
34+
35+
// the following lines are only required with tmp-lib-included ml-app-deployer
36+
compile 'com.marklogic:ml-javaclient-util:3.8.1'
37+
compile 'jaxen:jaxen:1.1.6'
38+
compile 'org.apache.httpcomponents:httpclient:4.3.5'
39+
compile 'org.springframework:spring-web:4.3.5.RELEASE'
40+
compile "org.apache.commons:commons-lang3:3.7"
41+
compileOnly "com.beust:jcommander:1.72"
42+
// remove the above lines before release
43+
3044
compile 'com.marklogic:mlcp-util:0.9.0'
31-
compile 'com.marklogic:ml-app-deployer:3.8.3'
3245
compile 'com.marklogic:marklogic-data-movement-components:1.0'
3346
compile 'commons-io:commons-io:2.4'
3447
compile 'org.apache.commons:commons-text:1.1'
@@ -269,7 +282,7 @@ task teardown(type: JavaExec) {
269282
test {
270283
minHeapSize = "128m"
271284
maxHeapSize = "256m"
272-
classpath = project.sourceSets.test.runtimeClasspath
285+
classpath = project.sourceSets.test.runtimeClasspath
273286
}
274287

275288
task testAcceptance(type: Test) {
@@ -336,7 +349,7 @@ task setupSSL{
336349
}
337350
}
338351
}
339-
352+
340353
test.dependsOn(bootstrap)
341354
//Uncomment this line if hub has to be uninstalled after test
342355
//test.finalizedBy(cleanupTask)

marklogic-data-hub/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ mlHubAdminUserName=hub-admin-user
6262
mlHubAdminUserPassword=fO3^)&X|j_O8m^k_2=xi
6363

6464
mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,data-hub-role,read,data-hub-role,execute
65+
66+
mlIsProvisionedEnvironment=false

marklogic-data-hub/src/main/java/com/marklogic/hub/HubConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ static HubConfig create(String projectDir) {
314314
*/
315315
Boolean getIsHostLoadBalancer();
316316

317+
/**
318+
* Signifies if we are dealing with a provisioned environment.
319+
* @return a Boolean.
320+
*/
321+
Boolean getIsProvisionedEnvironment();
322+
317323
/**
318324
* Returns the path for the custom forests definition
319325
* @return path where the custom forests are as string

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/DeployHubDatabaseCommand.java

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,26 @@
1515
*/
1616
package com.marklogic.hub.deploy.commands;
1717

18+
import com.fasterxml.jackson.core.JsonProcessingException;
1819
import com.fasterxml.jackson.databind.JsonNode;
20+
import com.fasterxml.jackson.databind.ObjectMapper;
21+
import com.fasterxml.jackson.databind.node.ObjectNode;
1922
import com.marklogic.appdeployer.AppConfig;
2023
import com.marklogic.appdeployer.command.CommandContext;
2124
import com.marklogic.appdeployer.command.SortOrderConstants;
2225
import com.marklogic.appdeployer.command.databases.DeployDatabaseCommand;
2326
import com.marklogic.appdeployer.command.forests.DeployForestsCommand;
2427
import com.marklogic.hub.HubConfig;
28+
import com.marklogic.hub.error.DataHubConfigurationException;
2529
import com.marklogic.mgmt.PayloadParser;
2630
import com.marklogic.mgmt.SaveReceipt;
2731
import com.marklogic.mgmt.resource.databases.DatabaseManager;
2832
import com.marklogic.rest.util.JsonNodeUtil;
33+
import org.springframework.http.HttpStatus;
34+
import org.springframework.web.client.HttpClientErrorException;
2935

3036
import java.io.File;
37+
import java.io.IOException;
3138
import java.util.ArrayList;
3239
import java.util.List;
3340
import java.util.Map;
@@ -56,7 +63,10 @@ public class DeployHubDatabaseCommand extends DeployDatabaseCommand {
5663

5764
private int undoSortOrder;
5865

66+
private ObjectMapper mapper;
67+
5968
public DeployHubDatabaseCommand(HubConfig config, String databaseFilename) {
69+
mapper = new ObjectMapper();
6070
setExecuteSortOrder(SortOrderConstants.DEPLOY_OTHER_DATABASES);
6171
setUndoSortOrder(SortOrderConstants.DELETE_OTHER_DATABASES);
6272
this.hubConfig = config;
@@ -79,10 +89,30 @@ public void execute(CommandContext context) {
7989
String payload = buildPayload(context);
8090
if (payload != null) {
8191
DatabaseManager dbMgr = new DatabaseManager(context.getManageClient());
82-
SaveReceipt receipt = dbMgr.save(payload);
83-
int forestCount = determineForestCountPerHost(payload, context);
84-
if (forestCount > 0) {
85-
buildDeployForestsCommand(payload, receipt, context).execute(context);
92+
93+
if (hubConfig.getIsProvisionedEnvironment()){
94+
ObjectNode payloadJson;
95+
try {
96+
payloadJson = (ObjectNode) mapper.readTree(payload);
97+
} catch (IOException e) {
98+
throw new DataHubConfigurationException(e);
99+
}
100+
// for DHS we have to remove some keys
101+
logger.warn("Deploying indexes only to a provisioned environment");
102+
payloadJson.remove("schema-database");
103+
payloadJson.remove("triggers-database");
104+
try {
105+
SaveReceipt receipt = dbMgr.save(mapper.writeValueAsString(payloadJson));
106+
} catch (JsonProcessingException e) {
107+
throw new DataHubConfigurationException(e);
108+
}
109+
}
110+
else {
111+
SaveReceipt receipt = dbMgr.save(payload);
112+
int forestCount = determineForestCountPerHost(payload, context);
113+
if (forestCount > 0) {
114+
buildDeployForestsCommand(payload, receipt, context).execute(context);
115+
}
86116
}
87117
}
88118
}

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/DeployHubDatabasesCommand.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
import com.marklogic.appdeployer.command.databases.DeployDatabaseCommandComparator;
2525
import com.marklogic.appdeployer.command.databases.DeploySchemasDatabaseCommand;
2626
import com.marklogic.appdeployer.command.databases.DeployTriggersDatabaseCommand;
27+
import com.marklogic.hub.DatabaseKind;
2728
import com.marklogic.hub.HubConfig;
29+
import org.springframework.http.HttpStatus;
30+
import org.springframework.web.client.HttpClientErrorException;
2831

2932
import java.io.File;
3033
import java.util.*;
@@ -45,6 +48,7 @@
4548
public class DeployHubDatabasesCommand extends AbstractUndoableCommand {
4649

4750
private HubConfig hubConfig;
51+
private final String prefix = "staging";
4852

4953
public DeployHubDatabasesCommand(HubConfig config) {
5054
this.hubConfig = config;
@@ -57,7 +61,18 @@ public void execute(CommandContext context) {
5761
List<DeployDatabaseCommand> list = buildDatabaseCommands(context);
5862
sortCommandsBeforeExecute(list, context);
5963
for (DeployDatabaseCommand c : list) {
60-
c.execute(context);
64+
logger.debug("Deploying database command: " + c.buildPayload(context) );
65+
try {
66+
c.execute(context);
67+
} catch (HttpClientErrorException e) {
68+
if (e.getStatusCode() == HttpStatus.FORBIDDEN) {
69+
logger.warn("Deployment of database failed with FORBIDDEN. Assuming a provisioned environment.");
70+
}
71+
else {
72+
throw(e);
73+
}
74+
75+
}
6176
}
6277
}
6378

@@ -88,8 +103,8 @@ protected List<DeployDatabaseCommand> buildDatabaseCommands(CommandContext conte
88103
for (File f : configDir.getContentDatabaseFiles()) {
89104
ignore.add(f.getName());
90105
}
91-
ignore.add(DeploySchemasDatabaseCommand.DATABASE_FILENAME);
92-
ignore.add(DeployTriggersDatabaseCommand.DATABASE_FILENAME);
106+
ignore.add(prefix + "-" + DeploySchemasDatabaseCommand.DATABASE_FILENAME);
107+
ignore.add(prefix + "-" + DeployTriggersDatabaseCommand.DATABASE_FILENAME);
93108

94109
ResourceFilenameFilter filter = new ResourceFilenameFilter(ignore);
95110
setResourceFilenameFilter(filter);

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/DeployHubOtherDatabasesCommand.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
public class DeployHubOtherDatabasesCommand extends AbstractUndoableCommand {
3232

3333
private HubConfig hubConfig;
34-
34+
private final String prefix = "final";
35+
3536
public DeployHubOtherDatabasesCommand(HubConfig config) {
3637
this.hubConfig = config;
3738
setExecuteSortOrder(SortOrderConstants.DEPLOY_OTHER_DATABASES);
@@ -70,9 +71,9 @@ protected List<DeployDatabaseCommand> buildDatabaseCommands(CommandContext conte
7071
File dir = hubConfig.getUserDatabaseDir().toFile();
7172
if (dir != null && dir.exists()) {
7273
Set<String> ignore = new HashSet<>();
73-
ignore.add(DeploySchemasDatabaseCommand.DATABASE_FILENAME);
74-
ignore.add(DeployTriggersDatabaseCommand.DATABASE_FILENAME);
75-
74+
ignore.add(prefix + "-" + DeploySchemasDatabaseCommand.DATABASE_FILENAME);
75+
ignore.add(prefix + "-" + DeployTriggersDatabaseCommand.DATABASE_FILENAME);
76+
7677
ResourceFilenameFilter filter = new ResourceFilenameFilter(ignore);
7778
setResourceFilenameFilter(filter);
7879

@@ -86,4 +87,4 @@ protected List<DeployDatabaseCommand> buildDatabaseCommands(CommandContext conte
8687
}
8788
return dbCommands;
8889
}
89-
}
90+
}

marklogic-data-hub/src/main/java/com/marklogic/hub/impl/DataHubImpl.java

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public class DataHubImpl implements DataHub {
7777
private AdminManager _adminManager;
7878

7979
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
80+
private String finalFile = "final-database.json";
81+
private String stagingFile = "staging-database.json";
82+
private String jobsFile = "job-database.json";
8083

8184
public DataHubImpl(HubConfig hubConfig) {
8285
if (hubConfig == null) {
@@ -132,68 +135,55 @@ public InstallInfo isInstalled() {
132135

133136
InstallInfo installInfo = InstallInfo.create();
134137

135-
ResourcesFragment srf = null;
136-
try {
137-
srf = getServerManager().getAsXml();
138-
} catch (HttpClientErrorException e) {
139-
if (e.getStatusCode() == HttpStatus.UNAUTHORIZED) {
140-
throw new DataHubSecurityNotInstalledException();
141-
}
142-
} catch (HttpServerErrorException e) {
143-
// this result comes from a disabled manage client.
144-
// DHF gets this response from DHS, which has no public
145-
// manage client. So we'll assume a provisioned DH exists in this case.
146-
// TODO I don't know what TODO
147-
if (e.getStatusCode() == HttpStatus.SERVICE_UNAVAILABLE) {
148-
return assumedProvisionedInstallInfo(installInfo);
149-
}
150-
else {
151-
throw new DataHubConfigurationException(e);
152-
}
153-
} catch ( MarkLogicIOException e) {
154-
// If server is off, this happens.
155-
// we don't know about install state, so don't assume it's not?
156-
return assumedProvisionedInstallInfo(installInfo);
157-
} catch (ResourceAccessException e) {
158-
// in ALB scenario we actually get a connection exception, not gateway
138+
if (hubConfig.getIsProvisionedEnvironment()){
159139
return assumedProvisionedInstallInfo(installInfo);
160140
}
141+
else {
142+
ResourcesFragment srf = null;
143+
try {
144+
srf = getServerManager().getAsXml();
145+
} catch (HttpClientErrorException e) {
146+
if (e.getStatusCode() == HttpStatus.UNAUTHORIZED) {
147+
throw new DataHubSecurityNotInstalledException();
148+
}
149+
}
161150

162-
installInfo.setAppServerExistent(DatabaseKind.STAGING, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.STAGING)));
163-
installInfo.setAppServerExistent(DatabaseKind.FINAL, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.FINAL)));
164-
installInfo.setAppServerExistent(DatabaseKind.JOB, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.JOB)));
151+
installInfo.setAppServerExistent(DatabaseKind.STAGING, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.STAGING)));
152+
installInfo.setAppServerExistent(DatabaseKind.FINAL, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.FINAL)));
153+
installInfo.setAppServerExistent(DatabaseKind.JOB, srf.resourceExists(hubConfig.getHttpName(DatabaseKind.JOB)));
165154

166-
ResourcesFragment drf = getDatabaseManager().getAsXml();
167-
installInfo.setDbExistent(DatabaseKind.STAGING, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING)));
168-
installInfo.setDbExistent(DatabaseKind.FINAL, drf.resourceExists(hubConfig.getDbName(DatabaseKind.FINAL)));
169-
installInfo.setDbExistent(DatabaseKind.JOB, drf.resourceExists(hubConfig.getDbName(DatabaseKind.JOB)));
155+
ResourcesFragment drf = getDatabaseManager().getAsXml();
156+
installInfo.setDbExistent(DatabaseKind.STAGING, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING)));
157+
installInfo.setDbExistent(DatabaseKind.FINAL, drf.resourceExists(hubConfig.getDbName(DatabaseKind.FINAL)));
158+
installInfo.setDbExistent(DatabaseKind.JOB, drf.resourceExists(hubConfig.getDbName(DatabaseKind.JOB)));
170159

171-
installInfo.setDbExistent(DatabaseKind.MODULES, drf.resourceExists(hubConfig.getDbName(DatabaseKind.MODULES)));
172-
installInfo.setDbExistent(DatabaseKind.STAGING_SCHEMAS, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING_SCHEMAS)));
173-
installInfo.setDbExistent(DatabaseKind.STAGING_TRIGGERS, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING_TRIGGERS)));
160+
installInfo.setDbExistent(DatabaseKind.MODULES, drf.resourceExists(hubConfig.getDbName(DatabaseKind.MODULES)));
161+
installInfo.setDbExistent(DatabaseKind.STAGING_SCHEMAS, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING_SCHEMAS)));
162+
installInfo.setDbExistent(DatabaseKind.STAGING_TRIGGERS, drf.resourceExists(hubConfig.getDbName(DatabaseKind.STAGING_TRIGGERS)));
174163

175-
if (installInfo.isDbExistent(DatabaseKind.STAGING)) {
176-
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.STAGING));
177-
installInfo.setTripleIndexOn(DatabaseKind.STAGING, Boolean.parseBoolean(f.getElementValue("//m:triple-index")));
178-
installInfo.setCollectionLexiconOn(DatabaseKind.STAGING, Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon")));
179-
installInfo.setForestsExistent(DatabaseKind.STAGING, (f.getElements("//m:forest").size() > 0));
180-
}
164+
if (installInfo.isDbExistent(DatabaseKind.STAGING)) {
165+
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.STAGING));
166+
installInfo.setTripleIndexOn(DatabaseKind.STAGING, Boolean.parseBoolean(f.getElementValue("//m:triple-index")));
167+
installInfo.setCollectionLexiconOn(DatabaseKind.STAGING, Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon")));
168+
installInfo.setForestsExistent(DatabaseKind.STAGING, (f.getElements("//m:forest").size() > 0));
169+
}
181170

182-
if (installInfo.isDbExistent(DatabaseKind.FINAL)) {
183-
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.FINAL));
184-
installInfo.setTripleIndexOn(DatabaseKind.FINAL, Boolean.parseBoolean(f.getElementValue("//m:triple-index")));
185-
installInfo.setCollectionLexiconOn(DatabaseKind.FINAL, Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon")));
186-
installInfo.setForestsExistent(DatabaseKind.FINAL, (f.getElements("//m:forest").size() > 0));
187-
}
171+
if (installInfo.isDbExistent(DatabaseKind.FINAL)) {
172+
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.FINAL));
173+
installInfo.setTripleIndexOn(DatabaseKind.FINAL, Boolean.parseBoolean(f.getElementValue("//m:triple-index")));
174+
installInfo.setCollectionLexiconOn(DatabaseKind.FINAL, Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon")));
175+
installInfo.setForestsExistent(DatabaseKind.FINAL, (f.getElements("//m:forest").size() > 0));
176+
}
188177

189-
if (installInfo.isDbExistent(DatabaseKind.JOB)) {
190-
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.JOB));
191-
installInfo.setForestsExistent(DatabaseKind.JOB, (f.getElements("//m:forest").size() > 0));
192-
}
178+
if (installInfo.isDbExistent(DatabaseKind.JOB)) {
179+
Fragment f = getDatabaseManager().getPropertiesAsXml(hubConfig.getDbName(DatabaseKind.JOB));
180+
installInfo.setForestsExistent(DatabaseKind.JOB, (f.getElements("//m:forest").size() > 0));
181+
}
193182

194-
logger.info(installInfo.toString());
183+
logger.info(installInfo.toString());
195184

196-
return installInfo;
185+
return installInfo;
186+
}
197187
}
198188

199189
// this InstallInfo is used as a dummy to return DHS provisioned information
@@ -541,12 +531,20 @@ public void installStaging(HubDeployStatusListener listener) {
541531

542532
@Override
543533
public void updateIndexes() {
544-
AppConfig config = hubConfig.getStagingAppConfig();
545-
HubAppDeployer deployer = new HubAppDeployer(getManageClient(), getAdminManager(), null, hubConfig.newStagingClient());
546-
List<Command> commands = new ArrayList<>();
547-
commands.add(new DeployHubDatabasesCommand(hubConfig));
548-
deployer.setCommands(commands);
549-
deployer.deploy(config);
534+
HubAppDeployer deployer = new HubAppDeployer(getManageClient(), getAdminManager(), null, hubConfig.newStagingClient());
535+
536+
AppConfig finalConfig = hubConfig.getFinalAppConfig();
537+
List<Command> finalDBCommand = new ArrayList<>();
538+
finalDBCommand.add(new DeployHubDatabaseCommand(hubConfig, finalFile));
539+
deployer.setFinalCommandsList(finalDBCommand);
540+
541+
AppConfig stagingConfig = hubConfig.getStagingAppConfig();
542+
List<Command> stagingDBCommand = new ArrayList<>();
543+
stagingDBCommand.add(new DeployHubDatabaseCommand(hubConfig, stagingFile));
544+
stagingDBCommand.add(new DeployHubDatabaseCommand(hubConfig, jobsFile));
545+
deployer.setStagingCommandsList(stagingDBCommand);
546+
547+
deployer.deployAll(finalConfig, stagingConfig);
550548
}
551549

552550
/**

marklogic-data-hub/src/main/java/com/marklogic/hub/impl/EntityManagerImpl.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.fasterxml.jackson.databind.ObjectMapper;
2020
import com.fasterxml.jackson.databind.ObjectWriter;
2121
import com.fasterxml.jackson.databind.node.ArrayNode;
22+
import com.fasterxml.jackson.databind.node.ObjectNode;
2223
import com.marklogic.client.DatabaseClient;
2324
import com.marklogic.client.ext.helper.LoggingObject;
2425
import com.marklogic.client.ext.modulesloader.impl.AssetFileLoader;
@@ -49,9 +50,11 @@ public class EntityManagerImpl extends LoggingObject implements EntityManager {
4950
private static final String ENTITY_FILE_EXTENSION = ".entity.json";
5051

5152
private HubConfig hubConfig;
53+
private ObjectMapper mapper;
5254

5355
public EntityManagerImpl(HubConfig hubConfig) {
5456
this.hubConfig = hubConfig;
57+
mapper = new ObjectMapper();
5558
}
5659

5760
@Override public boolean saveQueryOptions() {
@@ -137,8 +140,14 @@ private boolean deployQueryOptions(DatabaseClient client, String filename) {
137140
if (entities.size() > 0) {
138141
DbIndexGenerator generator = new DbIndexGenerator(hubConfig.newReverseFlowClient());
139142
String indexes = generator.getIndexes(entities);
140-
FileUtils.writeStringToFile(finalFile, indexes);
141-
FileUtils.writeStringToFile(stagingFile, indexes);
143+
144+
// in order to make entity indexes ml-app-deployer compatible, add database-name keys.
145+
// ml-app-deployer removes these keys upon sending to marklogic.
146+
ObjectNode indexNode = (ObjectNode) mapper.readTree(indexes);
147+
indexNode.put("database-name", "%%mlFinalDbName%%");
148+
mapper.writerWithDefaultPrettyPrinter().writeValue(finalFile, indexNode);
149+
indexNode.put("database-name", "%%mlStagingDbName%%");
150+
mapper.writerWithDefaultPrettyPrinter().writeValue(stagingFile, indexNode);
142151
return true;
143152
}
144153
}

0 commit comments

Comments
 (0)