![JAR search and dependency download from the Maven repository](/logo.png)
com.bigdata.journal.WarmUpTask Maven / Gradle / Ivy
/**
Copyright (C) SYSTAP, LLC DBA Blazegraph 2006-2016. All rights reserved.
Contact:
SYSTAP, LLC DBA Blazegraph
2501 Calvert ST NW #106
Washington, DC 20008
[email protected]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Created on Apr 14, 2015
*/
package com.bigdata.journal;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.Logger;
import com.bigdata.btree.BaseIndexStats;
import com.bigdata.btree.ICheckpointProtocol;
import com.bigdata.util.Bytes;
import com.bigdata.util.InnerCause;
import com.bigdata.util.concurrent.LatchedExecutor;
/**
* Helper class to warm up the indices associated with various namespaces on the
* journal.
*
* @author bryan
*
* @see pre-heat the journal on
* startup
*
* TODO The current implementation assigns one thread per index. However,
* it is also possible to use a reader pool to accelerate the index scans.
* This would require a change to the
* {@link com.bigdata.btree.AbstractBTree#dumpPages(boolean, boolean)}
* implementation to parallelize the IOs over the children of a node. We
* have experimented with that in the past but not observed a big win for
* query. It might be more significant for warmup since we are using a full
* scan of each index.
*/
public class WarmUpTask implements Callable
© 2015 - 2025 Weber Informatics LLC | Privacy Policy