public class ProtocolData extends InputData
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
host |
static int |
INVALID_SPLIT_IDX |
protected OutputFormat |
outputFormat |
protected int |
port |
protected java.lang.String |
profile |
protected int |
statsMaxFragments |
protected float |
statsSampleRatio |
protected java.lang.String |
token |
accessor, dataFragment, dataSource, filterString, filterStringValid, fragmenter, fragmentMetadata, metadata, recordkeyColumn, remoteLogin, remoteSecret, requestParametersMap, resolver, segmentId, threadSafe, totalSegments, tupleDescription, userData
Constructor and Description |
---|
ProtocolData(java.util.Map<java.lang.String,java.lang.String> paramsMap)
Constructs a ProtocolData.
|
ProtocolData(java.util.Map<java.lang.String,java.lang.String> paramsMap,
java.lang.String profileString)
Constructs a ProtocolData.
|
ProtocolData(ProtocolData copy)
Constructs an InputDataBuilder from a copy.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getParametersMap()
Returns the request parameters.
|
int |
getStatsMaxFragments()
Statistics parameter.
|
float |
getStatsSampleRatio()
Statistics parameter.
|
java.lang.String |
getToken()
Returns Kerberos token information.
|
OutputFormat |
outputFormat()
Returns the current output format, either
OutputFormat.TEXT or
OutputFormat.BINARY . |
protected void |
parseDataFragment(java.lang.String fragment)
Sets the index of the allocated data fragment
|
protected void |
parseFormat(java.lang.String formatString)
Sets the format type based on the input string.
|
void |
protocolViolation(java.lang.String property)
Throws an exception when the given property value is missing in request.
|
java.lang.String |
serverName()
Returns the server name providing the service.
|
int |
serverPort()
Returns the server port providing the service.
|
getAccessor, getColumn, getColumns, getDataFragment, getDataSource, getFilterString, getFragmenter, getFragmentMetadata, getFragmentUserData, getLogin, getMetadata, getRecordkeyColumn, getResolver, getSecret, getSegmentId, getTotalSegments, getTupleDescription, getUserProperty, hasFilter, isThreadSafe, setDataSource, setFragmentMetadata, setFragmentUserData
public static final int INVALID_SPLIT_IDX
protected OutputFormat outputFormat
protected int port
protected java.lang.String host
protected java.lang.String profile
protected java.lang.String token
protected int statsMaxFragments
protected float statsSampleRatio
public ProtocolData(java.util.Map<java.lang.String,java.lang.String> paramsMap)
paramsMap
- contains all query-specific parameters from Hawqpublic ProtocolData(ProtocolData copy)
copy
- the input data to copypublic ProtocolData(java.util.Map<java.lang.String,java.lang.String> paramsMap, java.lang.String profileString)
paramsMap
- contains all query-specific parameters from HawqprofileString
- contains the profile namepublic java.util.Map<java.lang.String,java.lang.String> getParametersMap()
public void protocolViolation(java.lang.String property)
property
- missing property namejava.lang.IllegalArgumentException
- throws an exception with the property
name in the error messagepublic OutputFormat outputFormat()
OutputFormat.TEXT
or
OutputFormat.BINARY
.public java.lang.String serverName()
public int serverPort()
public java.lang.String getToken()
public int getStatsMaxFragments()
public float getStatsSampleRatio()
protected void parseFormat(java.lang.String formatString)
formatString
- format stringprotected void parseDataFragment(java.lang.String fragment)
fragment
- the allocated data fragment