Package io.trino.plugin.accumulo.conf
Class AccumuloTableProperties
- java.lang.Object
-
- io.trino.plugin.accumulo.conf.AccumuloTableProperties
-
public final class AccumuloTableProperties extends Object
Class contains all table properties for the Accumulo connector. Used when creating a table:CREATE TABLE foo (a VARCHAR, b INT) WITH (column_mapping = 'b:md:b', external = true);
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_MAPPINGstatic StringEXTERNALstatic StringINDEX_COLUMNSstatic StringLOCALITY_GROUPSstatic StringROW_IDstatic StringSCAN_AUTHSstatic StringSERIALIZER
-
Constructor Summary
Constructors Constructor Description AccumuloTableProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<Map<String,org.apache.commons.lang3.tuple.Pair<String,String>>>getColumnMapping(Map<String,Object> tableProperties)Gets the value of the column_mapping property, or Optional.empty() if not set.static Optional<List<String>>getIndexColumns(Map<String,Object> tableProperties)static Optional<Map<String,Set<String>>>getLocalityGroups(Map<String,Object> tableProperties)Gets the configured locality groups for the table, or Optional.empty() if not set.static Optional<String>getRowId(Map<String,Object> tableProperties)static Optional<String>getScanAuthorizations(Map<String,Object> tableProperties)static StringgetSerializerClass(Map<String,Object> tableProperties)Gets theAccumuloRowSerializerclass name to use for this tableList<PropertyMetadata<?>>getTableProperties()static booleanisExternal(Map<String,Object> tableProperties)
-
-
-
Field Detail
-
COLUMN_MAPPING
public static final String COLUMN_MAPPING
- See Also:
- Constant Field Values
-
INDEX_COLUMNS
public static final String INDEX_COLUMNS
- See Also:
- Constant Field Values
-
EXTERNAL
public static final String EXTERNAL
- See Also:
- Constant Field Values
-
LOCALITY_GROUPS
public static final String LOCALITY_GROUPS
- See Also:
- Constant Field Values
-
ROW_ID
public static final String ROW_ID
- See Also:
- Constant Field Values
-
SERIALIZER
public static final String SERIALIZER
- See Also:
- Constant Field Values
-
SCAN_AUTHS
public static final String SCAN_AUTHS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTableProperties
public List<PropertyMetadata<?>> getTableProperties()
-
getColumnMapping
public static Optional<Map<String,org.apache.commons.lang3.tuple.Pair<String,String>>> getColumnMapping(Map<String,Object> tableProperties)
Gets the value of the column_mapping property, or Optional.empty() if not set.Parses the value into a map of Trino column name to a pair of strings, the Accumulo column family and qualifier.
- Parameters:
tableProperties- The map of table properties- Returns:
- The column mapping, Trino name to (accumulo column family, qualifier)
-
getIndexColumns
public static Optional<List<String>> getIndexColumns(Map<String,Object> tableProperties)
-
getLocalityGroups
public static Optional<Map<String,Set<String>>> getLocalityGroups(Map<String,Object> tableProperties)
Gets the configured locality groups for the table, or Optional.empty() if not set.All strings are lowercase.
- Parameters:
tableProperties- The map of table properties- Returns:
- Optional map of locality groups
-
getScanAuthorizations
public static Optional<String> getScanAuthorizations(Map<String,Object> tableProperties)
-
getSerializerClass
public static String getSerializerClass(Map<String,Object> tableProperties)
Gets theAccumuloRowSerializerclass name to use for this table- Parameters:
tableProperties- The map of table properties- Returns:
- The name of the AccumuloRowSerializer class
-
-