I hereby claim:
- I am stillalex on github.
- I am stillalex (https://keybase.io/stillalex) on keybase.
- I have a public key ASBKLt6xBBpZupBfguutwSzPlJqDCRGKjZO9mJitTEdCqwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import java.util.concurrent.atomic.AtomicInteger | |
import org.apache.jackrabbit.oak.api.Type | |
import org.apache.jackrabbit.oak.plugins.segment.SegmentBlob | |
import org.apache.jackrabbit.oak.spi.state.NodeState | |
def countNodes(NodeState n, String path = "/", Integer flush = 1000000, Long warnAt = 1000, AtomicInteger count = new AtomicInteger(0), AtomicInteger binaries = new AtomicInteger(0), root = true) { | |
if(root) { | |
println "Counting nodes in tree ${path}" | |
} |
import org.apache.jackrabbit.oak.spi.commit.CommitInfo | |
import org.apache.jackrabbit.oak.spi.commit.EmptyHook | |
import org.apache.jackrabbit.oak.spi.state.NodeState | |
import org.apache.jackrabbit.oak.spi.state.NodeBuilder | |
class LibsCleaner { | |
def session | |
def scanBundles(remove = false) { |
#!/bin/bash | |
count=${1:-100} | |
delay=${2:-1} # defaults to 1 second | |
ts=$(date +"%Y%m%d%H%M") | |
while [ $count -gt 0 ]; do | |
printf "==== Compaction run $count ====\n" | |
printf "Start: $(date)\n" >> compaction.$ts.$count.log |
import static com.google.common.collect.Sets.newHashSet; | |
import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME; | |
import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME; | |
import java.util.Set; | |
import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer; | |
import org.apache.jackrabbit.oak.spi.state.NodeBuilder; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
import org.apache.jackrabbit.oak.spi.commit.CommitInfo | |
import org.apache.jackrabbit.oak.spi.commit.EmptyHook | |
import org.apache.jackrabbit.oak.spi.state.NodeStore | |
import org.apache.jackrabbit.oak.commons.PathUtils | |
def rmNode(def session, String path) { | |
println "Removing node ${path}" | |
NodeStore ns = session.store | |
def nb = ns.root.builder() |
http://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar | |
http://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-simple/1.7.7/slf4j-simple-1.7.7.jar | |
http://search.maven.org/remotecontent?filepath=org/apache/aries/org.apache.aries.util/1.1.0/org.apache.aries.util-1.1.0.jar | |
http://search.maven.org/remotecontent?filepath=org/apache/aries/subsystem/org.apache.aries.subsystem.api/1.0.0/org.apache.aries.subsystem.api-1.0.0.jar | |
http://search.maven.org/remotecontent?filepath=org/eclipse/equinox/org.eclipse.equinox.region/1.1.0.v20120522-1841/org.eclipse.equinox.region-1.1.0.v20120522-1841.jar | |
http://search.maven.org/remotecontent?filepath=org/apache/felix/org.apache.felix.coordinator/1.0.0/org.apache.felix.coordinator-1.0.0.jar | |
http://search.maven.org/remotecontent?filepath=org/apache/felix/org.apache.felix.resolver/1.0.0/org.apache.felix.resolver-1.0.0.jar | |
http://search.maven.org/remotecontent?filepath=org/apache/aries/subsystem/org.apache.aries.subsystem.core/1.1.0/org.apa |
// Oak Lucene Codec is exported at | |
// https://github.com/alexparvulescu/oak-lucene-codec | |
git clone https://github.com/alexparvulescu/oak-lucene-codec | |
// Luke Lucene explorer is cloned at | |
// https://github.com/alexparvulescu/luke | |
git clone https://github.com/alexparvulescu/luke | |
// build projects and run: | |
java -XX:MaxPermSize=512m -cp luke/target/luke-with-deps.jar:oak-lucene-codec/target/oak-lucene-codec-1.1-SNAPSHOT.jar org.getopt.luke.Luke |
import java.io.InputStream; | |
import java.util.concurrent.atomic.AtomicInteger | |
import org.apache.jackrabbit.oak.api.Type | |
import org.apache.jackrabbit.oak.plugins.segment.SegmentBlob | |
import org.apache.jackrabbit.oak.spi.state.NodeState | |
def countNodes(NodeState n, deep = false, String path = "/", Integer flush = 50000, AtomicInteger count = new AtomicInteger(0), AtomicInteger binaries = new AtomicInteger(0), root = true) { | |
if(root) { | |
println "Counting nodes in tree ${path}" | |
} |