Skip to content

Commit 4114da0

Browse files
committed
Merge branch 'release/1.0.0-rc.6'
2 parents 53af1f0 + 550f8da commit 4114da0

File tree

229 files changed

+5996
-1776
lines changed

Some content is hidden

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

229 files changed

+5996
-1776
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ assetInstallTime.properties
2020
flow.properties
2121
node_modules/
2222
.tmp/
23+
*.sublime-*

CHANGELOG.md

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

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

5+
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.5...v1.0.0-rc.6)
6+
7+
**Fixed bugs:**
8+
9+
- Deadlock when evaling from writer [\#231](https://github.com/marklogic/marklogic-data-hub/issues/231)
10+
11+
**Closed issues:**
12+
13+
- Update Trace UI in Trace server [\#302](https://github.com/marklogic/marklogic-data-hub/issues/302)
14+
- Trace enhancement: Not logging enough for error trace [\#301](https://github.com/marklogic/marklogic-data-hub/issues/301)
15+
- ArrayIndexOutOfBoundsException [\#298](https://github.com/marklogic/marklogic-data-hub/issues/298)
16+
- Getting Started Tutorial - Sample code for Acme Tech header plugin does not update 'latest' variable [\#297](https://github.com/marklogic/marklogic-data-hub/issues/297)
17+
- Not all data is processed in harmonize flow when thread count is greater than 1 [\#296](https://github.com/marklogic/marklogic-data-hub/issues/296)
18+
- New Mlcp Error grabbing has false positives on windows [\#295](https://github.com/marklogic/marklogic-data-hub/issues/295)
19+
- Clarify that ML DHF is FOSS and not supported MarkLogic product [\#294](https://github.com/marklogic/marklogic-data-hub/issues/294)
20+
- custom thread count throws parsing error [\#292](https://github.com/marklogic/marklogic-data-hub/issues/292)
21+
- RC5: the ingest steps in quick start gives a exception and is not runned [\#291](https://github.com/marklogic/marklogic-data-hub/issues/291)
22+
- fix gradle tasks for run flow [\#290](https://github.com/marklogic/marklogic-data-hub/issues/290)
23+
- When exception is thrown, not all flow traces are persisted. [\#278](https://github.com/marklogic/marklogic-data-hub/issues/278)
24+
- Add ability to clear the Staging or Final database [\#198](https://github.com/marklogic/marklogic-data-hub/issues/198)
25+
- mlcp\_transform needs profiling [\#162](https://github.com/marklogic/marklogic-data-hub/issues/162)
26+
27+
## [v1.0.0-rc.5](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.5) (2016-09-27)
528
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.4...v1.0.0-rc.5)
629

730
**Implemented enhancements:**

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<p style="font-style: italic; font-size:12px;">The MarkLogic Data Hub Framework is free and open source under the <a href="https://github.com/marklogic/marklogic-data-hub/blob/master/LICENSE">Apache 2 License</a> and is supported by the community of developers who build and contribute to it. Please note that Data Hub Framework is not a supported MarkLogic product.</p>
2+
13
OS | Status
24
--- | --- | ---
35
Linux/Mac | [![Build Status](https://travis-ci.org/marklogic/marklogic-data-hub.svg?branch=master)](https://travis-ci.org/marklogic/marklogic-data-hub)

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
subprojects {
22
apply plugin: 'java'
3-
apply plugin: 'eclipse'
43

54
sourceCompatibility = "1.8"
65
targetCompatibility = "1.8"

examples/hr-hub/plugins/entities/Employee/harmonize/harmonize-acme-tech/headers/headers.sjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function createHeaders(id, content, options) {
1717
var date = xs.date(xdmp.parseDateTime('[M01]/[D01]/[Y0001]', history.effectiveDate));
1818
if (date.gt(latest)) {
1919
salary = history.salary;
20+
latest = date;
2021
}
2122
}
2223

examples/spring-batch/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ plugins {
33
id 'eclipse'
44
id 'idea'
55
id 'application'
6-
id 'net.saliman.properties' version '1.4.5'
7-
id 'com.marklogic.ml-gradle' version '2.3.1'
8-
id 'com.marklogic.ml-data-hub' version '1.0.0-rc.5'
6+
id 'net.saliman.properties' version '1.4.6'
7+
id 'com.marklogic.ml-data-hub' version '1.0.0-rc.6'
98
}
109

1110
repositories {
12-
mavenLocal()
1311
jcenter()
1412
maven {url 'http://developer.marklogic.com/maven2/'}
1513
}
1614

1715
dependencies {
18-
compile 'com.marklogic:marklogic-data-hub:1.0.0-rc.5'
16+
compile 'com.marklogic:marklogic-data-hub:1.0.0-rc.6'
1917
compile "com.marklogic:marklogic-spring-batch-core:0.6.0"
2018
compile "com.marklogic:ml-javaclient-util:2.9.1"
2119
testCompile "com.marklogic:marklogic-spring-batch-test:0.6.0"

marklogic-data-hub/build.gradle

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
plugins {
2-
id 'net.saliman.properties' version '1.4.4'
2+
id 'net.saliman.properties' version '1.4.6'
33
id 'java'
4-
id 'eclipse'
5-
id 'idea'
64
id 'maven-publish'
7-
id 'com.jfrog.bintray' version '1.6'
5+
id 'com.jfrog.bintray' version '1.7.2'
86
id 'com.marklogic.ml-gradle' version '2.3.4'
7+
id 'com.moowork.node' version '0.13'
98
}
109

1110
repositories {
@@ -35,6 +34,22 @@ dependencies {
3534
testCompile 'org.easymock:easymock:3.4'
3635
}
3736

37+
node {
38+
// Version of node to use.
39+
version = '6.8.1'
40+
41+
// Version of npm to use.
42+
npmVersion = '3.10.8'
43+
44+
download = true
45+
46+
// Set the work directory for unpacking node
47+
workDir = file("${project.buildDir}/nodejs")
48+
49+
// Set the work directory where node_modules should be located
50+
nodeModulesDir = file("${project.projectDir}/src/trace-ui")
51+
}
52+
3853
task javadocJar(type: Jar, dependsOn: javadoc) {
3954
classifier = 'javadoc'
4055
from javadoc.destinationDir
@@ -45,24 +60,29 @@ task sourcesJar(type: Jar, dependsOn: classes) {
4560
from sourceSets.main.allSource
4661
}
4762

48-
task npmInstallTraceUI(type:Exec) {
49-
workingDir './src/trace-ui'
50-
commandLine 'npm', 'install'
63+
task cleanUI(type: Delete) {
64+
delete 'src/main/resources/ml-modules/root/trace-ui'
5165
}
5266

53-
task buildTraceUI(type:Exec) {
54-
workingDir './src/trace-ui'
55-
commandLine 'npm', 'run', 'build'
56-
dependsOn tasks.npmInstallTraceUI
67+
task npmInstallUI(type: NpmTask) {
68+
args = ['install']
69+
dependsOn tasks.cleanUI
5770
}
5871

59-
task watchTraceUI(type:Exec) {
60-
workingDir './src/trace-ui'
61-
commandLine 'npm', 'start'
62-
dependsOn tasks.npmInstallTraceUI
72+
task buildUI(type: NpmTask) {
73+
args = ['run', 'build.prod']
74+
dependsOn tasks.npmInstallUI
6375
}
6476

65-
build.dependsOn buildTraceUI
77+
task copyUIAssets(type: Copy) {
78+
from 'src/trace-ui/dist'
79+
into 'src/main/resources/ml-modules/root/trace-ui'
80+
dependsOn tasks.buildUI
81+
}
82+
83+
if (!gradle.startParameter.taskNames.contains('bootrun')) {
84+
processResources.dependsOn copyUIAssets
85+
}
6686

6787
javadoc {
6888
options.overview = 'src/main/resources/overview.html'
@@ -131,7 +151,6 @@ bintray {
131151
repo = 'maven'
132152
name = project.name
133153
desc = pomCustomizations.textdescription.text()
134-
// userOrg = user
135154
licenses = ['Apache-2.0']
136155
websiteUrl = pomCustomizations.url
137156
vcsUrl = pomCustomizations.scm.url
@@ -142,11 +161,14 @@ bintray {
142161
ext {
143162
// mlAppConfig is an instance of com.marklogic.appdeployer.AppConfig
144163
mlAppConfig {
164+
165+
moduleTokensPropertiesSources = new ArrayList<>()
166+
145167
// override some default values with our values
146168
modulesDatabaseName = mlModulesDbName
147169
triggersDatabaseName = mlTriggersDbName
148170
schemasDatabaseName = mlSchemasDbName
149-
restPort = Integer.parseInt(mlStagingPort)
171+
restPort = Integer.parseInt(mlJobPort)
150172

151173
// Configure custom tokens for our json files
152174
customTokens.put("%%mlStagingAppserverName%%", mlStagingAppserverName)

marklogic-data-hub/gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ mlSchemasDbName=data-hub-SCHEMAS
3333

3434
hubModulesPath=examples/hr-hub/plugins
3535

36-
version=1.0.0-rc.5
36+
mlReplaceTokensInModules=true
37+
mlUseRoxyTokenPrefix=false
38+
39+
version=1.0.0-rc.6
3740

3841

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public class DataHub extends LoggingObject {
7474

7575
private ManageConfig config;
7676
private ManageClient client;
77-
77+
private DatabaseManager databaseManager;
78+
private ServerManager serverManager;
7879
private HubConfig hubConfig;
7980

8081
private AdminManager adminManager;
@@ -95,6 +96,8 @@ private void init(HubConfig hubConfig) {
9596
this.hubConfig = hubConfig;
9697
config = new ManageConfig(hubConfig.host, 8002, hubConfig.username, hubConfig.password);
9798
client = new ManageClient(config);
99+
databaseManager = new DatabaseManager(client);
100+
serverManager = new ServerManager(client);
98101

99102
AdminConfig adminConfig = new AdminConfig();
100103
adminConfig.setHost(hubConfig.host);
@@ -112,17 +115,14 @@ public void setAdminManager(AdminManager manager) {
112115
* @return true if installed, false otherwise
113116
*/
114117
public boolean isInstalled() {
115-
ServerManager sm = new ServerManager(client);
116-
DatabaseManager dm = new DatabaseManager(client);
117-
118-
ResourcesFragment srf = sm.getAsXml();
118+
ResourcesFragment srf = serverManager.getAsXml();
119119
boolean stagingAppServerExists = srf.resourceExists(hubConfig.stagingHttpName);
120120
boolean finalAppServerExists = srf.resourceExists(hubConfig.finalHttpName);
121121
boolean traceAppServerExists = srf.resourceExists(hubConfig.traceHttpName);
122122
boolean jobAppServerExists = srf.resourceExists(hubConfig.jobHttpName);
123123
boolean appserversOk = (stagingAppServerExists && finalAppServerExists && traceAppServerExists && jobAppServerExists);
124124

125-
ResourcesFragment drf = dm.getAsXml();
125+
ResourcesFragment drf = databaseManager.getAsXml();
126126
boolean stagingDbExists = drf.resourceExists(hubConfig.stagingDbName);
127127
boolean finalDbExists = drf.resourceExists(hubConfig.finalDbName);
128128
boolean traceDbExists = drf.resourceExists(hubConfig.traceDbName);
@@ -139,28 +139,28 @@ public boolean isInstalled() {
139139
boolean jobIndexesOn = false;
140140

141141
if (stagingDbExists) {
142-
Fragment f = dm.getPropertiesAsXml(hubConfig.stagingDbName);
142+
Fragment f = databaseManager.getPropertiesAsXml(hubConfig.stagingDbName);
143143
stagingIndexesOn = Boolean.parseBoolean(f.getElementValue("//m:triple-index"));
144144
stagingIndexesOn = stagingIndexesOn && Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon"));
145145
stagingForestsExist = (f.getElements("//m:forest").size() == hubConfig.stagingForestsPerHost);
146146
}
147147

148148
if (finalDbExists) {
149-
Fragment f = dm.getPropertiesAsXml(hubConfig.finalDbName);
149+
Fragment f = databaseManager.getPropertiesAsXml(hubConfig.finalDbName);
150150
finalIndexesOn = Boolean.parseBoolean(f.getElementValue("//m:triple-index"));
151151
finalIndexesOn = finalIndexesOn && Boolean.parseBoolean(f.getElementValue("//m:collection-lexicon"));
152152
finalForestsExist = (f.getElements("//m:forest").size() == hubConfig.finalForestsPerHost);
153153
}
154154

155155
if (traceDbExists) {
156156
traceIndexesOn = true;
157-
Fragment f = dm.getPropertiesAsXml(hubConfig.traceDbName);
157+
Fragment f = databaseManager.getPropertiesAsXml(hubConfig.traceDbName);
158158
traceForestsExist = (f.getElements("//m:forest").size() == hubConfig.traceForestsPerHost);
159159
}
160160

161161
if (jobDbExists) {
162162
jobIndexesOn = true;
163-
Fragment f = dm.getPropertiesAsXml(hubConfig.jobDbName);
163+
Fragment f = databaseManager.getPropertiesAsXml(hubConfig.jobDbName);
164164
jobForestsExist = (f.getElements("//m:forest").size() == hubConfig.jobForestsPerHost);
165165
}
166166

@@ -301,6 +301,14 @@ public void clearUserModules() {
301301
}
302302
}
303303

304+
/**
305+
* Clears out the content in the given database
306+
* @param database - the database name to clear
307+
*/
308+
public void clearContent(String database) {
309+
databaseManager.clearDatabase(database);
310+
}
311+
304312
private EvalResultIterator runInDatabase(String query, String databaseName) {
305313
ServerEvaluationCall eval = getDatabaseClient(hubConfig.stagingPort).newServerEval();
306314
String xqy =

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ private JobParameters buildJobParameters(Flow flow, int batchSize, int threadCou
161161
* Runs a given flow
162162
* @param flow - the flow to run
163163
* @param batchSize - the size to use for batching transactions
164+
* @param threadCount - the number of threads to use
164165
* @param statusListener - the callback to receive job status updates
165166
* @return a JobExecution instance
166167
*/

0 commit comments

Comments
 (0)