Java Code Examples for com.facebook.presto.spi.ConnectorSession#getProperty()

The following examples show how to use com.facebook.presto.spi.ConnectorSession#getProperty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 5 votes vote down vote up
public static String getSessionProperty(ConnectorSession session, String key)
{
    String value = session.getProperty(key, String.class);
    if (value == null) {
        return "";
    }
    else {
        return value;
    }
}
 
Example 2
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 5 votes vote down vote up
public static int getIntSessionProperty(ConnectorSession session, String key)
{
    Integer value = session.getProperty(key, Integer.class);
    if (value == null) {
        return 0;
    }
    else {
        return value;
    }
}
 
Example 3
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getScanBatchCaching(ConnectorSession session)
{
    return session.getProperty(SCAN_CACHING, Integer.class);
}
 
Example 4
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
public static long getIterOffsetSeconds(ConnectorSession session)
{
    long value = session.getProperty(ITER_OFFSET_SECONDS, Long.class);
    return value;
}
 
Example 5
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
public static boolean getIterFromTimestamp(ConnectorSession session)
{
    boolean value = session.getProperty(ITER_FROM_TIMESTAMP, Boolean.class);
    return value;
}
 
Example 6
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
public static int getMaxBatches(ConnectorSession session)
{
    int value = session.getProperty(MAX_BATCHES, Integer.class);
    return value;
}
 
Example 7
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
public static int getBatchSize(ConnectorSession session)
{
    int value = session.getProperty(BATCH_SIZE, Integer.class);
    return value;
}
 
Example 8
Source File: SessionVariables.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
public static boolean getCheckpointEnabled(ConnectorSession session)
{
    boolean value = session.getProperty(CHECKPOINT_ENABLED, Boolean.class);
    return value;
}
 
Example 9
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getScanMaxVersions(ConnectorSession session)
{
    return session.getProperty(SCAN_MAX_VERSIONS, Integer.class);
}
 
Example 10
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getScanMaxResultSize(ConnectorSession session)
{
    return session.getProperty(SCAN_MAX_RESULT_SIZE, Integer.class);
}
 
Example 11
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static boolean isOptimizeLocalityEnabled(ConnectorSession session)
{
    return session.getProperty(OPTIMIZE_LOCALITY_ENABLED, Boolean.class);
}
 
Example 12
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getScanBatchSize(ConnectorSession session)
{
    return session.getProperty(SCAN_BATCH_SIZE, Integer.class);
}
 
Example 13
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static String getScanUsername(ConnectorSession session)
{
    return session.getProperty(SCAN_USERNAME, String.class);
}
 
Example 14
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static boolean isOptimizeSplitRangesEnabled(ConnectorSession session)
{
    return session.getProperty(OPTIMIZE_SPLIT_RANGES_ENABLED, Boolean.class);
}
 
Example 15
Source File: HbaseSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static boolean isOptimizeLocalityEnabled(ConnectorSession session)
{
    return session.getProperty(OPTIMIZE_LOCALITY_ENABLED, Boolean.class);
}
 
Example 16
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static String getScanUsername(ConnectorSession session)
{
    return session.getProperty(SCAN_USERNAME, String.class);
}
 
Example 17
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getScrollSearchBatchSize(ConnectorSession session)
{
    return session.getProperty(SCROLL_SEARCH_BATCH_SIZE, Integer.class);
}
 
Example 18
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
/**
 * @return get Scroll Timeout
 * */
public static long getScrollSearchTimeout(ConnectorSession session)
{
    return session.getProperty(SCROLL_SEARCH_TIMEOUT, Long.class);
}
 
Example 19
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static int getNumIndexRowsPerSplit(ConnectorSession session)
{
    return session.getProperty(INDEX_ROWS_PER_SPLIT, Integer.class);
}
 
Example 20
Source File: ElasticsearchSessionProperties.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public static boolean isOptimizeSplitShardsEnabled(ConnectorSession session)
{
    return session.getProperty(OPTIMIZE_SPLIT_SHARDS_ENABLED, Boolean.class);
}