public class FixedSizeTextFactory extends Object implements FixedSizeWriteableFactory<org.apache.hadoop.io.Text>
Text
object that has a fixed size when written using Writable
methods.Text
,
FixedSizeWriteableFactory
,
Writable
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
Constructor and Description |
---|
FixedSizeTextFactory(int _termLength)
Make a factory object with the specified length
|
FixedSizeTextFactory(String _termLength)
Make a factory object with the specified length, decoded using Integer.parseInt()
|
Modifier and Type | Method and Description |
---|---|
static int |
getMaximumTextLength(int charCount)
For the Hadoop Text class, given a String of charCount, how long
is the maximum encoded bytes?
|
int |
getSize()
Returns the size of instance of this class when written using Writable
|
org.apache.hadoop.io.Text |
newInstance()
Returns a new instance of Text with desired properties
|
public FixedSizeTextFactory(String _termLength)
public FixedSizeTextFactory(int _termLength)
public int getSize()
getSize
in interface FixedSizeWriteableFactory<org.apache.hadoop.io.Text>
public static int getMaximumTextLength(int charCount)
charCount
- maximum length of the Stringpublic org.apache.hadoop.io.Text newInstance()
newInstance
in interface WriteableFactory<org.apache.hadoop.io.Text>
Terrier 4.0. Copyright © 2004-2014 University of Glasgow