public static class ObjectMappedTableProperties.Builder extends TableProperties.AbstractBuilder<ObjectMappedTableProperties.Builder>
ObjectMappedTable
datasets.Modifier and Type | Method and Description |
---|---|
DatasetProperties |
build()
Create a DatasetProperties from this builder.
|
ObjectMappedTableProperties.Builder |
setRowKeyExploreName(String name)
Sets the row key column name in the corresponding Hive table for an ObjectMappedTable.
|
ObjectMappedTableProperties.Builder |
setRowKeyExploreType(Schema.Type type)
Sets the column type for the row key column in the corresponding Hive table for an
ObjectMappedTable.
|
ObjectMappedTableProperties.Builder |
setType(Type type)
Sets the type of object stored in the table.
|
setColumnFamily, setColumnFamily, setConflictDetection, setReadlessIncrementSupport, setRowFieldName, setSchema, setTablePermissions, setTTL
add, add, add, addAll, setDescription
public ObjectMappedTableProperties.Builder setType(Type type) throws UnsupportedTypeException
setRowKeyExploreName(String)
.
For example, if the type set here has three fields - "id", "name", and "price", the
corresponding Hive table for this Dataset will contain four columns - "rowkey", "id", "name",
and "price".UnsupportedTypeException
public ObjectMappedTableProperties.Builder setRowKeyExploreName(String name)
setType(Type)
and the row key explore name set here. The name set here cannot be the
same as any of the fields in the object type.
For example, if you are storing an Object with a single string field named "id", the
corresponding Hive table will have a schema of (rowkey binary, id string). If you set the
name of the row key to "name", the corresponding Hive table will instead have the schema
(name binary, id string).public ObjectMappedTableProperties.Builder setRowKeyExploreType(Schema.Type type)
Schema.Type.BYTES
and Schema.Type.STRING
are allowed.
For example, if you are storing an Object with a single string field named "id", the
corresponding Hive table will have a schema of (rowkey binary, id string). If you set the
type to a string using this method, the corresponding Hive table will instead have the schema
(rowkey string, id string).public DatasetProperties build()
build
in class DatasetProperties.Builder
Copyright © 2023 Cask Data, Inc. Licensed under the Apache License, Version 2.0.