public final class OffsetFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OffsetFactory.OFF_TYPE |
| Constructor and Description |
|---|
OffsetFactory() |
| Modifier and Type | Method and Description |
|---|---|
static AOffset |
create(int[] indexes)
Main factory pattern creator for Offsets.
|
static AOffset |
create(int[] indexes,
int apos,
int alen)
Create a Offset based on a subset of the indexes given.
|
static long |
estimateInMemorySize(int size,
int nRows)
Avg diff only works assuming a normal distribution of the offsets.
|
static AOffset |
readIn(DataInput in)
Read in AOffset from the DataInput.
|
public static AOffset create(int[] indexes)
indexes - List of indexes, that is assumed to be sorted and have no duplicatespublic static AOffset create(int[] indexes, int apos, int alen)
indexes - The indexes from which to take the offsetsapos - The position to start looking from in the indexesalen - The position to end looking at in the indexes.public static AOffset readIn(DataInput in) throws IOException
in - DataInput to read fromIOException - If the DataInput fails reading in the variablespublic static long estimateInMemorySize(int size,
int nRows)
size - The estimated number of offsetsnRows - The number of rows.Copyright © 2021 The Apache Software Foundation. All rights reserved.