Skip to content

Commit 857a51b

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 4114da0 + 82a5f9f commit 857a51b

File tree

99 files changed

+803
-433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+803
-433
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### Welcome Hub enthusiast!
2+
3+
Let's get the most out of this ticket.
4+
5+
#### The issue
6+
7+
Short description of the problem:
8+
9+
What behavior are you expecting?
10+
11+
#### Tech details
12+
13+
Which Operating System are you using?
14+
15+
Which version of MarkLogic are you using?
16+
17+
Which version of the Data Hub Framework are you using?
18+
19+
Is this a QuickStart UI bug? If so, which browser are you using?
20+
21+
#### The devil is in the details...
22+
23+
If possible, rerun the command with -d for debugging output and attach the output:
24+
25+
**for quickstart:**
26+
`java -jar quickstart.war -d > myoutput.txt`
27+
28+
**for gradle:**
29+
`gradle mlYourCommand -d > myoutput.txt`

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
# Change Log
22

3-
## [v1.0.0-rc.6](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.6)
3+
## [v1.0.0](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0)
44

5+
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.6...v1.0.0)
6+
7+
**Fixed bugs:**
8+
9+
- DeployViewSchemasCommand is failing installs [\#312](https://github.com/marklogic/marklogic-data-hub/issues/312)
10+
- File change watcher fires multiple times on Windows [\#308](https://github.com/marklogic/marklogic-data-hub/issues/308)
11+
- Clean Target database directory ? is confusing not working [\#305](https://github.com/marklogic/marklogic-data-hub/issues/305)
12+
13+
**Closed issues:**
14+
15+
- Gradle Daemon causing working directory issues [\#314](https://github.com/marklogic/marklogic-data-hub/issues/314)
16+
- marklogic spring batch requires additional date sort operator [\#311](https://github.com/marklogic/marklogic-data-hub/issues/311)
17+
- Handling tab-delimited files [\#310](https://github.com/marklogic/marklogic-data-hub/issues/310)
18+
- Add issue template to the repo [\#309](https://github.com/marklogic/marklogic-data-hub/issues/309)
19+
- Last deployed time sometimes says 47 years ago [\#303](https://github.com/marklogic/marklogic-data-hub/issues/303)
20+
21+
## [v1.0.0-rc.6](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.6) (2016-10-17)
522
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.5...v1.0.0-rc.6)
623

724
**Fixed bugs:**

examples/spring-batch/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'idea'
55
id 'application'
66
id 'net.saliman.properties' version '1.4.6'
7-
id 'com.marklogic.ml-data-hub' version '1.0.0-rc.6'
7+
id 'com.marklogic.ml-data-hub' version '1.0.0'
88
}
99

1010
repositories {
@@ -13,10 +13,10 @@ repositories {
1313
}
1414

1515
dependencies {
16-
compile 'com.marklogic:marklogic-data-hub:1.0.0-rc.6'
17-
compile "com.marklogic:marklogic-spring-batch-core:0.6.0"
18-
compile "com.marklogic:ml-javaclient-util:2.9.1"
19-
testCompile "com.marklogic:marklogic-spring-batch-test:0.6.0"
16+
compile 'com.marklogic:marklogic-data-hub:1.0.0'
17+
compile 'com.marklogic:marklogic-spring-batch-core:0.6.0'
18+
compile 'com.marklogic:ml-javaclient-util:2.9.1'
19+
testCompile 'com.marklogic:marklogic-spring-batch-test:0.6.0'
2020
}
2121

2222
distributions {

examples/spring-batch/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
mlHost=localhost
1111
mlAppName=data-hub
1212

13-
mlAdminUsername=admin
14-
mlAdminPassword=admin
13+
mlUsername=admin
14+
mlPassword=admin
1515

1616
mlStagingAppserverName=data-hub-STAGING
1717
mlStagingPort=8010

marklogic-data-hub/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
compile 'org.springframework.batch:spring-batch-core:3.0.6.RELEASE'
2323
compile 'org.springframework:spring-jdbc:4.2.6.RELEASE'
2424
compile 'com.marklogic:java-client-api:3.0.5'
25-
compile 'com.marklogic:ml-javaclient-util:2.9.1'
25+
compile 'com.marklogic:ml-javaclient-util:2.10.0'
2626
compile 'com.marklogic:ml-app-deployer:2.3.0'
2727
compile 'com.marklogic:marklogic-spring-batch-core:0.7.0'
2828
compile 'commons-io:commons-io:2.4'

marklogic-data-hub/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ mlModulesDbName=data-hub-MODULES
3131
mlTriggersDbName=data-hub-TRIGGERS
3232
mlSchemasDbName=data-hub-SCHEMAS
3333

34-
hubModulesPath=examples/hr-hub/plugins
34+
hubProjectDir=examples/hr-hub
3535

3636
mlReplaceTokensInModules=true
3737
mlUseRoxyTokenPrefix=false
3838

39-
version=1.0.0-rc.6
39+
version=1.0.0
4040

4141

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

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@
5151
import com.marklogic.client.helper.LoggingObject;
5252
import com.marklogic.client.io.JacksonHandle;
5353
import com.marklogic.client.util.RequestParameters;
54-
import com.marklogic.hub.commands.DeployHubDatabasesCommand;
55-
import com.marklogic.hub.commands.LoadHubModulesCommand;
56-
import com.marklogic.hub.commands.LoadUserModulesCommand;
54+
import com.marklogic.hub.deploy.commands.DeployHubDatabasesCommand;
55+
import com.marklogic.hub.deploy.commands.LoadHubModulesCommand;
56+
import com.marklogic.hub.deploy.commands.LoadUserModulesCommand;
57+
import com.marklogic.hub.deploy.HubAppDeployer;
58+
import com.marklogic.hub.deploy.util.HubDeployStatusListener;
59+
import com.marklogic.hub.error.ServerValidationException;
5760
import com.marklogic.mgmt.ManageClient;
5861
import com.marklogic.mgmt.ManageConfig;
5962
import com.marklogic.mgmt.admin.AdminConfig;
@@ -84,29 +87,26 @@ public DataHub(HubConfig hubConfig) {
8487
init(hubConfig);
8588
}
8689

87-
public DataHub(String host, String username, String password) {
88-
hubConfig = new HubConfig();
89-
hubConfig.host = host;
90-
hubConfig.username = username;
91-
hubConfig.password = password;
92-
init(hubConfig);
93-
}
94-
9590
private void init(HubConfig hubConfig) {
9691
this.hubConfig = hubConfig;
97-
config = new ManageConfig(hubConfig.host, 8002, hubConfig.username, hubConfig.password);
98-
client = new ManageClient(config);
99-
databaseManager = new DatabaseManager(client);
100-
serverManager = new ServerManager(client);
101-
102-
AdminConfig adminConfig = new AdminConfig();
103-
adminConfig.setHost(hubConfig.host);
104-
adminConfig.setUsername(hubConfig.username);
105-
adminConfig.setPassword(hubConfig.password);
106-
adminManager = new AdminManager(adminConfig);
92+
if (hubConfig.username != null && hubConfig.password != null) {
93+
config = new ManageConfig(hubConfig.host, 8002, hubConfig.username, hubConfig.password);
94+
client = new ManageClient(config);
95+
databaseManager = new DatabaseManager(client);
96+
serverManager = new ServerManager(client);
97+
98+
AdminConfig adminConfig = new AdminConfig();
99+
adminConfig.setHost(hubConfig.host);
100+
adminConfig.setUsername(hubConfig.adminUsername);
101+
adminConfig.setPassword(hubConfig.adminPassword);
102+
adminManager = new AdminManager(adminConfig);
103+
}
104+
else {
105+
logger.info("Missing username and/or password.");
106+
}
107107
}
108108

109-
public void setAdminManager(AdminManager manager) {
109+
void setAdminManager(AdminManager manager) {
110110
this.adminManager = manager;
111111
}
112112

@@ -203,6 +203,10 @@ private AppConfig getAppConfig() {
203203
return config;
204204
}
205205

206+
/**
207+
* Updates the given AppConfig with values from this DataHub
208+
* @param config - the AppConfig instance to update
209+
*/
206210
public void updateAppConfig(AppConfig config) {
207211
config.setHost(hubConfig.host);
208212
config.setRestPort(hubConfig.stagingPort);
@@ -253,6 +257,10 @@ public void updateAppConfig(AppConfig config) {
253257
customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName);
254258
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName);
255259
customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName);
260+
261+
customTokens.put("%%mlHubUserName%%", hubConfig.hubUserName);
262+
customTokens.put("%%mlHubUserPassword%%", hubConfig.hubUserPassword);
263+
customTokens.put("%%mlHubUserRole%%", hubConfig.hubUserRole);
256264
}
257265

258266
public void initProject() {
@@ -426,17 +434,26 @@ private List<Command> getCommands(AppConfig config) {
426434

427435
// SQL Views
428436
List<Command> viewCommands = new ArrayList<>();
429-
viewCommands.add(new DeployViewSchemasCommand());
437+
DeployViewSchemasCommand deployViewSchemasCommand = new DeployViewSchemasCommand();
438+
deployViewSchemasCommand.setDatabaseIdOrName(hubConfig.finalDbName);
439+
viewCommands.add(deployViewSchemasCommand);
430440
commands.addAll(viewCommands);
431441

432442
return commands;
433443
}
434444

445+
/**
446+
* Installs the data hub configuration and server-side modules into MarkLogic
447+
*/
448+
public void install() {
449+
install(null);
450+
}
451+
435452
/**
436453
* Installs the data hub configuration and server-side modules into MarkLogic
437454
* @param listener - the callback method to receive status updates
438455
*/
439-
public void install(StatusListener listener) {
456+
public void install(HubDeployStatusListener listener) {
440457
initProject();
441458

442459
logger.info("Installing the Data Hub into MarkLogic");
@@ -447,11 +464,18 @@ public void install(StatusListener listener) {
447464
deployer.deploy(config);
448465
}
449466

467+
/**
468+
* Uninstalls the data hub configuration and server-side modules from MarkLogic
469+
*/
470+
public void uninstall() {
471+
uninstall(null);
472+
}
473+
450474
/**
451475
* Uninstalls the data hub configuration and server-side modules from MarkLogic
452476
* @param listener - the callback method to receive status updates
453477
*/
454-
public void uninstall(StatusListener listener) {
478+
public void uninstall(HubDeployStatusListener listener) {
455479
logger.debug("Uninstalling the Data Hub from MarkLogic");
456480

457481
AppConfig config = getAppConfig();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public Debugging(DatabaseClient client) {
1616
}
1717

1818
/**
19-
* Enables tracing
19+
* Enables debugging
2020
*/
2121
public void enable() {
2222
RequestParameters params = new RequestParameters();
@@ -25,7 +25,7 @@ public void enable() {
2525
}
2626

2727
/**
28-
* Disables tracing
28+
* Disables debugging
2929
*/
3030
public void disable() {
3131
RequestParameters params = new RequestParameters();
@@ -34,7 +34,7 @@ public void disable() {
3434
}
3535

3636
/**
37-
* Determines if the hub has tracing enabled or not
37+
* Determines if the hub has debugging enabled or not
3838
*
3939
* @return - true if enabled, false otherwise
4040
*/

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

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.marklogic.client.io.DOMHandle;
2424
import com.marklogic.client.util.RequestParameters;
2525
import com.marklogic.hub.flow.Flow;
26+
import com.marklogic.hub.flow.FlowComplexity;
2627
import com.marklogic.hub.flow.FlowType;
2728
import com.marklogic.hub.flow.SimpleFlow;
2829
import com.marklogic.spring.batch.hub.FlowConfig;
@@ -51,21 +52,10 @@ public class FlowManager extends ResourceManager {
5152
private DatabaseClient client;
5253
private HubConfig hubConfig;
5354

54-
private DatabaseClient getClient() {
55-
DatabaseClientFactory.Authentication authMethod = DatabaseClientFactory.Authentication
56-
.valueOf(hubConfig.authMethod.toUpperCase());
57-
58-
return DatabaseClientFactory.newClient(
59-
hubConfig.host,
60-
hubConfig.stagingPort,
61-
hubConfig.username,
62-
hubConfig.password, authMethod);
63-
}
64-
6555
public FlowManager(HubConfig hubConfig) {
6656
super();
6757
this.hubConfig = hubConfig;
68-
this.client = getClient();
58+
this.client = hubConfig.newStagingClient();
6959
this.client.init(NAME, this);
7060
}
7161

0 commit comments

Comments
 (0)