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 Details

  • Constructor Details

    • AccumuloTableProperties

      public AccumuloTableProperties()
  • Method Details

    • 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
    • getRowId

      public static Optional<String> getRowId(Map<String,Object> tableProperties)
    • getScanAuthorizations

      public static Optional<String> getScanAuthorizations(Map<String,Object> tableProperties)
    • getSerializerClass

      public static String getSerializerClass(Map<String,Object> tableProperties)
      Gets the AccumuloRowSerializer class name to use for this table
      Parameters:
      tableProperties - The map of table properties
      Returns:
      The name of the AccumuloRowSerializer class
    • isExternal

      public static boolean isExternal(Map<String,Object> tableProperties)