From: <sgo...@us...> - 2010-09-15 23:01:28
|
Revision: 3563 http://bigdata.svn.sourceforge.net/bigdata/?rev=3563&view=rev Author: sgossard Date: 2010-09-15 23:01:17 +0000 (Wed, 15 Sep 2010) Log Message: ----------- [maven_scaleout] : Breaking all direct dependency cycles with package 'com.bigdata.io', mainly via moving BytesUtil into io package. Most files touched are just an import change. Package still has major transitive cycles, again via package 'com.bigdata.counters'. Modified Paths: -------------- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/LRUNexus.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/bfs/AtomicBlockAppendProc.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTree.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTreeTupleCursor.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractChunkedTupleIterator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractNode.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BigdataMap.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/FixedLengthPrefixSplits.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IRangeQuery.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentBuilder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentMultiBlockIterator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyAfterPartitionException.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyBeforePartitionException.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Leaf.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Node.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/ResultSet.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/data/DefaultLeafCoder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/Advancer.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/PrefixFilter.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/TupleFilter.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/IKeyBuilder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KVO.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KeyBuilder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/proc/AbstractKeyRangeIndexProcedure.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/proc/BatchRemove.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/AbstractRaba.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/MutableKeyBuffer.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/ReadOnlyKeysRaba.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/ReadOnlyValuesRaba.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/codec/CanonicalHuffmanRabaCoder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/codec/FixedLengthValueRabaCoder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/raba/codec/SimpleRabaCoder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/view/FusedTupleCursor.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/view/FusedTupleIterator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/io/AbstractFixedByteArrayBuffer.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/io/ByteArrayBuffer.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/io/FileLockUtility.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/io/FixedByteArrayBuffer.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/journal/DumpJournal.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/mdi/LocalPartitionMetadata.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/mdi/PartitionLocator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/metadata/EmbeddedShardLocator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/lexicon/LexiconRelation.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/lexicon/Term2IdWriteProc.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/load/AssignedSplits.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/spo/FastRDFValueCoder2.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/spo/SPOIndexWriteProc.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/store/AbstractTripleStore.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/relation/accesspath/AbstractAccessPath.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/relation/rule/eval/pipeline/JoinTask.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/resources/JoinIndexPartitionTask.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/resources/SplitUtility.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/search/FullTextIndex.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/search/ReadIndexTask.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/AbstractScaleOutFederation.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ListIndicesTask.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/MetadataService.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/benchmark/ThroughputMaster.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/util/DumpFederation.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ndx/AbstractScaleOutClientIndexView.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ndx/AbstractSplitter.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ndx/PartitionedTupleIterator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ndx/RawDataServiceTupleIterator.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/ndx/pipeline/DefaultDuplicateRemover.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/sparse/AbstractAtomicRowReadOrWrite.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/sparse/AtomicRowFilter.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/sparse/KeyDecoder.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/sparse/LogicalRowSplitHandler.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/striterator/DistinctFilter.java branches/maven_scaleout/bigdata-core/src/main/native/com/bigdata/io/BytesUtil.c branches/maven_scaleout/bigdata-core/src/test/deploy/testing/data/com/bigdata/btree/raba/codec/AbstractRabaCoderTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/AbstractBTreeTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestAll.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestChunkedIterators.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestConstrainKeys.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestIndexSegmentMultiBlockIterators.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestIndexSegmentWithBloomFilter.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestInsertLookupRemoveKeysInRootLeaf.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestIterators.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/data/AbstractNodeOrLeafDataRecordTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/filter/TestPrefixFilter.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/isolation/TestIsolatedFusedView.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/keys/AbstractUnicodeKeyBuilderTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/keys/TestICUUnicodeKeyBuilder.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/keys/TestKeyBuilder.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/TestKeyBufferSearch.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/codec/AbstractRabaCoderTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/codec/RandomKeysGenerator.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/codec/RandomURIGenerator.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/codec/TestCanonicalHuffmanRabaCoder.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/raba/codec/TokenizeKeysGenerator.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/view/TestFusedView.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/counters/TestHistoryInstrument.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/io/TestByteArrayBuffer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/io/TestDataOutputBuffer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/io/TestFileChannelUtility.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/io/TestFixedByteArrayBuffer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/journal/TestUnisolatedWriteTasks.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/lexicon/TestComparators.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/lexicon/TestId2TermTupleSerializer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/lexicon/TestSerialization.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/lexicon/TestTerm2IdTupleSerializer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/spo/TestSPOKeyOrder.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/spo/TestSPOTupleSerializer.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/store/AbstractTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/rdf/store/TestInsertRate.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/resources/TestSegSplitter.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/search/TestKeyBuilder.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/service/AbstractEmbeddedFederationTestCase.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/service/TestRangeQuery.java Added Paths: ----------- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/io/BytesUtil.java branches/maven_scaleout/bigdata-core/src/main/native/com/bigdata/io/ branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/io/TestBytesUtil.java Removed Paths: ------------- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BytesUtil.java branches/maven_scaleout/bigdata-core/src/main/native/com/bigdata/btree/ branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/btree/TestBytesUtil.java Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/LRUNexus.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/LRUNexus.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/LRUNexus.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -35,7 +35,7 @@ import org.apache.log4j.Logger; -import com.bigdata.btree.BytesUtil; +import com.bigdata.io.BytesUtil; import com.bigdata.btree.IndexMetadata; import com.bigdata.btree.IndexSegment; import com.bigdata.btree.IndexSegmentBuilder; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/bfs/AtomicBlockAppendProc.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/bfs/AtomicBlockAppendProc.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/bfs/AtomicBlockAppendProc.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -12,7 +12,7 @@ import com.bigdata.btree.AbstractBTree; import com.bigdata.btree.BTree; -import com.bigdata.btree.BytesUtil; +import com.bigdata.io.BytesUtil; import com.bigdata.btree.IIndex; import com.bigdata.btree.ILinearList; import com.bigdata.btree.IRangeQuery; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTree.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTree.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTree.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -41,6 +41,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.FutureTask; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Level; import org.apache.log4j.Logger; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTreeTupleCursor.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTreeTupleCursor.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractBTreeTupleCursor.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -30,6 +30,7 @@ import java.util.NoSuchElementException; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Logger; import com.bigdata.btree.Leaf.ILeafListener; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractChunkedTupleIterator.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractChunkedTupleIterator.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractChunkedTupleIterator.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -32,6 +32,7 @@ import java.util.Iterator; import java.util.NoSuchElementException; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Logger; import com.bigdata.btree.filter.IFilterConstructor; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractNode.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractNode.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/AbstractNode.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -39,6 +39,7 @@ import com.bigdata.btree.raba.IRaba; import com.bigdata.btree.raba.MutableKeyBuffer; import com.bigdata.cache.HardReferenceQueue; +import com.bigdata.io.BytesUtil; import cutthecrap.utils.striterators.Expander; import cutthecrap.utils.striterators.IStriterator; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BigdataMap.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BigdataMap.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BigdataMap.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -40,6 +40,7 @@ import com.bigdata.btree.filter.FilterConstructor; import com.bigdata.btree.filter.TupleFilter; import com.bigdata.btree.keys.KeyBuilder; +import com.bigdata.io.BytesUtil; import com.bigdata.journal.ConcurrencyManager; /** Deleted: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BytesUtil.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BytesUtil.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/BytesUtil.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -1,956 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -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 -*/ -package com.bigdata.btree; - -import it.unimi.dsi.fastutil.bytes.custom.CustomByteArrayFrontCodedList; -import it.unimi.dsi.io.InputBitStream; -import it.unimi.dsi.io.OutputBitStream; - -import java.util.Comparator; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.log4j.Logger; - -import com.bigdata.rawstore.Bytes; - -/** - * Class supporting operations on variable length byte[] keys. - * <p> - * Comparison operations that accept a starting offset are used when the byte[]s - * are known to share a leading prefix that may be skipped during comparison. - * <p> - * Comparison operations that accept a starting offset and length are used when - * immutable keys are stored in a single byte[] and an index into starting - * positions in that byte[] is maintained. - * <p> - * JNI methods are provided for unsigned byte[] comparison. However, note that - * the JNI methods do not appear to be as fast as the pure Java methods - - * presumably because of the overhead of going from Java to C. In order to - * execute using the JNI methods you MUST define the optional boolean system - * property, e.g., - * - * <pre> - * java -Dcom.bigdata.btree.BytesUtil.jni=true ... - * </pre> - * - * See BytesUtil.c in this package for instructions on compiling the JNI - * methods. - * </p> - * See {@link #main(String[])} which provides a test for the JNI integration and - * some pointers on how to get this running on your platform. - * - * @author <a href="mailto:tho...@us...">Bryan Thompson</a> - * @version $Id$ - */ -public class BytesUtil { - - protected static final transient Logger log = Logger.getLogger(BytesUtil.class); - - /** - * An empty <code>byte[]</code>. - */ - public static final byte[] EMPTY = new byte[0]; - - /** - * An empty <code>byte[][]</code>. - */ - public static final byte[][] EMPTY2 = new byte[0][]; - - /** - * Flag set iff JNI linking succeeds. When this flag is false we run with - * the pure Java implementations of these methods. When the flag is true, - * the JNI versions are used. - */ - static boolean linked = false; - - /** - * JNI routines are not invoked unless we will compare byte[]s with at least - * this many potential bytes to compare (the actual# may be much less of - * course since comparisons may fail fast). - */ - static public final int minlen = 100; - - static private native int _compareBytes(int alen, byte[] a, int blen, byte[] b); - static private native int _compareBytesWithOffsetAndLen(int aoff, int alen, byte[] a, int boff, int blen, byte[] b); - - static { - - final boolean jni; - - String val = System.getProperty("com.bigdata.btree.BytesUtil.jni"); - - if (val != null) { - - jni = Boolean.parseBoolean(val); - - } else { - - jni = false; // Note: We will not even try to use JNI by default! - - } - - if (jni) { - - /* - * Attempt to load the JNI library. - */ - - loadJNILibrary(); - - } - - } - - /** - * Attempt to load the JNI library. - * <p> - * Note: this is done automatically if the optional boolean system property - * <code>com.bigdata.btree.BytesUtil.jni=true</code> is specified, e.g., - * using - * - * <pre> - * java -Dcom.bigdata.btree.BytesUtil.jni=true ... - * </pre> - * - * @return True iff the JNI library was successfully linked. - */ - public static boolean loadJNILibrary() { - - if (!linked) { - - try { - - System.loadLibrary("BytesUtil"); - - if (log.isInfoEnabled()) - log.info("BytesUtil JNI linked"); - - linked = true; - - } catch (UnsatisfiedLinkError ex) { - - log.warn("BytesUtil JNI NOT linked: " + ex); - - linked = false; - - } - } - - return linked; - - } - - /** - * True iff the two arrays compare as equal. This is somewhat optimized in - * that it tests the array lengths first, assumes that it is being used on - * sorted data and therefore compares the last bytes first, and does not - * convert the bytes to unsigned integers before testing for equality. - * - * @param a - * A byte[]. - * @param b - * Another byte[]. - * - * @return If the two arrays have the same reference (including - * <code>null</code>) or if they have the same data. - */ - final public static boolean bytesEqual(final byte[] a, final byte[] b) { - - if (a == b) - return true; - - final int alen = a.length; - - final int blen = b.length; - - if (alen != blen) - return false; - - int i = alen - 1; - - while (i >= 0) { - - if (a[i] != b[i]) - return false; - - i--; - - } - -// for (int i = 0; i < alen; i++) { -// -// if( a[i] != b[i] ) return false; -// -// } - - return true; - - } - - /** - * Byte-wise comparison of byte[]s (the arrays are treated as arrays of - * unsigned bytes). - * - * @param a - * A byte[]. - * - * @param b - * A byte[]. - * - * @return a negative integer, zero, or a positive integer if the first - * argument is less than, equal to, or greater than the second. - * - * @todo Return the index of the byte at which the difference with the sign - * adjusted to indicate the relative order of the data rather than the - * difference of the bytes at that index. The index would be negative - * or positive depending on which way the comparison went. See - * {@link CustomByteArrayFrontCodedList} for an implementation - * guideline. - * <p> - * Change all implementations in this class and also BytesUtil.c, - * which needs to be recompiled for Windows. Also makes sure that it - * gets compiled and linked for Un*x. That should be tested from the - * ant installer and the result reported. Do the same for ICU4JNI. - */ - final public static int compareBytes(final byte[] a, final byte[] b) { - if(a==b) return 0; - final int alen = a.length; - final int blen = b.length; - if (linked && alen > minlen && blen > minlen) { - /* - * JNI implementation. - * - * @todo test for trade off when max(len) is short. unroll loop for - * small N. - */ - return _compareBytes(alen,a, blen,b); - } - for (int i = 0; i < alen && i < blen; i++) { - // promotes to signed integers in [0:255] for comparison. - final int ret = (a[i] & 0xff) - (b[i] & 0xff); - // int ret = a[i] - b[i]; - if (ret != 0) - return ret; - } - return alen - blen; - } - -// /** -// * Byte-wise comparison of a {@link ByteBuffer} and a byte[]. The data are -// * treated as arrays of unsigned bytes. The {@link ByteBuffer} position, -// * limit and mark are unchanged by this procedure. -// * -// * @param a -// * A {@link ByteBuffer}. -// * @param aoff -// * The offset of the starting byte in the buffer. -// * @param blen -// * The number of bytes to be compared. -// * @param b -// * A byte[]. -// * -// * @return a negative integer, zero, or a positive integer if the first -// * argument is less than, equal to, or greater than the second. -// */ -// final public static int compareBytes(final ByteBuffer a, final int aoff, -// final int alen, final byte[] b) { -// final int blen = b.length; -// for (int i = 0; i < alen && i < blen; i++) { -// // promotes to signed integers in [0:255] for comparison. -// final int ret = (a.get(aoff + i) & 0xff) - (b[i] & 0xff); -// if (ret != 0) -// return ret; -// } -// return alen - blen; -// } - -// /** -// * Byte-wise comparison of byte[]s (the arrays are treated as arrays of -// * unsigned bytes). -// * -// * @param aoff -// * The offset into <i>a</i> at which the comparison will -// * begin. -// * @param a -// * A byte[]. -// * @param boff -// * The offset into <i>b</i> at which the comparison will -// * begin. -// * @param b -// * A byte[]. -// * -// * @return a negative integer, zero, or a positive integer as the first -// * argument is less than, equal to, or greater than the second. -// */ -// final public static int compareBytes(int aoff, final byte[] a, int boff, -// final byte[] b) { -// final int alen = a.length; -// final int blen = b.length; -// for (int i = aoff, j = boff; i < alen && j < blen; i++, j++) { -// // promotes to signed integers in [0:255] for comaprison. -// int ret = (a[i] & 0xff) - (b[j] & 0xff); -// // int ret = a[i] - b[j]; -// if (ret != 0) -// return ret; -// } -// return (alen - aoff) - (blen - boff); -// } - - /** - * Byte-wise comparison of byte[]s (the arrays are treated as arrays of - * unsigned bytes). - * - * @param aoff - * The offset into <i>a</i> at which the comparison will - * begin. - * @param alen - * The #of bytes in <i>a</i> to consider starting at <i>aoff</i>. - * @param a - * A byte[]. - * @param boff - * The offset into <i>b</i> at which the comparison will - * begin. - * @param blen - * The #of bytes in <i>b</i> to consider starting at <i>boff</i>. - * @param b - * A byte[]. - * - * @return a negative integer, zero, or a positive integer as the first - * argument is less than, equal to, or greater than the second. - */ - final public static int compareBytesWithLenAndOffset(// - int aoff, int alen, final byte[] a,// - int boff, int blen, final byte[] b// - ) { - - if (linked && alen > minlen && blen > minlen) { - - // JNI implementation. - return _compareBytesWithOffsetAndLen(aoff, alen, a, boff, blen, b); - - } - - // last index to consider in a[]. - final int alimit = aoff + alen; - - // last index to consider in b[]. - final int blimit = boff + blen; - - for (int i = aoff, j = boff; i < alimit && j < blimit; i++, j++) { - - // promotes to signed integers in [0:255] for comaprison. - int ret = (a[i] & 0xff) - (b[j] & 0xff); - - if (ret != 0) - return ret; - - } - - return alen - blen; - - } - - /** - * Return the #of leading bytes in common. This is used to compute the - * prefix for a node or leaf, which is formed by the leading bytes in common - * between the first and last key for a node or leaf. - * - * @param a - * A variable length unsigned byte array. - * @param b - * A variable length unsigned byte array. - * - * @return The #of leading bytes in common (aka the index of the first byte - * in which the two arrays differ, although that index could lie - * beyond the end of one of the arrays). - */ - public final static int getPrefixLength(final byte[] a, final byte[] b) { - - final int alen = a.length; - - final int blen = b.length; - - int i; - - for (i = 0; i < alen && i < blen; i++) { - - if (a[i] != b[i]) - break; - - } - - return i; - - } - - /** - * Return a new byte[] containing the leading bytes in common between two - * byte[]s. This is often used to compute the minimum length separator key. - * - * @param a - * A variable length unsigned byte array[]. - * @param b - * A variable length unsigned byte array[]. - * - * @return A new byte[] containing the leading bytes in common between the - * two arrays. - */ - public final static byte[] getPrefix(final byte[] a, final byte[] b) { - - final int len = getPrefixLength(a, b); - - final byte[] prefix = new byte[len]; - - System.arraycopy(a, 0, prefix, 0, len); - - return prefix; - - } - - /** - * Computes the successor of a variable length byte array by appending a - * unsigned zero(0) byte to the end of the array. - * - * @param key - * A variable length unsigned byte array. - * - * @return A new unsigned byte[] that is the successor of the key. - */ - public final static byte[] successor(final byte[] key) { - - final int keylen = key.length; - - final byte[] tmp = new byte[keylen + 1]; - - System.arraycopy(key, 0, tmp, 0, keylen); - - return tmp; - - } - - /** - * <p> - * The keys in the nodes of a btree are known as <i>separator keys</i>. The - * role of the separator keys is to direct search towards the leaf in which - * a key exists or would exist by always searching the first child having a - * separator key that is greater than or equal to the search key. - * </p> - * <p> - * Separator keys separate leaves and must be choosen with that purpose in - * mind. The simplest way to choose the separator key is to just take the - * first key of the leaf - this is always correct. However, shorter - * separator keys may be choosen by defining the separator key as the - * shortest key that is less than or equal to the first key of a leaf and - * greater than the last key of the left sibling of that leaf (that is, the - * key for the entry that immediately proceeds the first entry on the leaf). - * </p> - * <p> - * There are several advantages to always choosing the shortest separator - * key. The original rationale (in "Prefix <i>B</i>-Trees" by Bayer and - * Unterauer) was to increase the branching factors for fixed size pages. - * Since we use variable size serialized record, that is not an issue. - * However, using the shortest separator keys in this implementation - * provides both smaller serialized records for nodes and faster search - * since fewer bytes must be tested. - * </p> - * <p> - * Note that this trick can not be used at higher levels in the btree - - * separator keys are always formed based on the keys in the leaves and then - * propagated through the tree. - * </p> - * <p> - * The rules are simple enough: - * <ol> - * <li>The separator contains all bytes in the shared prefix (if any) plus - * the 1st byte at which the given key differs from the prior key.</li> - * <li>If the separator key would equal the given key by value then return - * the reference to the given key.</li> - * </ol> - * </p> - * - * @param givenKey - * A key. - * - * @param priorKey - * Another key that <em>proceeds</em> the <i>givenKey</i>. - * - * @return The shortest key that is less than or equal to <i>givenKey</i> - * and greater than <i>priorKey</i>. This will be a reference to - * the <i>givenKey</i> iff that is also the shortest separator. - * - * @see http://portal.acm.org/citation.cfm?doid=320521.320530 - * - * @throws IllegalArgumentException - * if either key is <code>null</code>. - * @throws IllegalArgumentException - * if both keys are the same reference. - */ -// * @throws IllegalArgumentException -// * if the keys are equal. -// * @throws IllegalArgumentException -// * if the keys are out of order. - final public static byte[] getSeparatorKey(final byte[] givenKey, - final byte[] priorKey) { - - if (givenKey == null) - throw new IllegalArgumentException(); - - if (priorKey == null) - throw new IllegalArgumentException(); - - if (givenKey == priorKey) - throw new IllegalArgumentException(); - - final int prefixLen = getPrefixLength(givenKey, priorKey); - - if (prefixLen == givenKey.length - 1) { - - /* - * The given key is the shortest separator. Examples would include: - * - * given: 0 1 2 - * prior: 0 1 - * - * or - * - * given: 0 1 2 - * prior: 0 1 1 - * - * or - * - * given: 0 1 2 - * prior: 0 1 1 2 - */ - - return givenKey; - - } - - /* - * The separator includes all bytes in the shared prefix plus the next - * byte from the given key. - */ - - // allocate to right size. - final byte[] tmp = new byte[prefixLen+1]; - - // copy shared prefix plus the following byte. - System.arraycopy(givenKey, 0, tmp, 0, prefixLen+1); - - return tmp; - - } - - /** - * Formats a key as a series of comma delimited unsigned bytes. - * - * @param key - * The key. - * - * @return The string representation of the array as unsigned bytes. - */ - final public static String toString(final byte[] key) { - - if (key == null) - return NULL; - - return toString(key, 0, key.length); - - } - - /** - * Formats a key as a series of comma delimited unsigned bytes. - * - * @param key - * The key. - * @param off - * The index of the first byte that will be visited. - * @param len - * The #of bytes to visit. - * - * @return The string representation of the array as unsigned bytes. - */ - final public static String toString(final byte[] key, final int off, - final int len) { - - if (key == null) - return NULL; - - final StringBuilder sb = new StringBuilder(len * 4 + 2); - - sb.append("["); - - for (int i = off; i < off + len; i++) { - - if (i > 0) - sb.append(", "); - - // as an unsigned integer. -// sb.append(Integer.toHexString(key[i] & 0xff)); - sb.append(Integer.toString(key[i] & 0xff)); - - } - - sb.append("]"); - - return sb.toString(); - - } - - private static transient String NULL = "null"; - - /** - * Formats the data into a {@link String}. - * - * @param data - * An array of unsigned byte arrays. - */ - static public String toString(final byte[][] data) { - - final StringBuilder sb = new StringBuilder(); - - final int n = data.length; - - sb.append("data(n=" + n + ")={"); - - for (int i = 0; i < n; i++) { - - final byte[] a = data[i]; - - sb.append("\n"); - - sb.append("data[" + i + "]="); - - sb.append(BytesUtil.toString(a)); - - if (i + 1 < n) - sb.append(","); - - } - - sb.append("}"); - - return sb.toString(); - - } - - /** - * Binary search on an array whose members are variable length unsigned - * byte[]s. - * - * @param keys - * The buffer. - * @param base - * The offset of the base of the array within the buffer. - * @param nmem - * The #of members in the array. When [nmem == 0], the array is - * empty. - * @param key - * The key for the search. - * - * @return index of the search key, if it is contained in <i>keys</i>; - * otherwise, <code>(-(insertion point) - 1)</code>. The - * insertion point is defined as the point at which the key would be - * inserted into the array of keys. Note that this guarantees that - * the return value will be >= 0 if and only if the key is found. - */ - static final public int binarySearch(final byte[][] keys, final int base, - final int nmem, final byte[] key) { - - int low = 0; - - int high = nmem - 1; - - while (low <= high) { - - final int mid = (low + high) >> 1; - - final int offset = base + mid; - - final byte[] midVal = keys[offset]; - - // compare actual vs probe - final int tmp = BytesUtil.compareBytes(midVal, key); - - if (tmp < 0) { - - // Actual LT probe, restrict lower bound and try again. - low = mid + 1; - - } else if (tmp > 0) { - - // Actual GT probe, restrict upper bound and try again. - high = mid - 1; - - } else { - - // Actual EQ probe. Found : return offset. - - return offset; - - } - - } - - // Not found: return insertion point. - - final int offset = (base + low); - - return -(offset + 1); - - } - - /** - * Compares two unsigned byte[]s. - * - * @author <a href="mailto:tho...@us...">Bryan Thompson</a> - * @version $Id$ - */ - public static class UnsignedByteArrayComparator implements Comparator<byte[]> { - - public static transient final Comparator<byte[]> INSTANCE = new UnsignedByteArrayComparator(); - - public int compare(final byte[] o1, final byte[] o2) { - - return BytesUtil.compareBytes(o1, o2); - - } - - } - - /** - * This method forces the load of the JNI library and tries to execute the - * JNI methods. - * <p> - * In order to use the JNI library under Windows, you must specify the JNI - * library location using the PATH environment variable, e.g., - * - * <pre> - * cd bigdata - * set PATH=%PATH%;lib - * java -cp bin com.bigdata.btree.BytesUtil - * </pre> - * - * <p> - * In order to use the JNI library under un*x, you must specify the JNI - * library location - * - * <pre> - * java -Djava.library.path=lib com.bigdata.btree.BytesUtil - * </pre> - * - * @param args - * - * @exception UnsatisfiedLinkError - * if the JNI methods can not be resolved. - * @exception AssertionError - * if the JNI methods do not produce the expected answers. - */ - public static void main(final String[] args) { - - // Force load of the JNI library. - loadJNILibrary(); - - if( 0 != BytesUtil._compareBytes(3, new byte[]{1,2,3}, 3, new byte[]{1,2,3}) ) { - - throw new AssertionError(); - - } - - if( 0 != BytesUtil._compareBytesWithOffsetAndLen(0, 3, new byte[]{1,2,3}, 0, 3, new byte[]{1,2,3}) ) { - - throw new AssertionError(); - - } - - System.out.println("JNI library routines Ok."); - - } - - /** - * Return the #of bytes required to bit code the specified #of bits. - * - * @param nbits - * The #of bit flags. - * - * @return The #of bytes required. This will be zero iff <i>nbits</i> is - * zero. - */ - final public static int bitFlagByteLength(final int nbits) { - - return nbits / 8 + (nbits % 8 == 0 ? 0 : 1); - -// return nbits>>>3; - -// if (nbits == 0) -// return 0; -// -// return ((int) ((nbits / 8) + 1)); - - } - - /** - * Return the index of the byte in which the bit with the given index is - * encoded. - * - * @param bitIndex - * The bit index. - * - * @return The byte index. - */ - final public static int byteIndexForBit(final long bitIndex) { - - return ((int) (bitIndex / 8)); - - } - - /** - * Return the offset within the byte in which the bit is coded of the bit - * (this is just the remainder <code>bitIndex % 8</code>). - * <p> - * Note, the computation of the bit offset is intentionally aligned with - * {@link OutputBitStream} and {@link InputBitStream}. - * - * @param bitIndex - * The bit index into the byte[]. - * - * @return The offset of the bit in the appropriate byte. - */ - final public static int withinByteIndexForBit(final long bitIndex) { - - return 7 - ((int) bitIndex) % 8; - - } - - /** - * Get the value of a bit. - * <p> - * Note, the computation of the bit offset is intentionally aligned with - * {@link OutputBitStream} and {@link InputBitStream}. - * - * @param bitIndex - * The index of the bit. - * - * @return The value of the bit. - */ - final public static boolean getBit(final byte[] buf, final long bitIndex) { - - final int mask = (1 << withinByteIndexForBit(bitIndex)); - - final int off = byteIndexForBit(bitIndex); - - final byte b = buf[off]; - - return (b & mask) != 0; - - } - - /** - * Set the value of a bit - this is NOT thread-safe (contention for the byte - * in the backing buffer can cause lost updates). - * <p> - * Note, the computation of the bit offset is intentionally aligned with - * {@link OutputBitStream} and {@link InputBitStream}. - * - * @param bitIndex - * The index of the bit. - * - * @return The old value of the bit. - */ - final public static boolean setBit(final byte[] buf, final long bitIndex, - final boolean value) { - - final int mask = (1 << withinByteIndexForBit(bitIndex)); - - final int off = byteIndexForBit(bitIndex); - - // current byte at that index. - byte b = buf[off]; - - final boolean oldValue = (b & mask) != 0; - - if (value) - b |= mask; - else - b &= ~mask; - - buf[off] = b; - - return oldValue; - - } - - /** - * Decode a string of the form <code>[0-9]+(k|kb|m|mb|g|gb)?</code>, - * returning the number of bytes. When a suffix indicates kilobytes, - * megabytes, or gigabytes then the returned value is scaled accordingly. - * The suffix is NOT case sensitive. - * - * @param s - * The string value. - * - * @return The byte count. - * - * @throws IllegalArgumentException - * if there is a problem with the argument (<code>null</code>, - * ill-formed, etc). - */ - static public long getByteCount(final String s) { - - if (s == null) - throw new IllegalArgumentException(); - - final Matcher m = PATTERN_BYTE_COUNT.matcher(s); - - if (!m.matches()) - throw new IllegalArgumentException(s); - - // the numeric component. - final String g1 = m.group(1); - - final long c = Long.valueOf(g1); - - // the units (null if not given). - final String g2 = m.group(2); - - final long count; - if (g2 == null) { - count = c; - } else if (g2.equalsIgnoreCase("k") || g2.equalsIgnoreCase("kb")) { - count = c * Bytes.kilobyte; - } else if (g2.equalsIgnoreCase("m") || g2.equalsIgnoreCase("mb")) { - count = c * Bytes.megabyte; - } else if (g2.equalsIgnoreCase("g") || g2.equalsIgnoreCase("gb")) { - count = c * Bytes.gigabyte; - } else { - throw new AssertionError(); - } - return count; - } - - static final private Pattern PATTERN_BYTE_COUNT = Pattern.compile( - "([0-9]+)(k|kb|m|mb|g|gb)?", Pattern.CASE_INSENSITIVE); - -} Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/FixedLengthPrefixSplits.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/FixedLengthPrefixSplits.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/FixedLengthPrefixSplits.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -6,6 +6,7 @@ import java.io.ObjectOutput; import java.io.Serializable; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Logger; import com.bigdata.rawstore.Bytes; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IRangeQuery.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IRangeQuery.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IRangeQuery.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -316,7 +316,7 @@ * @see SuccessorUtil, which may be used to compute the successor of a value * before encoding it as a component of a key. * - * @see BytesUtil#successor(byte[]), which may be used to compute the + * @see com.bigdata.io.BytesUtil#successor(byte[]), which may be used to compute the * successor of an encoded key. * * @see EntryFilter, which may be used to filter the entries visited by the @@ -361,7 +361,7 @@ * @see SuccessorUtil, which may be used to compute the successor of a value * before encoding it as a component of a key. * - * @see BytesUtil#successor(byte[]), which may be used to compute the + * @see com.bigdata.io.BytesUtil#successor(byte[]), which may be used to compute the * successor of an encoded key. * * @see IFilterConstructor, which may be used to construct an iterator stack Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentBuilder.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentBuilder.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentBuilder.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -42,6 +42,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicLong; +import com.bigdata.io.*; import org.apache.log4j.Logger; import com.bigdata.LRUNexus; @@ -53,13 +54,6 @@ import com.bigdata.btree.raba.MutableValueBuffer; import com.bigdata.btree.view.FusedView; import com.bigdata.cache.IGlobalLRU.ILRUCache; -import com.bigdata.io.AbstractFixedByteArrayBuffer; -import com.bigdata.io.ByteArrayBuffer; -import com.bigdata.io.DataInputBuffer; -import com.bigdata.io.FileChannelUtility; -import com.bigdata.io.NOPReopener; -import com.bigdata.io.SerializerUtil; -import com.bigdata.io.WriteCache; import com.bigdata.journal.Journal; import com.bigdata.journal.Name2Addr; import com.bigdata.journal.TemporaryRawStore; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentMultiBlockIterator.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentMultiBlockIterator.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/IndexSegmentMultiBlockIterator.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -4,6 +4,7 @@ import java.nio.ByteBuffer; import java.util.NoSuchElementException; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Logger; import com.bigdata.btree.IndexSegment.IndexSegmentTupleCursor; @@ -538,7 +539,7 @@ return super.toString() + // "{file=" + store.getFile() + // ",checkpoint="+store.getCheckpoint()+// - ",fromKey="+BytesUtil.toString(fromKey)+// + ",fromKey="+ BytesUtil.toString(fromKey)+// ",toKey="+BytesUtil.toString(toKey)+// ",firstLeafAddr=" + store.toString(firstLeafAddr) + // ",lastLeafAddr=" + store.toString(lastLeafAddr) + // Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyAfterPartitionException.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyAfterPartitionException.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyAfterPartitionException.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -30,6 +30,7 @@ import java.io.File; +import com.bigdata.io.BytesUtil; import com.bigdata.mdi.LocalPartitionMetadata; /** Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyBeforePartitionException.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyBeforePartitionException.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/KeyBeforePartitionException.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -30,6 +30,7 @@ import java.io.File; +import com.bigdata.io.BytesUtil; import com.bigdata.mdi.LocalPartitionMetadata; /** Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Leaf.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Leaf.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Leaf.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -30,6 +30,7 @@ import java.util.Iterator; import java.util.WeakHashMap; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Level; import com.bigdata.btree.data.DefaultLeafCoder; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Node.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Node.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/Node.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -32,11 +32,11 @@ import java.util.Iterator; import java.util.Set; import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; import java.util.concurrent.FutureTask; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReferenceArray; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Level; import com.bigdata.BigdataStatics; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/ResultSet.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/ResultSet.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/ResultSet.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -24,6 +24,7 @@ */ package com.bigdata.btree; +import com.bigdata.io.BytesUtil; import it.unimi.dsi.bits.BitVector; import it.unimi.dsi.bits.LongArrayBitVector; import it.unimi.dsi.io.InputBitStream; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/data/DefaultLeafCoder.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/data/DefaultLeafCoder.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/data/DefaultLeafCoder.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -27,6 +27,7 @@ package com.bigdata.btree.data; +import com.bigdata.io.BytesUtil; import it.unimi.dsi.bits.Fast; import it.unimi.dsi.io.InputBitStream; import it.unimi.dsi.io.OutputBitStream; @@ -38,7 +39,6 @@ import org.apache.log4j.Logger; -import com.bigdata.btree.BytesUtil; import com.bigdata.btree.IndexMetadata; import com.bigdata.btree.raba.IRaba; import com.bigdata.btree.raba.codec.ICodedRaba; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/Advancer.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/Advancer.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/Advancer.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -2,9 +2,9 @@ import java.util.Iterator; +import com.bigdata.io.BytesUtil; import org.apache.log4j.Logger; -import com.bigdata.btree.BytesUtil; import com.bigdata.btree.IIndex; import com.bigdata.btree.ITuple; import com.bigdata.btree.ITupleCursor; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/PrefixFilter.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/PrefixFilter.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/PrefixFilter.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -5,7 +5,7 @@ import org.apache.log4j.Logger; -import com.bigdata.btree.BytesUtil; +import com.bigdata.io.BytesUtil; import com.bigdata.btree.ITuple; import com.bigdata.btree.ITupleCursor; import com.bigdata.btree.ITupleIterator; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/TupleFilter.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/TupleFilter.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/filter/TupleFilter.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -8,7 +8,7 @@ import com.bigdata.btree.AbstractBTree; import com.bigdata.btree.AbstractTuple; import com.bigdata.btree.BTree; -import com.bigdata.btree.BytesUtil; +import com.bigdata.io.BytesUtil; import com.bigdata.btree.IRangeQuery; import com.bigdata.btree.ITuple; import com.bigdata.btree.ITupleCursor; Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/IKeyBuilder.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/IKeyBuilder.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/IKeyBuilder.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -34,7 +34,6 @@ import java.util.Properties; import java.util.UUID; -import com.bigdata.btree.BytesUtil; import com.bigdata.btree.keys.KeyBuilder.Options; /** @@ -129,7 +128,7 @@ * * @return A new array containing the key. * - * @see BytesUtil#compareBytes(byte[], byte[]) + * @see com.bigdata.io.BytesUtil#compareBytes(byte[], byte[]) */ public byte[] getKey(); Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KVO.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KVO.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KVO.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -30,7 +30,7 @@ import java.util.Arrays; -import com.bigdata.btree.BytesUtil; +import com.bigdata.io.BytesUtil; import com.bigdata.service.ndx.pipeline.KVOC; /** Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KeyBuilder.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KeyBuilder.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/keys/KeyBuilder.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -35,7 +35,6 @@ import java.util.Properties; import java.util.UUID; import org.apache.log4j.Logger; -import com.bigdata.btree.BytesUtil; import com.bigdata.btree.ITuple; import com.bigdata.btree.ITupleSerializer; @@ -53,7 +52,7 @@ * @see SuccessorUtil Compute the successor of a value before encoding it as a * component of a key. * - * @see BytesUtil#successor(byte[]) Compute the successor of an encoded key. + * @see com.bigdata.io.BytesUtil#successor(byte[]) Compute the successor of an encoded key. * * @todo introduce a mark and restore feature for generating multiple keys that * share some leading prefix. in general, this is as easy as resetting the Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/proc/AbstractKeyRangeIndexProcedure.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/proc/AbstractKeyRangeIndexProcedure.java 2010-09-15 21:51:13 UTC (rev 3562) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/btree/proc/AbstractKeyRangeIndexProcedure.java 2010-09-15 23:01:17 UTC (rev 3563) @@ -33,7 +33,7 @@ import ... [truncated message content] |