Package org.apache.orc.impl
Class ReaderImpl.StripeInformationImpl
java.lang.Object
org.apache.orc.impl.ReaderImpl.StripeInformationImpl
- All Implemented Interfaces:
StripeInformation
- Enclosing class:
- ReaderImpl
-
Constructor Summary
ConstructorDescriptionStripeInformationImpl
(OrcProto.StripeInformation stripe, long stripeId, long previousOriginalStripeId, byte[][] previousKeys) -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
Get the length of the stripe's data.byte[][]
Get the encrypted keys starting from this stripe until overridden by a new set in a following stripe.long
Get the original stripe id that was used when the stripe was originally written.long
Get the length of the stripe's tail section, which contains its index.long
Get the length of the stripe's indexes.long
Get the total length of the stripe in bytes.long
Get the number of rows in the stripe.long
Get the byte offset of the start of the stripe.long
Get the index of this stripe in the current file.boolean
Does this stripe have an explicit encryption stripe id set?int
hashCode()
toString()
-
Constructor Details
-
StripeInformationImpl
public StripeInformationImpl(OrcProto.StripeInformation stripe, long stripeId, long previousOriginalStripeId, byte[][] previousKeys)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getOffset
public long getOffset()Description copied from interface:StripeInformation
Get the byte offset of the start of the stripe.- Specified by:
getOffset
in interfaceStripeInformation
- Returns:
- the bytes from the start of the file
-
getLength
public long getLength()Description copied from interface:StripeInformation
Get the total length of the stripe in bytes.- Specified by:
getLength
in interfaceStripeInformation
- Returns:
- the number of bytes in the stripe
-
getDataLength
public long getDataLength()Description copied from interface:StripeInformation
Get the length of the stripe's data.- Specified by:
getDataLength
in interfaceStripeInformation
- Returns:
- the number of bytes in the stripe
-
getIndexLength
public long getIndexLength()Description copied from interface:StripeInformation
Get the length of the stripe's indexes.- Specified by:
getIndexLength
in interfaceStripeInformation
- Returns:
- the number of bytes in the index
-
getNumberOfRows
public long getNumberOfRows()Description copied from interface:StripeInformation
Get the number of rows in the stripe.- Specified by:
getNumberOfRows
in interfaceStripeInformation
- Returns:
- a count of the number of rows
-
getStripeId
public long getStripeId()Description copied from interface:StripeInformation
Get the index of this stripe in the current file.- Specified by:
getStripeId
in interfaceStripeInformation
- Returns:
- 0 to number_of_stripes - 1
-
hasEncryptionStripeId
public boolean hasEncryptionStripeId()Description copied from interface:StripeInformation
Does this stripe have an explicit encryption stripe id set?- Specified by:
hasEncryptionStripeId
in interfaceStripeInformation
- Returns:
- true if this stripe was the first stripe of a merge
-
getEncryptionStripeId
public long getEncryptionStripeId()Description copied from interface:StripeInformation
Get the original stripe id that was used when the stripe was originally written. This is only different that getStripeId in merged files.- Specified by:
getEncryptionStripeId
in interfaceStripeInformation
- Returns:
- the original stripe id + 1
-
getEncryptedLocalKeys
public byte[][] getEncryptedLocalKeys()Description copied from interface:StripeInformation
Get the encrypted keys starting from this stripe until overridden by a new set in a following stripe. The top level array is one for each encryption variant. Each element is an encrypted key.- Specified by:
getEncryptedLocalKeys
in interfaceStripeInformation
- Returns:
- the array of encrypted keys
-
toString
-