This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.marklogic; | |
import com.marklogic.xcc.*; | |
import java.net.URI; | |
import java.util.UUID; | |
public class Main { | |
public static void main(String[] args) throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.marklogic.xcc.*; | |
import com.marklogic.xcc.exceptions.RequestException; | |
import java.net.URI; | |
public class XccDeleteModule { | |
public static void main(String[] args){ | |
System.out.println("XccDeleteModule.main: start"); | |
ContentSource cs = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
s.submitRequest(r); | |
s.commit(); | |
} catch (RequestException e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println(s.getTransactionMode()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s.setTransactionMode(Session.TransactionMode.UPDATE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace admin = 'http://marklogic.com/xdmp/admin' at '/MarkLogic/admin.xqy'; | |
for $h in xdmp:hosts() | |
return xdmp:host-name($h) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace admin = 'http://marklogic.com/xdmp/admin' at '/MarkLogic/admin.xqy'; | |
declare variable $USER as xs:string := "q"; | |
declare variable $PASS as xs:string := "q"; | |
declare variable $PORT as xs:string := "9999"; | |
declare variable $ENDPOINT as xs:string := "/endpoint.xqy"; | |
declare function local:generate-cluster-endpoints() as xs:string* { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace fs="http://marklogic.com/xdmp/status/forest"; | |
declare variable $DATABASE as xs:string := "YOUR-DATABASE-HERE"; | |
declare function local:get-host-forest-ids() as xs:unsignedLong+ { | |
for $f in xdmp:database-forests(xdmp:database($DATABASE)) | |
where xdmp:forest-status($f)/fs:host-id eq xdmp:host() | |
return | |
$f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# default argument check | |
if [[ -z $1 ]]; then | |
echo Usage: ./report.sh \[MarkLogic ErrorLog File\] | |
echo e.g. ./report.sh ErrorLog.txt | |
exit 1 | |
fi | |
DOC=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
(:~ | |
: This module allows for the convenient setting of all forests in a given database into a | |
: specific mode for common management operations. These include: | |
: <ul> | |
: <li>Flash backup - Forests can be quiesced so a safe "flash backup" of the filesystem can take place</li> | |
: <li>All - The "default" for newly created forests; allows both inserts and updates to take place for fragments in | |
: all forests in that database</li> | |
: <li>Read only - Places forest in a state where documents can be read from the forest but not updated or removed</li> |