- Run the hubGenerateTDETemplates command
./gradlew hubGenerateTDETemplates
- Run the mlLoadFinalSchemas command
./gradlew mlLoadFinalSchemas
./gradlew hubGenerateTDETemplates
./gradlew mlLoadFinalSchemas
Example of how to avoid the error below when running mlcp tasks in windows
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:363)
at org.apache.hadoop.util.GenericOptionsParser.preProcessForWindows(GenericOptionsParser.java:438)
at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:484)
at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)
at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)
What if your team uses TFS, but you want offline support? You can have a Git repo as well, but then getting your changes to TFS is burdensome. Here’s where a GIT to TFS bridge would be handy.
Here’s how to keep a TFS repository foo, and a GIT repository bar, in sync. First step is you need to create a new TFS workspace:
cd \
tf workspace /new /noprompt Foo
declare namespace forest="http://marklogic.com/xdmp/status/forest"; | |
fn:concat("Database Name,Memory (Mb),In Memory Stands (Mb),Index etc (Mb),Disk Size (Gb),Fragments"), | |
for $database in xdmp:databases() | |
let $db-mem-size := fn:sum(for $forest in xdmp:database-forests($database) return fn:sum(xs:int(xdmp:forest-status($forest)/forest:stands/forest:stand/forest:memory-size/text()))) | |
let $db-mem-size-2 := fn:sum(for $forest in xdmp:database-forests($database) return fn:sum(xs:int(xdmp:forest-status($forest)/forest:stands/forest:stand[forest:disk-size lt forest:memory-size]/forest:memory-size/text()))) | |
let $db-mem-size-3 := fn:sum(for $forest in xdmp:database-forests($database) return fn:sum(xs:int(xdmp:forest-status($forest)/forest:stands/forest:stand[forest:disk-size gt forest:memory-size]/forest:memory-size/text()))) | |
let $db-disk-size := fn:sum(for $forest in xdmp:database-forests($database) return fn:sum(xs:int(xdmp:forest-status($forest)/forest:stands/forest:stand/forest:disk-size/text()))) | |
let $db-fragment- |
'use strict'; | |
let pki = require("/MarkLogic/pki.xqy") | |
let host = "my.host.com" | |
let id = pki.getCertificates(pki.getTrustedCertificateIds()).toArray() | |
.filter(c=>String(fn.head(c.xpath("//*:host-name/text()")))==host) | |
.map(c=>fn.head(c.xpath("//*:certificate-id/text()")))[0] | |
if (id) { | |
pki.deleteCertificate(id) |
Sequence.map = function*(iterable, fct, that) { | |
if ('function' !== typeof fct) { | |
throw new TypeError('fct must be a function'); | |
} | |
for (const item of iterable) { | |
yield fct.call(that || null, item); | |
} | |
}; | |
Sequence.prototype.map = function(fct, that) { |